oota-llvm.git
14 years agoMake the ll parser check that arguments have valid types.
Eli Friedman [Sat, 24 Jul 2010 23:00:26 +0000 (23:00 +0000)]
Make the ll parser check that arguments have valid types.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109361 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoPR7704: A function is not allowed to return a function; make sure to enforce
Eli Friedman [Sat, 24 Jul 2010 22:58:04 +0000 (22:58 +0000)]
PR7704: A function is not allowed to return a function; make sure to enforce
this consistently.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109360 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoHook in GlobalMerge pass
Anton Korobeynikov [Sat, 24 Jul 2010 21:52:08 +0000 (21:52 +0000)]
Hook in GlobalMerge pass

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109359 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRevert this because we can't clone cyclic MDNodes which are creating during a
Nick Lewycky [Sat, 24 Jul 2010 20:54:02 +0000 (20:54 +0000)]
Revert this because we can't clone cyclic MDNodes which are creating during a
build of llvm-gcc.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109355 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdd hook to insert late LLVM=>LLVM passes just before isel
Anton Korobeynikov [Sat, 24 Jul 2010 20:48:54 +0000 (20:48 +0000)]
Add hook to insert late LLVM=>LLVM passes just before isel

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109354 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoWhether function-local or not, a MDNode may reference a Function in which case
Nick Lewycky [Sat, 24 Jul 2010 19:43:25 +0000 (19:43 +0000)]
Whether function-local or not, a MDNode may reference a Function in which case
it needs to be mapped to refer to the function in the new module, not the old
one. Fixes PR7700.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109353 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoadd a new NullablePtr class which makes it more obvious in API
Chris Lattner [Sat, 24 Jul 2010 18:47:46 +0000 (18:47 +0000)]
add a new NullablePtr class which makes it more obvious in API
that a pointer can be null, forcing clients to think about it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109348 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoDocument BUILD_EXAMPLES makefile variable
Peter Collingbourne [Sat, 24 Jul 2010 17:54:00 +0000 (17:54 +0000)]
Document BUILD_EXAMPLES makefile variable

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109346 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoClarify that if a new value handle is added while dropping value handles
Duncan Sands [Sat, 24 Jul 2010 12:09:22 +0000 (12:09 +0000)]
Clarify that if a new value handle is added while dropping value handles
hanging off a value, then the dropping code will intentionally not drop
it too (since this is almost certainly a bug).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109337 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoChange ScheduleDAGInstrs::Defs and ::Uses to be variable-size vectors
Bob Wilson [Sat, 24 Jul 2010 06:01:53 +0000 (06:01 +0000)]
Change ScheduleDAGInstrs::Defs and ::Uses to be variable-size vectors
instead of fixed size arrays, so that increasing FirstVirtualRegister to 16K
won't cause a compile time performance regression.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109330 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoUse current working directory when Dirname is empty. This only happens when absolute...
Devang Patel [Sat, 24 Jul 2010 00:53:22 +0000 (00:53 +0000)]
Use current working directory when Dirname is empty. This only happens when absolute source file path is used on compiler command line.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109302 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdd an ILP scheduler. This is a register pressure aware scheduler that's
Evan Cheng [Sat, 24 Jul 2010 00:39:05 +0000 (00:39 +0000)]
Add an ILP scheduler. This is a register pressure aware scheduler that's
appropriate for targets without detailed instruction iterineries.
The scheduler schedules for increased instruction level parallelism in
low register pressure situation; it schedules to reduce register pressure
when the register pressure becomes high.

On x86_64, this is a win for all tests in CFP2000. It also sped up 256.bzip2
by 16%.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109300 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoSupport x86 "eiz" and "riz" pseudo index registers in the assembler.
Bruno Cardoso Lopes [Sat, 24 Jul 2010 00:06:39 +0000 (00:06 +0000)]
Support x86 "eiz" and "riz" pseudo index registers in the assembler.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109295 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoUse the appropriate register class for an i32 when adding ARM::LR to the
Jim Grosbach [Fri, 23 Jul 2010 23:50:35 +0000 (23:50 +0000)]
Use the appropriate register class for an i32 when adding ARM::LR to the
function live in set. This will give us tGPR for Thumb1 and GPR otherwise,
so the copy will be spillable. rdar://8224931

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109293 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRemove too-strict assertion. We may want the vreg copy of the physical register
Jim Grosbach [Fri, 23 Jul 2010 23:48:02 +0000 (23:48 +0000)]
Remove too-strict assertion. We may want the vreg copy of the physical register
to be of a different register class. For example, in Thumb1 if the live-in is
a high register, we want the vreg to be a low register. rdar://8224931

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109291 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoConsolidate the ELF section directive tests into a single file as
Matt Fleming [Fri, 23 Jul 2010 23:40:41 +0000 (23:40 +0000)]
Consolidate the ELF section directive tests into a single file as
suggested by Chris Lattner.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109290 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFix use-after-free error.
Owen Anderson [Fri, 23 Jul 2010 23:27:43 +0000 (23:27 +0000)]
Fix use-after-free error.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109288 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRevert r109262.
Devang Patel [Fri, 23 Jul 2010 23:04:41 +0000 (23:04 +0000)]
Revert r109262.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109285 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRevert 109076. It is wrong and was causing regressions. Add some
Dale Johannesen [Fri, 23 Jul 2010 22:50:23 +0000 (22:50 +0000)]
Revert 109076.  It is wrong and was causing regressions.  Add some
comments explaining why it was wrong.  8225024.

Fix the real problem in 8213383: the code that splits very large
blocks when no other place to put constants can be found was not
considering the case that the block contained a Thumb tablejump.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109282 91177308-0d34-0410-b5e6-96231b3b80d8

14 years ago- Allow target to specify when is register pressure "too high". In most cases,
Evan Cheng [Fri, 23 Jul 2010 22:39:59 +0000 (22:39 +0000)]
- Allow target to specify when is register pressure "too high". In most cases,
  it's too late to start backing off aggressive latency scheduling when most
  of the registers are in use so the threshold should be a bit tighter.
- Correctly handle live out's and extract_subreg etc.
- Enable register pressure aware scheduling by default for hybrid scheduler.
  For ARM, this is almost always a win on # of instructions. It's runtime
  neutral for most of the tests. But for some kernels with high register
  pressure it can be a huge win. e.g. 464.h264ref reduced number of spills by
  54 and sped up by 20%.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109279 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRemove trailing whitespace
Bruno Cardoso Lopes [Fri, 23 Jul 2010 22:15:26 +0000 (22:15 +0000)]
Remove trailing whitespace

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109276 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoEliminate getCanonicalInductionVariableIncrement's last user and
Dan Gohman [Fri, 23 Jul 2010 21:34:51 +0000 (21:34 +0000)]
Eliminate getCanonicalInductionVariableIncrement's last user and
eliminate it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109270 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoMove AVX encoding tests to different files
Bruno Cardoso Lopes [Fri, 23 Jul 2010 21:25:26 +0000 (21:25 +0000)]
Move AVX encoding tests to different files

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109269 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoSimplify this code; it can use the regular CFG utlities rather than
Dan Gohman [Fri, 23 Jul 2010 21:25:16 +0000 (21:25 +0000)]
Simplify this code; it can use the regular CFG utlities rather than
the BlockTraits abstractions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109268 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoMicro-optimize SCEVComplexityCompare.
Dan Gohman [Fri, 23 Jul 2010 21:20:52 +0000 (21:20 +0000)]
Micro-optimize SCEVComplexityCompare.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109267 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdd a const qualifier.
Dan Gohman [Fri, 23 Jul 2010 21:18:55 +0000 (21:18 +0000)]
Add a const qualifier.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109266 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoUse the proper type for shift counts. This fixes a bootstrap error.
Dan Gohman [Fri, 23 Jul 2010 21:08:12 +0000 (21:08 +0000)]
Use the proper type for shift counts. This fixes a bootstrap error.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109265 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoIF directory name is empty then try to extract one using absolute file name.
Devang Patel [Fri, 23 Jul 2010 20:36:13 +0000 (20:36 +0000)]
IF directory name is empty then try to extract one using absolute file name.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109262 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoTest case to insure template function declaration refers to correct filename. Radar...
Stuart Hastings [Fri, 23 Jul 2010 20:15:49 +0000 (20:15 +0000)]
Test case to insure template function declaration refers to correct filename.  Radar 8063111.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109258 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdd AVX version of CLMUL instructions
Bruno Cardoso Lopes [Fri, 23 Jul 2010 18:41:12 +0000 (18:41 +0000)]
Add AVX version of CLMUL instructions

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109248 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoDAGCombine (shl (anyext x, c)) to (anyext (shl x, c)) if the high bits
Dan Gohman [Fri, 23 Jul 2010 18:03:30 +0000 (18:03 +0000)]
DAGCombine (shl (anyext x, c)) to (anyext (shl x, c)) if the high bits
are not demanded. This often allows the anyext to be folded away.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109242 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoMake SDNode::dump() print a newline at the end.
Dan Gohman [Fri, 23 Jul 2010 16:37:47 +0000 (16:37 +0000)]
Make SDNode::dump() print a newline at the end.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109234 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agofix constness warnings
Gabor Greif [Fri, 23 Jul 2010 13:28:47 +0000 (13:28 +0000)]
fix constness warnings

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109224 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRevert r109102 for now as it's causing JIT miscompilations.
Eric Christopher [Fri, 23 Jul 2010 12:16:56 +0000 (12:16 +0000)]
Revert r109102 for now as it's causing JIT miscompilations.

I'll try to track down why a bit later.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109223 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agodo not (implicitly) dereference iterator many times, cache it instead
Gabor Greif [Fri, 23 Jul 2010 10:23:01 +0000 (10:23 +0000)]
do not (implicitly) dereference iterator many times, cache it instead

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109222 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRevert 109220.
Eric Christopher [Fri, 23 Jul 2010 08:53:17 +0000 (08:53 +0000)]
Revert 109220.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109221 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoSimplifying use_iterators by dereferencing
Gabor Greif [Fri, 23 Jul 2010 08:36:07 +0000 (08:36 +0000)]
Simplifying use_iterators by dereferencing
is not a good idea. The codebase does not depend
in this any more, and it may introduce hidden
runtime cost. If you get compile errors, please
dereference your iterator before passing to cast<>
(and friends).

Also: please consider caching the result of
operator* and reusing that instead of dereferencing
many times.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109220 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoStringRef'icate.
Mikhail Glushenkov [Fri, 23 Jul 2010 04:19:39 +0000 (04:19 +0000)]
StringRef'icate.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109217 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFormatting.
Mikhail Glushenkov [Fri, 23 Jul 2010 04:19:34 +0000 (04:19 +0000)]
Formatting.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109216 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoGet rid of exceptions in llvmc.
Mikhail Glushenkov [Fri, 23 Jul 2010 03:42:55 +0000 (03:42 +0000)]
Get rid of exceptions in llvmc.

llvmc can be now compiled with llvm-gcc on Windows.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109215 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agogive StringMap a new ctor which allows you to initialize it
Chris Lattner [Fri, 23 Jul 2010 03:29:59 +0000 (03:29 +0000)]
give StringMap a new ctor which allows you to initialize it
with an existing allocator.  The interesting use case of this
is that it allows "StringMap<whatever, BumpPtrAllocator&>" for
when you want to allocate out of a preexisting bump pointer
allocator owned by someone else.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109213 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agomodernize stringset interface
Chris Lattner [Fri, 23 Jul 2010 03:21:53 +0000 (03:21 +0000)]
modernize stringset interface

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109212 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoDeclare CLMUL as a subtarget feature
Bruno Cardoso Lopes [Fri, 23 Jul 2010 01:22:45 +0000 (01:22 +0000)]
Declare CLMUL as a subtarget feature

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109207 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdd x86 CLMUL (Carry-less multiplication) cpu feature
Bruno Cardoso Lopes [Fri, 23 Jul 2010 01:17:51 +0000 (01:17 +0000)]
Add x86 CLMUL (Carry-less multiplication) cpu feature

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109206 91177308-0d34-0410-b5e6-96231b3b80d8

14 years ago80-col.
Eric Christopher [Fri, 23 Jul 2010 01:05:59 +0000 (01:05 +0000)]
80-col.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109205 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdd complete assembler support for FMA3 instructions, with descriptions and encodings...
Bruno Cardoso Lopes [Fri, 23 Jul 2010 00:54:35 +0000 (00:54 +0000)]
Add complete assembler support for FMA3 instructions, with descriptions and encodings taken from the AVX manual

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109204 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoThe only supported calling convention for X86-64 uses
Dale Johannesen [Fri, 23 Jul 2010 00:30:35 +0000 (00:30 +0000)]
The only supported calling convention for X86-64 uses
SSE, so we can't return floating point values if this
is disabled.  Detect this error for clang.

With SSE1 only, f64 is a problem; it can be done, but
neither llvm-gcc nor clang has ever generated correct
code for it.  Since nobody noticed this I think it's
OK to treat it as an error for now.

This also handles SSE-sized vectors of floating point.
82076868204109.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109201 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFix some AVX instructions which didnt had HasAVX prefix. And also a problem with...
Bruno Cardoso Lopes [Fri, 23 Jul 2010 00:14:54 +0000 (00:14 +0000)]
Fix some AVX instructions which didnt had HasAVX prefix. And also a problem with PINSRW, which was totally wrong because of a typo I introduced previously

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109198 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdd an explicit -sdk option to xcrun command.
Bob Wilson [Thu, 22 Jul 2010 23:33:00 +0000 (23:33 +0000)]
Add an explicit -sdk option to xcrun command.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109196 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoWarnings patrol.
Eric Christopher [Thu, 22 Jul 2010 21:51:30 +0000 (21:51 +0000)]
Warnings patrol.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109174 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agomissed a use of SizeRequired.
Chris Lattner [Thu, 22 Jul 2010 21:34:55 +0000 (21:34 +0000)]
missed a use of SizeRequired.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109172 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoeliminate the TargetInstrInfo::GetInstSizeInBytes hook.
Chris Lattner [Thu, 22 Jul 2010 21:27:00 +0000 (21:27 +0000)]
eliminate the TargetInstrInfo::GetInstSizeInBytes hook.
ARM/PPC/MSP430-specific code (which are the only targets that
implement the hook) can directly reference their target-specific
instrinfo classes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109171 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoremove the dwarf sizing stuff which is now dead, it was
Chris Lattner [Thu, 22 Jul 2010 21:20:39 +0000 (21:20 +0000)]
remove the dwarf sizing stuff which is now dead, it was
"yet another" copy of the dwarf EH emission code that was
copied, pasted and slightly hacked up.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109169 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdd remaining AVX instructions (most of them dealing with GR64 destinations. This...
Bruno Cardoso Lopes [Thu, 22 Jul 2010 21:18:49 +0000 (21:18 +0000)]
Add remaining AVX instructions (most of them dealing with GR64 destinations. This complete the assembler support for the general AVX ISA. But we still miss instructions from FMA3 and CLMUL specific feature flags, which are now the next step

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109168 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoremove the JIT "NeedsExactSize" feature and supporting logic.
Chris Lattner [Thu, 22 Jul 2010 21:17:55 +0000 (21:17 +0000)]
remove the JIT "NeedsExactSize" feature and supporting logic.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109167 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoswitch a private implementation of GetFunctionSizeInBytes.
Chris Lattner [Thu, 22 Jul 2010 21:14:33 +0000 (21:14 +0000)]
switch a private implementation of GetFunctionSizeInBytes.
This is probably not the best way to implement "Force LR to
be spilled if the Thumb function size is > 2048." do this,
it should use the branch shortening infrastructure, but I'm
just preserving functionality here.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109165 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRegenerate.
Eric Christopher [Thu, 22 Jul 2010 21:13:48 +0000 (21:13 +0000)]
Regenerate.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109164 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoTry to work around the relative install-sh path problem.
Eric Christopher [Thu, 22 Jul 2010 21:13:40 +0000 (21:13 +0000)]
Try to work around the relative install-sh path problem.

Patch from Eli.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109163 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoX86MCInstLower now depends on AsmPrinter being around.
Chris Lattner [Thu, 22 Jul 2010 21:10:04 +0000 (21:10 +0000)]
X86MCInstLower now depends on AsmPrinter being around.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109154 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoinstead of migrating it to the MC instruction encoder, just
Chris Lattner [Thu, 22 Jul 2010 21:05:13 +0000 (21:05 +0000)]
instead of migrating it to the MC instruction encoder, just
rip out the implementation of X86InstrInfo::GetInstSizeInBytes.
The code being ripped out just implemented a copy and hacked up
version of the (old) instruction encoder, and is buggy and
terrible in other ways.  Since "GetInstSizeInBytes" is really
only there to support the JIT's "NeedsExactSize" hook (which
noone is using), just rip out the code.  I will rip out the
NeedsExactSize hook next.

This resolves rdar://7617809 - switch X86InstrInfo::GetInstSizeInBytes to use X86MCCodeEmitter

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109149 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoSpeculatively revert 109117
Devang Patel [Thu, 22 Jul 2010 18:44:00 +0000 (18:44 +0000)]
Speculatively revert 109117

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109132 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoARMv4 JIT forgets to set the lr register when making a indirect function call. Fixes...
Xerxes Ranby [Thu, 22 Jul 2010 17:28:34 +0000 (17:28 +0000)]
ARMv4 JIT forgets to set the lr register when making a indirect function call. Fixes PR7608

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109125 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agokeep in 80 cols
Gabor Greif [Thu, 22 Jul 2010 17:18:03 +0000 (17:18 +0000)]
keep in 80 cols

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109122 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoMap MDNode correctly.
Devang Patel [Thu, 22 Jul 2010 16:35:00 +0000 (16:35 +0000)]
Map MDNode correctly.
A non function local MDNode can have an operand which is cloned by MapValue().

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109117 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoadd dyn_cast_or_null tests, exclude invalid dyn_cast test
Gabor Greif [Thu, 22 Jul 2010 15:37:20 +0000 (15:37 +0000)]
add dyn_cast_or_null tests, exclude invalid dyn_cast test

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109111 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agotidy up
Gabor Greif [Thu, 22 Jul 2010 15:28:30 +0000 (15:28 +0000)]
tidy up

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109110 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoadd dyn_cast tests and beef up others a bit
Gabor Greif [Thu, 22 Jul 2010 15:24:48 +0000 (15:24 +0000)]
add dyn_cast tests and beef up others a bit

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109109 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agofit in 80 columns
Gabor Greif [Thu, 22 Jul 2010 14:13:14 +0000 (14:13 +0000)]
fit in 80 columns

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109108 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agouse cascading operator-> feature
Gabor Greif [Thu, 22 Jul 2010 13:49:27 +0000 (13:49 +0000)]
use cascading operator-> feature

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109104 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agomass elimination of reliance on automatic iterator dereferencing
Gabor Greif [Thu, 22 Jul 2010 13:36:47 +0000 (13:36 +0000)]
mass elimination of reliance on automatic iterator dereferencing

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109103 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoIncrease the max physreg size. Patch by Pekka Jääskeläinen.
Duncan Sands [Thu, 22 Jul 2010 13:10:14 +0000 (13:10 +0000)]
Increase the max physreg size.  Patch by Pekka Jääskeläinen.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109102 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agosimplify
Gabor Greif [Thu, 22 Jul 2010 13:07:39 +0000 (13:07 +0000)]
simplify

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109101 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agodo not access arguments via low-level interface, do not multiply dereference use_iter...
Gabor Greif [Thu, 22 Jul 2010 13:04:32 +0000 (13:04 +0000)]
do not access arguments via low-level interface, do not multiply dereference use_iterators

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109100 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agopass dereferenced iterator to dyn_cast
Gabor Greif [Thu, 22 Jul 2010 11:48:35 +0000 (11:48 +0000)]
pass dereferenced iterator to dyn_cast

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109099 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agopass dereferenced iterator to dyn_cast
Gabor Greif [Thu, 22 Jul 2010 11:43:44 +0000 (11:43 +0000)]
pass dereferenced iterator to dyn_cast

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109098 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agouse -> instead of (*).
Gabor Greif [Thu, 22 Jul 2010 11:12:32 +0000 (11:12 +0000)]
use -> instead of (*).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109094 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agocache dereferenced iterator
Gabor Greif [Thu, 22 Jul 2010 11:07:46 +0000 (11:07 +0000)]
cache dereferenced iterator

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109093 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoundo 80 column trespassing I caused
Gabor Greif [Thu, 22 Jul 2010 10:37:47 +0000 (10:37 +0000)]
undo 80 column trespassing I caused

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109092 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoMark an assert-only variable as used.
Chandler Carruth [Thu, 22 Jul 2010 08:02:25 +0000 (08:02 +0000)]
Mark an assert-only variable as used.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109091 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFix the generated file name for CMake.
Chandler Carruth [Thu, 22 Jul 2010 08:00:52 +0000 (08:00 +0000)]
Fix the generated file name for CMake.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109090 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdd new RegionInfo pass.
Tobias Grosser [Thu, 22 Jul 2010 07:46:31 +0000 (07:46 +0000)]
Add new RegionInfo pass.

The RegionInfo pass detects single entry single exit regions in a function,
where a region is defined as any subgraph that is connected to the remaining
graph at only two spots.
Furthermore an hierarchical region tree is built.
Use it by calling "opt -regions analyze" or "opt -view-regions".

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109089 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAttempt to fix linking issues with CMake. Please review other CMake users,
Chandler Carruth [Thu, 22 Jul 2010 06:27:45 +0000 (06:27 +0000)]
Attempt to fix linking issues with CMake. Please review other CMake users,
especially on other platforms. Is there a better way to fix this.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109084 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRe-apply r109079 with fix.
Evan Cheng [Thu, 22 Jul 2010 06:24:48 +0000 (06:24 +0000)]
Re-apply r109079 with fix.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109083 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRevert r109079, which broke a lot of CodeGen tests.
Owen Anderson [Thu, 22 Jul 2010 06:01:28 +0000 (06:01 +0000)]
Revert r109079, which broke a lot of CodeGen tests.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109082 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoUpdate CMake files.
Owen Anderson [Thu, 22 Jul 2010 06:00:01 +0000 (06:00 +0000)]
Update CMake files.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109081 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoInitial modifications to MCAssembler and TargetMachine for the MCJIT.
Reid Kleckner [Thu, 22 Jul 2010 05:58:53 +0000 (05:58 +0000)]
Initial modifications to MCAssembler and TargetMachine for the MCJIT.

Patch by Olivier Meurant!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109080 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoInitialize RegLimit only when register pressure is being tracked.
Evan Cheng [Thu, 22 Jul 2010 05:18:41 +0000 (05:18 +0000)]
Initialize RegLimit only when register pressure is being tracked.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109079 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoCustom lower the memory barrier instructions and add support
Eric Christopher [Thu, 22 Jul 2010 02:48:34 +0000 (02:48 +0000)]
Custom lower the memory barrier instructions and add support
for lowering without sse2.  Add a couple of new testcases.

Fixes a few libgomp tests and latent bugs.  Remove a few todos.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109078 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFix constant island pass's handling of tBR_JTr. The offset of the instruction does...
Evan Cheng [Thu, 22 Jul 2010 02:09:47 +0000 (02:09 +0000)]
Fix constant island pass's handling of tBR_JTr. The offset of the instruction does not have to be 4-byte aligned. Rather, it's the offset + 2 that must be aligned since the instruction expands into:
        mov     pc, r1
        .align  2
LJTI0_0_0:
        .long    LBB0_14

This fixes rdar://8213383. No test case since it's not possible to come up with a suitable small one.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109076 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoIf 'other' was empty 'overlapsFrom(other, other.begin());' will segfault. This avoids...
Lang Hames [Thu, 22 Jul 2010 02:05:10 +0000 (02:05 +0000)]
If 'other' was empty 'overlapsFrom(other, other.begin());' will segfault. This avoids that.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109075 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agolit: Add some example tests for previous commit.
Daniel Dunbar [Thu, 22 Jul 2010 00:40:19 +0000 (00:40 +0000)]
lit: Add some example tests for previous commit.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109071 91177308-0d34-0410-b5e6-96231b3b80d8

14 years ago80-columns.
Eric Christopher [Thu, 22 Jul 2010 00:26:08 +0000 (00:26 +0000)]
80-columns.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109070 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoMake fast isel win64-aware w.r.t. call-clobbered regs
Nate Begeman [Thu, 22 Jul 2010 00:09:39 +0000 (00:09 +0000)]
Make fast isel win64-aware w.r.t. call-clobbered regs

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109069 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoMore register pressure aware scheduling work.
Evan Cheng [Wed, 21 Jul 2010 23:53:58 +0000 (23:53 +0000)]
More register pressure aware scheduling work.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109064 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdd more 256-bit forms for a bunch of regular AVX instructions
Bruno Cardoso Lopes [Wed, 21 Jul 2010 23:53:50 +0000 (23:53 +0000)]
Add more 256-bit forms for a bunch of regular AVX instructions
Add 64-bit (GR64) versions of some instructions (which are not
described in their SSE forms, but are described in AVX)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109063 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agolit: Add support for 'REQUIRES: feature-one, feature-two, ...' in the
Daniel Dunbar [Wed, 21 Jul 2010 23:39:57 +0000 (23:39 +0000)]
lit: Add support for 'REQUIRES: feature-one, feature-two, ...' in the
integrated-test formats (sh and tcl style). The particular features which get
recognized are up to the test suite itself to define.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109062 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoMake NamedMDNode not be a subclass of Value, and simplify the interface
Dan Gohman [Wed, 21 Jul 2010 23:38:33 +0000 (23:38 +0000)]
Make NamedMDNode not be a subclass of Value, and simplify the interface
for creating and populating NamedMDNodes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109061 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFixes win64. It was broken by a previous patch where I missed the !isWin64
Rafael Espindola [Wed, 21 Jul 2010 23:19:57 +0000 (23:19 +0000)]
Fixes win64. It was broken by a previous patch where I missed the !isWin64
and then forced every register to be a vr128 on win64.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109060 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdd INSTANTIATE_AG_PASS, which combines RegisterPass<> with RegisterAnalysisGroup...
Owen Anderson [Wed, 21 Jul 2010 23:07:00 +0000 (23:07 +0000)]
Add INSTANTIATE_AG_PASS, which combines RegisterPass<> with RegisterAnalysisGroup<> for pass registration.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109058 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFor ARM/Darwin, add a dwarf entry indicating whether a function is arm or thumb
Jim Grosbach [Wed, 21 Jul 2010 23:03:52 +0000 (23:03 +0000)]
For ARM/Darwin, add a dwarf entry indicating whether a function is arm or thumb
rdar://8202967

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109057 91177308-0d34-0410-b5e6-96231b3b80d8