oota-llvm.git
14 years agoUse realloc instead of malloc+memcpy when growing a POD SmallVector. A smart
Benjamin Kramer [Tue, 8 Jun 2010 11:44:30 +0000 (11:44 +0000)]
Use realloc instead of malloc+memcpy when growing a POD SmallVector. A smart
realloc implementation can try to expand the allocated memory block in-place,
avoiding the copy.

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

14 years agoFlag SPU's function call sequence together.
Kalle Raiskila [Tue, 8 Jun 2010 07:55:16 +0000 (07:55 +0000)]
Flag SPU's function call sequence together.
Discussed here:
http://lists.cs.uiuc.edu/pipermail/llvmdev/2010-June/032107.html

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

14 years agoFix a valgrind error.
Nate Begeman [Tue, 8 Jun 2010 07:11:17 +0000 (07:11 +0000)]
Fix a valgrind error.

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

14 years agoRefine BuiltinsARM.def types a bit, we should do a better job of this to save some...
Nate Begeman [Tue, 8 Jun 2010 06:01:16 +0000 (06:01 +0000)]
Refine BuiltinsARM.def types a bit, we should do a better job of this to save some c++ code in CGBuiltins.

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

14 years agoFix up a comment.
Bob Wilson [Tue, 8 Jun 2010 00:42:08 +0000 (00:42 +0000)]
Fix up a comment.

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

14 years agoARM NEON:
Nate Begeman [Tue, 8 Jun 2010 00:14:42 +0000 (00:14 +0000)]
ARM NEON:
fix vcvt naming
handle vdup, vcombine with generic vector code

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

14 years agoFurther changes for Neon vector shuffles:
Bob Wilson [Mon, 7 Jun 2010 23:53:38 +0000 (23:53 +0000)]
Further changes for Neon vector shuffles:
- change isShuffleMaskLegal to show that all shuffles with 32-bit and 64-bit
  elements are legal
- the Neon shuffle instructions do not support 64-bit elements, but we were
  not checking for that before lowering shuffles to use them
- remove some 64-bit element vduplane patterns that are no longer needed

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

14 years agoFix a mistake in my previous change r105437: don't access operand 2 and assume
Bob Wilson [Mon, 7 Jun 2010 23:48:46 +0000 (23:48 +0000)]
Fix a mistake in my previous change r105437: don't access operand 2 and assume
that it is an immediate before checking that the instruction is an
EXTRACT_SUBREG.

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

14 years agoAdd an svn:ignore.
Dan Gohman [Mon, 7 Jun 2010 23:15:15 +0000 (23:15 +0000)]
Add an svn:ignore.

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

14 years agoAdd some basic debug output.
Dan Gohman [Mon, 7 Jun 2010 22:32:10 +0000 (22:32 +0000)]
Add some basic debug output.

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

14 years agoTweak test for debug/metadata change, update to FileCheck. Radar 7424645.
Stuart Hastings [Mon, 7 Jun 2010 21:50:54 +0000 (21:50 +0000)]
Tweak test for debug/metadata change, update to FileCheck.  Radar 7424645.

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

14 years agoHandle dbg_value instructions (i.e., skip them) when generating IT blocks.
Jim Grosbach [Mon, 7 Jun 2010 21:48:47 +0000 (21:48 +0000)]
Handle dbg_value instructions (i.e., skip them) when generating IT blocks.
rdar://7797940

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

14 years agoPlug a leak in the non-error case by removing one level of indirection.
Nick Lewycky [Mon, 7 Jun 2010 21:42:19 +0000 (21:42 +0000)]
Plug a leak in the non-error case by removing one level of indirection.

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

14 years agoCleanup. Process the dbg_values separately
Jim Grosbach [Mon, 7 Jun 2010 21:28:55 +0000 (21:28 +0000)]
Cleanup. Process the dbg_values separately

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

14 years agoFix this test to work under lit.
Dan Gohman [Mon, 7 Jun 2010 20:58:11 +0000 (20:58 +0000)]
Fix this test to work under lit.

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

14 years agoRun dead type elimination after dead argument elimination.
Dan Gohman [Mon, 7 Jun 2010 20:28:37 +0000 (20:28 +0000)]
Run dead type elimination after dead argument elimination.

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

14 years agoMake bugpoint dead-argument-hacking actually work, and actually test it.
Dan Gohman [Mon, 7 Jun 2010 20:20:33 +0000 (20:20 +0000)]
Make bugpoint dead-argument-hacking actually work, and actually test it.

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

14 years agoUse ->isVoidTy().
Dan Gohman [Mon, 7 Jun 2010 20:19:26 +0000 (20:19 +0000)]
Use ->isVoidTy().

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

14 years agoThe FoldingSet hash data includes pointer values, so it isn't
Dan Gohman [Mon, 7 Jun 2010 19:36:14 +0000 (19:36 +0000)]
The FoldingSet hash data includes pointer values, so it isn't
determinstic. Instead, give SCEV objects an arbitrary sequence
number.

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

14 years agoOptimize this code somewhat by taking advantage of the fact
Dan Gohman [Mon, 7 Jun 2010 19:20:57 +0000 (19:20 +0000)]
Optimize this code somewhat by taking advantage of the fact
that the operands are sorted.

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

14 years agoAnother place where the code wanted to access the argument list and not all of
Bill Wendling [Mon, 7 Jun 2010 19:18:58 +0000 (19:18 +0000)]
Another place where the code wanted to access the argument list and not all of
the operands.

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

14 years agoMicro-optimize this, to speed up this hotspot in debug builds a little.
Dan Gohman [Mon, 7 Jun 2010 19:16:37 +0000 (19:16 +0000)]
Micro-optimize this, to speed up this hotspot in debug builds a little.

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

14 years agoMicro-optimize this.
Dan Gohman [Mon, 7 Jun 2010 19:12:54 +0000 (19:12 +0000)]
Micro-optimize this.

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

14 years agoMove exit check where it really belongs.
Jim Grosbach [Mon, 7 Jun 2010 19:12:21 +0000 (19:12 +0000)]
Move exit check where it really belongs.

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

14 years agoOptimize ScalarEvolution's SCEVComplexityCompare predicate: don't go
Dan Gohman [Mon, 7 Jun 2010 19:06:13 +0000 (19:06 +0000)]
Optimize ScalarEvolution's SCEVComplexityCompare predicate: don't go
scrounging through SCEVUnknown contents and SCEVNAryExpr operands;
instead just do a simple deterministic comparison of the precomputed
hash data.

Also, since this is more precise, it eliminates the need for the slow
N^2 duplicate detection code.

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

14 years agoCreate new accessors to get arguments for call/invoke instructions. It breaks
Bill Wendling [Mon, 7 Jun 2010 19:05:06 +0000 (19:05 +0000)]
Create new accessors to get arguments for call/invoke instructions. It breaks
encapsulation to force the users of these classes to know about the internal
data structure of the Operands structure. It also can lead to errors, like in
the MSIL writer.

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

14 years agoMisc cleanups to the gold plugin.
Rafael Espindola [Mon, 7 Jun 2010 16:45:22 +0000 (16:45 +0000)]
Misc cleanups to the gold plugin.

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

14 years agoclang codegen support
Nate Begeman [Mon, 7 Jun 2010 16:00:37 +0000 (16:00 +0000)]
clang codegen support

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

14 years agoPartial specialization was not checking the callsite to make sure it was using the...
Kenneth Uildriks [Sat, 5 Jun 2010 14:50:21 +0000 (14:50 +0000)]
Partial specialization was not checking the callsite to make sure it was using the same constants as the specialization, leading to calls to the wrong specialization.  Patch by Takumi Nakamura\!

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

14 years agoThis bug is also present in MSVC10. Requested by Elrood on IRC.
Duncan Sands [Sat, 5 Jun 2010 12:40:43 +0000 (12:40 +0000)]
This bug is also present in MSVC10.  Requested by Elrood on IRC.

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

14 years agorevert r105521, which is breaking the buildbots with stuff like this:
Chris Lattner [Sat, 5 Jun 2010 04:17:30 +0000 (04:17 +0000)]
revert r105521, which is breaking the buildbots with stuff like this:

In file included from X86InstrInfo.cpp:16:
X86GenInstrInfo.inc:2789: error: integer constant is too large for 'long' type
X86GenInstrInfo.inc:2790: error: integer constant is too large for 'long' type
X86GenInstrInfo.inc:2792: error: integer constant is too large for 'long' type
X86GenInstrInfo.inc:2793: error: integer constant is too large for 'long' type
X86GenInstrInfo.inc:2808: error: integer constant is too large for 'long' type
X86GenInstrInfo.inc:2809: error: integer constant is too large for 'long' type
X86GenInstrInfo.inc:2816: error: integer constant is too large for 'long' type
X86GenInstrInfo.inc:2817: error: integer constant is too large for 'long' type

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

14 years agoInitial AVX support for some instructions. No patterns matched
Bruno Cardoso Lopes [Sat, 5 Jun 2010 03:53:24 +0000 (03:53 +0000)]
Initial AVX support for some instructions. No patterns matched
yet, only assembly encoding support.

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

14 years agoTeach tablegen to support 'defm' inside multiclasses.
Bruno Cardoso Lopes [Sat, 5 Jun 2010 02:11:52 +0000 (02:11 +0000)]
Teach tablegen to support 'defm' inside multiclasses.

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

14 years agoMake MachineFunctionPass::createPrinterPass private, as no subclasses
Dan Gohman [Sat, 5 Jun 2010 01:19:12 +0000 (01:19 +0000)]
Make MachineFunctionPass::createPrinterPass private, as no subclasses
should be calling it.

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

14 years agoImprovements to tail call code. No functional effect
Dale Johannesen [Sat, 5 Jun 2010 00:51:39 +0000 (00:51 +0000)]
Improvements to tail call code.  No functional effect
unless using -arm-tail-calls.

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

14 years agogetFoldedOffsetOf no longer does anything special with vector types.
Dan Gohman [Sat, 5 Jun 2010 00:47:34 +0000 (00:47 +0000)]
getFoldedOffsetOf no longer does anything special with vector types.

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

14 years agoNo need to special-case structs here; structs are first-class now.
Dan Gohman [Sat, 5 Jun 2010 00:42:29 +0000 (00:42 +0000)]
No need to special-case structs here; structs are first-class now.

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

14 years agoRevert 105492 & 105493 due to a testcase regression. Radar 7424645.
Stuart Hastings [Sat, 5 Jun 2010 00:39:29 +0000 (00:39 +0000)]
Revert 105492 & 105493 due to a testcase regression.  Radar 7424645.

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

14 years agoLSR needs to remember inserted instructions even in postinc mode, because
Dan Gohman [Sat, 5 Jun 2010 00:33:07 +0000 (00:33 +0000)]
LSR needs to remember inserted instructions even in postinc mode, because
there could be multiple subexpressions within a single expansion which
require insert point adjustment. This fixes PR7306.

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

14 years agoFix some liveout handling related to tail calls, see comments.
Dale Johannesen [Sat, 5 Jun 2010 00:30:45 +0000 (00:30 +0000)]
Fix some liveout handling related to tail calls, see comments.
I don't think this ever resulted in problems on x86, but it
would on ARM.

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

14 years agoImplement operator== and operator!= for SetVector.
Dan Gohman [Sat, 5 Jun 2010 00:26:02 +0000 (00:26 +0000)]
Implement operator== and operator!= for SetVector.

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

14 years agotest case for r105504.
Devang Patel [Fri, 4 Jun 2010 23:47:41 +0000 (23:47 +0000)]
test case for r105504.
Radar 8055687.

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

14 years agoRe-apply 105308 with fix.
Evan Cheng [Fri, 4 Jun 2010 23:28:13 +0000 (23:28 +0000)]
Re-apply 105308 with fix.

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

14 years agoDon't track users of undef values; they aren't interesting for
Dan Gohman [Fri, 4 Jun 2010 23:16:05 +0000 (23:16 +0000)]
Don't track users of undef values; they aren't interesting for
register pressure.

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

14 years agoMake if-conversion ignore dbg_value instructions in its analysis. rdar://7797940
Jim Grosbach [Fri, 4 Jun 2010 23:01:26 +0000 (23:01 +0000)]
Make if-conversion ignore dbg_value instructions in its analysis. rdar://7797940

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

14 years agoHandle multi-vector returns and args.
Nate Begeman [Fri, 4 Jun 2010 22:53:30 +0000 (22:53 +0000)]
Handle multi-vector returns and args.

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

14 years agoUpdate docs to reflect new DISubprogram elements.
Devang Patel [Fri, 4 Jun 2010 22:49:55 +0000 (22:49 +0000)]
Update docs to reflect new DISubprogram elements.

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

14 years agoSupport for nested functions/classes in debug output. Radar 7424645.
Stuart Hastings [Fri, 4 Jun 2010 22:36:03 +0000 (22:36 +0000)]
Support for nested functions/classes in debug output.  Radar 7424645.

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

14 years agoCopy location info for current function argument from dbg.declare if respective store...
Devang Patel [Fri, 4 Jun 2010 22:27:30 +0000 (22:27 +0000)]
Copy location info for current function argument from dbg.declare if respective store instruction does not have any location info.

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

14 years agoAdditional fixes to BuiltinsARM.def generator, on to clang codegen.
Nate Begeman [Fri, 4 Jun 2010 21:36:00 +0000 (21:36 +0000)]
Additional fixes to BuiltinsARM.def generator, on to clang codegen.

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

14 years agoMore tail call removal.
Dale Johannesen [Fri, 4 Jun 2010 21:14:24 +0000 (21:14 +0000)]
More tail call removal.

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

14 years agoSkip dbg_value instructions when scanning instructions in register scavenging.
Jim Grosbach [Fri, 4 Jun 2010 20:18:30 +0000 (20:18 +0000)]
Skip dbg_value instructions when scanning instructions in register scavenging.

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

14 years agoFix normalization and de-normalization of non-affine SCEVs.
Dan Gohman [Fri, 4 Jun 2010 19:16:34 +0000 (19:16 +0000)]
Fix normalization and de-normalization of non-affine SCEVs.

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

14 years agoKeep track of the call instructions whose clobber lists were skipped during fast
Jakob Stoklund Olesen [Fri, 4 Jun 2010 18:08:29 +0000 (18:08 +0000)]
Keep track of the call instructions whose clobber lists were skipped during fast
register allocation.

Process all of the clobber lists at the end of the function, marking the
registers as used in MachineRegisterInfo.

This is necessary in case the calls clobber callee-saved registers (sic).

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

14 years agoMore thoroughly disable tails calls by default.
Dale Johannesen [Fri, 4 Jun 2010 18:04:24 +0000 (18:04 +0000)]
More thoroughly disable tails calls by default.
8060143, although this doesn't fix the real problem with tail call.

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

14 years agoAnother fix to prevent debug info from affecting codegen. rdar://7797940
Jim Grosbach [Fri, 4 Jun 2010 17:57:34 +0000 (17:57 +0000)]
Another fix to prevent debug info from affecting codegen. rdar://7797940

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

14 years agoProgress on generating BuiltinsARM.def, still some duplicates to work out.
Nate Begeman [Fri, 4 Jun 2010 07:11:25 +0000 (07:11 +0000)]
Progress on generating BuiltinsARM.def, still some duplicates to work out.

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

14 years agoBuiltinsARM.def emitter, still needs a substantial bit of tweaking to lighten the...
Nate Begeman [Fri, 4 Jun 2010 01:26:15 +0000 (01:26 +0000)]
BuiltinsARM.def emitter, still needs a substantial bit of tweaking to lighten the load on clang.

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

14 years agomore dbg_value adjustments so debug info doesn't affect codegen
Jim Grosbach [Fri, 4 Jun 2010 01:23:30 +0000 (01:23 +0000)]
more dbg_value adjustments so debug info doesn't affect codegen

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

14 years agoFixed a bug during widening where we would avoid legalizing a node. When we
Mon P Wang [Fri, 4 Jun 2010 01:20:10 +0000 (01:20 +0000)]
Fixed a bug during widening where we would avoid legalizing a node.  When we
replace an OpA with a widened OpB, it is possible to get new uses of OpA due to CSE
when recursively updating nodes.  Since OpA has been processed, the new uses are
not examined again.  The patch checks if this occurred and it it did, updates the
new uses of OpA to use OpB.

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

14 years agoRemove more tail calls.
Dale Johannesen [Fri, 4 Jun 2010 01:01:24 +0000 (01:01 +0000)]
Remove more tail calls.

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

14 years agoRemove a tail call, and move some CHECKs to the
Dale Johannesen [Fri, 4 Jun 2010 01:01:04 +0000 (01:01 +0000)]
Remove a tail call, and move some CHECKs to the
functions where they belong.

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

14 years agoMangle __builtin_neon_* names appropriately.
Nate Begeman [Fri, 4 Jun 2010 00:21:41 +0000 (00:21 +0000)]
Mangle __builtin_neon_* names appropriately.
Add skeleton of support for emitting the list of prototypes for BuiltinsARM.def

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

14 years agoNo need to special-case structs here; structs are first-class now.
Dan Gohman [Fri, 4 Jun 2010 00:18:06 +0000 (00:18 +0000)]
No need to special-case structs here; structs are first-class now.

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

14 years agofix typo
Jim Grosbach [Fri, 4 Jun 2010 00:15:00 +0000 (00:15 +0000)]
fix typo

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

14 years agoThis test doesn't need the ssp attribute.
Dan Gohman [Fri, 4 Jun 2010 00:14:48 +0000 (00:14 +0000)]
This test doesn't need the ssp attribute.

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

14 years agoFor NEON vectors with 32- or 64-bit elements, select BUILD_VECTORs and
Bob Wilson [Fri, 4 Jun 2010 00:04:02 +0000 (00:04 +0000)]
For NEON vectors with 32- or 64-bit elements, select BUILD_VECTORs and
VECTOR_SHUFFLEs to REG_SEQUENCE instructions.  The standard ISD::BUILD_VECTOR
node corresponds closely to REG_SEQUENCE but I couldn't use it here because
its operands do not get legalized.  That is pretty awful, but I guess it
makes sense for other targets.  Instead, I have added an ARM-specific version
of BUILD_VECTOR that will have its operands properly legalized.
This fixes the rest of Radar 7872877.

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

14 years agoRemove tail call. A tail call version will follow.
Dale Johannesen [Fri, 4 Jun 2010 00:03:37 +0000 (00:03 +0000)]
Remove tail call.  A tail call version will follow.

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

14 years agoAdd some missing checks in TwoAddressInstructionPass::CoalesceExtSubRegs.
Bob Wilson [Thu, 3 Jun 2010 23:53:58 +0000 (23:53 +0000)]
Add some missing checks in TwoAddressInstructionPass::CoalesceExtSubRegs.
Check that all the instructions are in the same basic block, that the
EXTRACT_SUBREGs write to the same subregs that are being extracted, and that
the source and destination registers are in the same regclass.  Some of
these constraints can be relaxed with a bit more work.  Jakob suggested
that the loop that checks for subregs when NewSubIdx != 0 should use the
"nodbg" iterator, so I made that change here, too.

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

14 years agoCleanup 80-column and trim trailing whitespace
Jim Grosbach [Thu, 3 Jun 2010 23:49:57 +0000 (23:49 +0000)]
Cleanup 80-column and trim trailing whitespace

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

14 years agoTeach the ARM load-store optimizer to deal with dbg_value instructions.
Jim Grosbach [Thu, 3 Jun 2010 22:41:15 +0000 (22:41 +0000)]
Teach the ARM load-store optimizer to deal with dbg_value instructions.

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

14 years agoRemove tail call to preserve this test. A tail
Dale Johannesen [Thu, 3 Jun 2010 21:57:48 +0000 (21:57 +0000)]
Remove tail call to preserve this test.  A tail
call version will follow.

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

14 years agoMake this test not use tail calls. A tail call
Dale Johannesen [Thu, 3 Jun 2010 21:53:01 +0000 (21:53 +0000)]
Make this test not use tail calls.  A tail call
version will follow.

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

14 years agoAdd some additional capabilities to the neon emitter
Nate Begeman [Thu, 3 Jun 2010 21:35:22 +0000 (21:35 +0000)]
Add some additional capabilities to the neon emitter

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

14 years agoAdd a emit-llvm option to the plugin and make the path argument to also-emit-llvm...
Rafael Espindola [Thu, 3 Jun 2010 21:11:20 +0000 (21:11 +0000)]
Add a emit-llvm option to the plugin and make the path argument to also-emit-llvm optional.

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

14 years agoEarly implementation of tail call for ARM.
Dale Johannesen [Thu, 3 Jun 2010 21:09:53 +0000 (21:09 +0000)]
Early implementation of tail call for ARM.
A temporary flag -arm-tail-calls defaults to off,
so there is no functional change by default.
Intrepid users may try this; simple cases work
but there are bugs.

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

14 years agoFix SimplifyDemandedBits' AssertZext logic to demand all the bits. It
Dan Gohman [Thu, 3 Jun 2010 20:21:33 +0000 (20:21 +0000)]
Fix SimplifyDemandedBits' AssertZext logic to demand all the bits. It
needs to demand the high bits because it's asserting that they're zero.

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

14 years agoRevert 105308.
Bob Wilson [Thu, 3 Jun 2010 18:28:31 +0000 (18:28 +0000)]
Revert 105308.

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

14 years agoPerfer !string.empty() over string != "".
Nick Lewycky [Thu, 3 Jun 2010 17:13:23 +0000 (17:13 +0000)]
Perfer !string.empty() over string != "".

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

14 years agoForgot to update the most important part of the gtest modifications readme.
Benjamin Kramer [Thu, 3 Jun 2010 17:11:49 +0000 (17:11 +0000)]
Forgot to update the most important part of the gtest modifications readme.

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

14 years agoWhitespace cleanup.
Nick Lewycky [Thu, 3 Jun 2010 17:10:17 +0000 (17:10 +0000)]
Whitespace cleanup.

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

14 years agoDisable pthread support in googletest if llvm was configured without threads.
Benjamin Kramer [Thu, 3 Jun 2010 15:17:04 +0000 (15:17 +0000)]
Disable pthread support in googletest if llvm was configured without threads.

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

14 years agoDon't preserve all symbols in a .so and instead trust gold to know what is
Rafael Espindola [Thu, 3 Jun 2010 14:45:44 +0000 (14:45 +0000)]
Don't preserve all symbols in a .so and instead trust gold to know what is
needed. The result is that now we are able to drop unnecessary symbol from
shared libraries.

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

14 years agoMachine sink could potentially sink instructions into a block where the physical
Bill Wendling [Thu, 3 Jun 2010 07:54:20 +0000 (07:54 +0000)]
Machine sink could potentially sink instructions into a block where the physical
registers it defines then interfere with an existing preg live range.

For instance, if we had something like these machine instructions:

BB#0
  ... = imul ... EFLAGS<imp-def,dead>
  test ..., EFLAGS<imp-def>
  jcc BB#2 EFLAGS<imp-use>

BB#1
  ... ; fallthrough to BB#2

BB#2
  ... ; No code that defines EFLAGS
  jcc ... EFLAGS<imp-use>

Machine sink will come along, see that imul implicitly defines EFLAGS, but
because it's "dead", it assumes that it can move imul into BB#2. But when it
does, imul's "dead" imp-def of EFLAGS is raised from the dead (a zombie) and
messes up the condition code for the jump (and pretty much anything else which
relies upon it being correct).

The solution is to know which pregs are live going into a basic block. However,
that information isn't calculated at this point. Nor does the LiveVariables pass
take into account non-allocatable physical registers. In lieu of this, we do a
*very* conservative pass through the basic block to determine if a preg is live
coming out of it.

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

14 years agoTurns out gtest still prefers the system <tr1/tuple> over it's own
Benjamin Kramer [Thu, 3 Jun 2010 07:51:58 +0000 (07:51 +0000)]
Turns out gtest still prefers the system <tr1/tuple> over it's own
implementation. Force the internal one to unbreak clang selfhost on linux.

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

14 years agoAdd first pass at darwin tls compiler support.
Eric Christopher [Thu, 3 Jun 2010 04:07:48 +0000 (04:07 +0000)]
Add first pass at darwin tls compiler support.

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

14 years agoarm_neon.h now makes it through clang and generates appropriate code for those functi...
Nate Begeman [Thu, 3 Jun 2010 04:04:09 +0000 (04:04 +0000)]
arm_neon.h now makes it through clang and generates appropriate code for those functions which can use
generic vector operators rather than __builtin_neon_*

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

14 years agoOne underscore, not two.
Eric Christopher [Thu, 3 Jun 2010 04:02:59 +0000 (04:02 +0000)]
One underscore, not two.

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

14 years agoImplement expansion in type legalization for add/sub with overflow. The
Eli Friedman [Thu, 3 Jun 2010 03:49:50 +0000 (03:49 +0000)]
Implement expansion in type legalization for add/sub with overflow.  The
expansion is the same as that used by LegalizeDAG.

The resulting code sucks in terms of performance/codesize on x86-32 for a
64-bit operation; I haven't looked into whether different expansions might be
better in general.

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

14 years agoRemove some already-fixed README entries.
Eli Friedman [Thu, 3 Jun 2010 01:47:31 +0000 (01:47 +0000)]
Remove some already-fixed README entries.

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

14 years agoRemove README entry which no longer compiles to something sane.
Eli Friedman [Thu, 3 Jun 2010 01:16:51 +0000 (01:16 +0000)]
Remove README entry which no longer compiles to something sane.

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

14 years agoRemove a fixed item, update a couple partially-fixed items.
Eli Friedman [Thu, 3 Jun 2010 01:01:48 +0000 (01:01 +0000)]
Remove a fixed item, update a couple partially-fixed items.

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

14 years agoUse the fast register allocator by default for -O0 builds.
Jakob Stoklund Olesen [Thu, 3 Jun 2010 00:39:06 +0000 (00:39 +0000)]
Use the fast register allocator by default for -O0 builds.

This affects both llvm-gcc and clang.

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

14 years agoUse readsWritesVirtualRegister instead of counting uses and defs when inserting
Jakob Stoklund Olesen [Thu, 3 Jun 2010 00:07:47 +0000 (00:07 +0000)]
Use readsWritesVirtualRegister instead of counting uses and defs when inserting
spills and reloads.

This means that a partial define of a register causes a reload so the other
parts of the register are preserved.

The reload can be prevented by adding an <imp-def> operand for the full
register. This is already done by the coalescer and live interval analysis where
relevant.

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

14 years agoAdd full register <imp-def> operands when the coalescer is creating partial
Jakob Stoklund Olesen [Wed, 2 Jun 2010 23:22:11 +0000 (23:22 +0000)]
Add full register <imp-def> operands when the coalescer is creating partial
register updates.

These operands tell the spiller that the other parts of the partially defined
register are don't-care, and a reload is not necessary.

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

14 years agoSpeedup bitcode writer. Do not walk all values for all functions to emit function...
Devang Patel [Wed, 2 Jun 2010 23:05:04 +0000 (23:05 +0000)]
Speedup bitcode writer. Do not walk all values for all functions to emit function local metadata. In one testcase, probably worst case scenario, the 70x speed up is seen.

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

14 years agoCompulsive reformating. No functionalitical changes.
Bill Wendling [Wed, 2 Jun 2010 23:04:26 +0000 (23:04 +0000)]
Compulsive reformating. No functionalitical changes.

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

14 years agoSlightly change the meaning of the reMaterialize target hook when the original
Jakob Stoklund Olesen [Wed, 2 Jun 2010 22:47:25 +0000 (22:47 +0000)]
Slightly change the meaning of the reMaterialize target hook when the original
instruction defines subregisters.

Any existing subreg indices on the original instruction are preserved or
composed with the new subreg index.

Also substitute multiple operands mentioning the original register by using the
new MachineInstr::substituteRegister() function. This is necessary because there
will soon be <imp-def> operands added to non read-modify-write partial
definitions. This instruction:

  %reg1234:foo = FLAP %reg1234<imp-def>

will reMaterialize(%reg3333, bar) like this:

  %reg3333:bar-foo = FLAP %reg333:bar<imp-def>

Finally, replace the TargetRegisterInfo pointer argument with a reference to
indicate that it cannot be NULL.

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

14 years agoUpdate Readme and Makefiles for the new gtest.
Benjamin Kramer [Wed, 2 Jun 2010 22:02:57 +0000 (22:02 +0000)]
Update Readme and Makefiles for the new gtest.

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

14 years agoMerge gtest-1.5.0.
Benjamin Kramer [Wed, 2 Jun 2010 22:02:30 +0000 (22:02 +0000)]
Merge gtest-1.5.0.

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