oota-llvm.git
12 years agoUpdate CMake library dependencies
Oscar Fuentes [Thu, 7 Jul 2011 16:33:00 +0000 (16:33 +0000)]
Update CMake library dependencies

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

12 years agoFix CMake build
Douglas Gregor [Thu, 7 Jul 2011 15:59:22 +0000 (15:59 +0000)]
Fix CMake build

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

12 years agoThe VMLA instruction and its friends are not actually fused; they're plain old
Cameron Zwarich [Thu, 7 Jul 2011 08:28:52 +0000 (08:28 +0000)]
The VMLA instruction and its friends are not actually fused; they're plain old
multiply-accumulate instructions with separate rounding steps.

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

12 years agoSink feature IsThumb into MC layer.
Evan Cheng [Thu, 7 Jul 2011 08:26:46 +0000 (08:26 +0000)]
Sink feature IsThumb into MC layer.

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

12 years agoFeature bits are 64-bits.
Evan Cheng [Thu, 7 Jul 2011 07:45:49 +0000 (07:45 +0000)]
Feature bits are 64-bits.

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

12 years agoCompute feature bits at time of MCSubtargetInfo initialization.
Evan Cheng [Thu, 7 Jul 2011 07:07:08 +0000 (07:07 +0000)]
Compute feature bits at time of MCSubtargetInfo initialization.

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

12 years agotype can be null
Chris Lattner [Thu, 7 Jul 2011 05:29:18 +0000 (05:29 +0000)]
type can be null

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

12 years agouse a more efficient check for 'is metadata'
Chris Lattner [Thu, 7 Jul 2011 05:12:37 +0000 (05:12 +0000)]
use a more efficient check for 'is metadata'

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

12 years agoUse ArrayRef instead of a std::vector&.
Bill Wendling [Thu, 7 Jul 2011 04:42:01 +0000 (04:42 +0000)]
Use ArrayRef instead of a std::vector&.

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

12 years agoAdd functions 'hasPredecessor' and 'hasPredecessorHelper' to SDNode. The
Lang Hames [Thu, 7 Jul 2011 04:31:51 +0000 (04:31 +0000)]
Add functions 'hasPredecessor' and 'hasPredecessorHelper' to SDNode. The
hasPredecessorHelper function allows predecessors to be cached to speed up
repeated invocations. This fixes PR10186.

X.isPredecessorOf(Y) now just calls Y.hasPredecessor(X)

Y.hasPredecessor(X) calls Y.hasPredecessorHelper(X, Visited, Worklist) with
empty Visited and Worklist sets (i.e. no caching over invocations).

Y.hasPredecessorHelper(X, Visited, Worklist) caches search state in Visited
and Worklist to speed up repeated calls. The Visited set is searched for X
before going to the worklist to further search the DAG if necessary.

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

12 years agoChange some ARM subtarget features to be single bit yes/no in order to sink them...
Evan Cheng [Thu, 7 Jul 2011 03:55:05 +0000 (03:55 +0000)]
Change some ARM subtarget features to be single bit yes/no in order to sink them down to MC layer. Also fix tests.

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

12 years agoAdd a target hook to encode the compact unwind information.
Bill Wendling [Thu, 7 Jul 2011 00:54:13 +0000 (00:54 +0000)]
Add a target hook to encode the compact unwind information.

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

12 years agoAdd isCodeGenOnly value to the CodeGenInstruction class.
Jim Grosbach [Thu, 7 Jul 2011 00:48:02 +0000 (00:48 +0000)]
Add isCodeGenOnly value to the CodeGenInstruction class.

So users of a CGI don't have to look up the value directly from the original
Record; just like the rest of the convenience values in the class.

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

12 years agoAdded a testcase for PR10220.
Lang Hames [Thu, 7 Jul 2011 00:36:02 +0000 (00:36 +0000)]
Added a testcase for PR10220.

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

12 years agoAdd DEBUG messages.
Devang Patel [Thu, 7 Jul 2011 00:14:27 +0000 (00:14 +0000)]
Add DEBUG messages.

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

12 years agoFactor ARM triple parsing out of ARMSubtarget. Another step towards making ARM subtar...
Evan Cheng [Thu, 7 Jul 2011 00:08:19 +0000 (00:08 +0000)]
Factor ARM triple parsing out of ARMSubtarget. Another step towards making ARM subtarget info available to MC.

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

12 years agoUse DBG_VALUE location while inserting DBG_VALUE during alloca promotion.
Devang Patel [Thu, 7 Jul 2011 00:05:58 +0000 (00:05 +0000)]
Use DBG_VALUE location while inserting DBG_VALUE during alloca promotion.

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

12 years agoFix a bug in the "expect" intrinsic lowering.
Jakub Staszak [Wed, 6 Jul 2011 23:50:16 +0000 (23:50 +0000)]
Fix a bug in the "expect" intrinsic lowering.

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

12 years agoWhen tail-merging multiple blocks, make sure to correctly update the live-in list...
Eli Friedman [Wed, 6 Jul 2011 23:41:48 +0000 (23:41 +0000)]
When tail-merging multiple blocks, make sure to correctly update the live-in list on the merged block to correctly account for the live-outs of all the predecessors.  They might not be the same in all cases (the testcase I have involves a PHI node where one of the operands is an IMPLICIT_DEF).

Unfortunately, the testcase I have is large and confidential, so I don't have a test to commit at the moment; I'll see if I can come up with something smaller where this issue reproduces.

<rdar://problem/9716278>

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

12 years agoTypo.
Jim Grosbach [Wed, 6 Jul 2011 23:38:13 +0000 (23:38 +0000)]
Typo.

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

12 years agoRemove dead code.
Devang Patel [Wed, 6 Jul 2011 23:26:18 +0000 (23:26 +0000)]
Remove dead code.

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

12 years agoTypo.
Devang Patel [Wed, 6 Jul 2011 23:09:51 +0000 (23:09 +0000)]
Typo.

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

12 years agoClean up the #includes.
Bill Wendling [Wed, 6 Jul 2011 22:52:32 +0000 (22:52 +0000)]
Clean up the #includes.

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

12 years agoGrammar and 80-col.
Eric Christopher [Wed, 6 Jul 2011 22:41:18 +0000 (22:41 +0000)]
Grammar and 80-col.

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

12 years agoFix a subtle issue in SmallVector. The following code did not work as expected:
Owen Anderson [Wed, 6 Jul 2011 22:36:59 +0000 (22:36 +0000)]
Fix a subtle issue in SmallVector.  The following code did not work as expected:
  vec.insert(vec.begin(), vec[3]);
The issue was that vec[3] returns a reference into the vector, which is invalidated when insert() memmove's the elements down to make space.  The method needs to specifically detect and handle this case to correctly match std::vector's semantics.

Thanks to Howard Hinnant for clarifying the correct behavior, and explaining how std::vector solves this problem.

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

12 years agoHandle cases where multiple dbg.declare and dbg.value intrinsics are tied to one...
Devang Patel [Wed, 6 Jul 2011 22:06:11 +0000 (22:06 +0000)]
Handle cases where multiple dbg.declare and dbg.value intrinsics are tied to one alloca.

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

12 years agoAdd ARM MC registry routines.
Evan Cheng [Wed, 6 Jul 2011 22:02:34 +0000 (22:02 +0000)]
Add ARM MC registry routines.

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

12 years agoRename files for consistency.
Evan Cheng [Wed, 6 Jul 2011 22:01:53 +0000 (22:01 +0000)]
Rename files for consistency.

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

12 years agoAdd ImmutableList::contains(). Patch by Rui Paulo!
Nick Lewycky [Wed, 6 Jul 2011 21:59:48 +0000 (21:59 +0000)]
Add ImmutableList::contains(). Patch by Rui Paulo!

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

12 years agoMark ARM pseudo-instructions as isPseudo.
Jim Grosbach [Wed, 6 Jul 2011 21:35:46 +0000 (21:35 +0000)]
Mark ARM pseudo-instructions as isPseudo.

This allows us to remove the (bogus and unneeded) encoding information from
the pseudo-instruction class definitions. All of the pseudos that haven't
been converted yet and still need encoding information instance from the normal
instruction classes and explicitly set isCodeGenOnly, and so are distinct
from this change.

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

12 years agoDon't require pseudo-instructions to carry encoding information.
Jim Grosbach [Wed, 6 Jul 2011 21:33:38 +0000 (21:33 +0000)]
Don't require pseudo-instructions to carry encoding information.

For now this is distinct from isCodeGenOnly, as code-gen-only
instructions can (and often do) still have encoding information
associated with them. Once we've migrated all of them over to true
pseudo-instructions that are lowered to real instructions prior to
the printer/emitter, we can remove isCodeGenOnly and just use isPseudo.

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

12 years agoSimplify. Consolidate dbg.declare handling in AllocaPromoter.
Devang Patel [Wed, 6 Jul 2011 21:09:55 +0000 (21:09 +0000)]
Simplify. Consolidate dbg.declare handling in AllocaPromoter.

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

12 years agoindvars -disable-iv-rewrite: ExprToMap lives in Pass data, so be more
Andrew Trick [Wed, 6 Jul 2011 21:07:10 +0000 (21:07 +0000)]
indvars -disable-iv-rewrite: ExprToMap lives in Pass data, so be more
careful about referencing values.

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

12 years agoRemove un-used encoding info from Pseudo MLAv5.
Jim Grosbach [Wed, 6 Jul 2011 20:57:35 +0000 (20:57 +0000)]
Remove un-used encoding info from Pseudo MLAv5.

Pseudo-instructions don't have encoding information, as they're lowered
to real instructions by the time we're doing binary encoding.

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

12 years agoFix missing triple support for RTEMS target.
Eli Friedman [Wed, 6 Jul 2011 20:56:26 +0000 (20:56 +0000)]
Fix missing triple support for RTEMS target.

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

12 years agoindvars -disable-iv-rewrite: Added SimplifyCongruentIVs.
Andrew Trick [Wed, 6 Jul 2011 20:50:43 +0000 (20:50 +0000)]
indvars -disable-iv-rewrite: Added SimplifyCongruentIVs.

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

12 years agoRemove some unnecessary includes.
Eli Friedman [Wed, 6 Jul 2011 20:48:27 +0000 (20:48 +0000)]
Remove some unnecessary includes.

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

12 years agoConstify getCompactUnwindRegNum.
Bill Wendling [Wed, 6 Jul 2011 20:33:48 +0000 (20:33 +0000)]
Constify getCompactUnwindRegNum.

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

12 years agocreateMCInstPrinter doesn't need TargetMachine anymore.
Evan Cheng [Wed, 6 Jul 2011 19:45:42 +0000 (19:45 +0000)]
createMCInstPrinter doesn't need TargetMachine anymore.

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

12 years agoLICM: Remove trailing white spaces
Tobias Grosser [Wed, 6 Jul 2011 19:20:02 +0000 (19:20 +0000)]
LICM: Remove trailing white spaces

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

12 years agoLICM: Do not loose alignment on promotion
Tobias Grosser [Wed, 6 Jul 2011 19:19:55 +0000 (19:19 +0000)]
LICM: Do not loose alignment on promotion

The promotion code lost any alignment information, when hoisting loads and
stores out of the loop. This lead to incorrect aligned memory accesses. We now
use the largest alignment we can prove to be correct.

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

12 years agoAdd documenation about "branch_weight" metadata and __builtin_expect instruction
Jakub Staszak [Wed, 6 Jul 2011 18:31:02 +0000 (18:31 +0000)]
Add documenation about "branch_weight" metadata and __builtin_expect instruction

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

12 years agoIntroduce "expect" intrinsic instructions.
Jakub Staszak [Wed, 6 Jul 2011 18:22:43 +0000 (18:22 +0000)]
Introduce "expect" intrinsic instructions.

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

12 years agoUpdate MC/ELF/relocation.s with change to X86 PUSH64i8 in r134501.
Kevin Enderby [Wed, 6 Jul 2011 17:55:20 +0000 (17:55 +0000)]
Update MC/ELF/relocation.s with change to X86 PUSH64i8 in r134501.

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

12 years agoChanged the X86 PUSH64i8 record to use the i64i8imm ParserMatchClass so that a
Kevin Enderby [Wed, 6 Jul 2011 17:23:46 +0000 (17:23 +0000)]
Changed the X86 PUSH64i8 record to use the i64i8imm ParserMatchClass so that a
push with a small constant produces a 2-byte push.

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

12 years agoAllow tagless builds and fix debug build configuration.
David Greene [Wed, 6 Jul 2011 16:54:14 +0000 (16:54 +0000)]
Allow tagless builds and fix debug build configuration.

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

12 years agoRemove the AsmWriterEmitter (unused) feature that rely on TargetSubtargetInfo.
Evan Cheng [Wed, 6 Jul 2011 02:02:33 +0000 (02:02 +0000)]
Remove the AsmWriterEmitter (unused) feature that rely on TargetSubtargetInfo.

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

12 years agoRevert r134366 and add an explicit triple to make this test host-independent.
Dan Gohman [Tue, 5 Jul 2011 22:09:19 +0000 (22:09 +0000)]
Revert r134366 and add an explicit triple to make this test host-independent.

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

12 years agoRemove the ObjC ARC passes from the default optimization list, and add
Dan Gohman [Tue, 5 Jul 2011 22:01:44 +0000 (22:01 +0000)]
Remove the ObjC ARC passes from the default optimization list, and add
extension points to be used by clang.

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

12 years agoPreserve debug loc.
Devang Patel [Tue, 5 Jul 2011 21:48:22 +0000 (21:48 +0000)]
Preserve debug loc.

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

12 years agoSpeculatively revert r134431.
Devang Patel [Tue, 5 Jul 2011 21:16:28 +0000 (21:16 +0000)]
Speculatively revert r134431.

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

12 years agoUse memcmp.
Benjamin Kramer [Tue, 5 Jul 2011 20:28:00 +0000 (20:28 +0000)]
Use memcmp.

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

12 years agoReally fix typo :-(
Rafael Espindola [Tue, 5 Jul 2011 19:17:10 +0000 (19:17 +0000)]
Really fix typo :-(

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

12 years agoFix typo.
Rafael Espindola [Tue, 5 Jul 2011 19:13:27 +0000 (19:13 +0000)]
Fix typo.

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

12 years agoClear debug loc while updating insert point.
Devang Patel [Tue, 5 Jul 2011 18:58:22 +0000 (18:58 +0000)]
Clear debug loc while updating insert point.

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

12 years agoBy default mkstemp() creates a temporary file with mode 0600, but the mode
Chad Rosier [Tue, 5 Jul 2011 18:55:31 +0000 (18:55 +0000)]
By default mkstemp() creates a temporary file with mode 0600, but the mode
used for open is 0666.  Therefore, add the necessary permission bits for
consistency.
rdar://8621462

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

12 years agoBreak infinite loop when the Hopfield network oscillates.
Jakob Stoklund Olesen [Tue, 5 Jul 2011 18:46:42 +0000 (18:46 +0000)]
Break infinite loop when the Hopfield network oscillates.

This is impossible in theory, I can prove it. In practice, our near-zero
threshold can cause the network to oscillate between equally good
solutions.

<rdar://problem/9720596>

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

12 years agoCompare all 4 bytes of the header.
Rafael Espindola [Tue, 5 Jul 2011 18:41:47 +0000 (18:41 +0000)]
Compare all 4 bytes of the header.

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

12 years agoAdd assembler/disassembler support for non-AVX pclmulqdq. While I'm here, use proper...
Eli Friedman [Tue, 5 Jul 2011 18:21:20 +0000 (18:21 +0000)]
Add assembler/disassembler support for non-AVX pclmulqdq. While I'm here, use proper aliases for the pclmullqlqdq and friends. PR10269.

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

12 years agoindvars -disable-iv-rewrite: avoid multiple IVs in weird cases.
Andrew Trick [Tue, 5 Jul 2011 18:19:39 +0000 (18:19 +0000)]
indvars -disable-iv-rewrite: avoid multiple IVs in weird cases.

Putting back the helper that I removed on 7/1 to do this right.

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

12 years agoARM estimateStackSize() needs to account for simplified call frames.
Jim Grosbach [Tue, 5 Jul 2011 16:05:50 +0000 (16:05 +0000)]
ARM estimateStackSize() needs to account for simplified call frames.

If the function allocates reserved stack space for callee argument frames,
estimateStackSize() needs to account for that, as it doesn't show up as
ordinary frame objects. Otherwise, a callee with a large argument list will
throw off the calculations for whether to allocate an emergency spill slot
and we get assert() failures in the register scavenger.

rdar://9715469

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

12 years agoFix PR10277.
Jakob Stoklund Olesen [Tue, 5 Jul 2011 15:38:41 +0000 (15:38 +0000)]
Fix PR10277.

Remat during spilling triggers dead code elimination. If a phi-def
becomes unused, that may also cause live ranges to split into separate
connected components.

This type of splitting is different from normal live range splitting. In
particular, there may not be a common original interval.

When the split range is its own original, make sure that the new
siblings are also their own originals. The range being split cannot be
used as an original since it doesn't cover the new siblings.

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

12 years agoTweak comment and debug output.
Jakob Stoklund Olesen [Tue, 5 Jul 2011 15:38:37 +0000 (15:38 +0000)]
Tweak comment and debug output.

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

12 years agoFix 80-col.
Michael J. Spencer [Tue, 5 Jul 2011 14:49:08 +0000 (14:49 +0000)]
Fix 80-col.

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

12 years agoFix warnings.
Michael J. Spencer [Tue, 5 Jul 2011 14:48:59 +0000 (14:48 +0000)]
Fix warnings.

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

12 years agoSuccIterator on bbs without terminator insts
Tobias Grosser [Mon, 4 Jul 2011 23:09:02 +0000 (23:09 +0000)]
SuccIterator on bbs without terminator insts

Remove the assert that triggers if SuccIterator is constructed for a basic block
without a terminator instruction. Instead of triggering an assert a succ_end()
iterator is returned. This models a basic block with zero successors and allows
us to use F->viewCFG() on incompletely constructed functions.

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

12 years agoPR10267: Don't combine an equality compare with an AND into an inequality compare...
Benjamin Kramer [Mon, 4 Jul 2011 20:16:36 +0000 (20:16 +0000)]
PR10267: Don't combine an equality compare with an AND into an inequality compare when the AND has more than one use.

This can pessimize code, inequalities are generally more expensive.

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

12 years agoRemove accidentaly left node from previous iteration of the patch.
Roman Divacky [Mon, 4 Jul 2011 15:42:45 +0000 (15:42 +0000)]
Remove accidentaly left node from previous iteration of the patch.

Noticed by Benjamin Kramer!

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

12 years agoMove early tail duplication earlier.
Rafael Espindola [Mon, 4 Jul 2011 04:54:22 +0000 (04:54 +0000)]
Move early tail duplication earlier.

This fixes the issue noted in PR10251 where early tail dup of bbs with
indirectbr would cause a bb to be duplicated into a loop preheader
and then into its predecessors, creating phi nodes with identical
operands just before register allocation.

This helps with jsinterp.o size (__TEXT goes from 163568 to 126656)
and a bit with performance 1.005x faster on sunspider (jits still enabled).

The result on webkit with the jit disabled is more significant: 1.021x faster.

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

12 years agoMove most of the pre BB code to TailDuplicateAndUpdate. Change the
Rafael Espindola [Mon, 4 Jul 2011 01:21:42 +0000 (01:21 +0000)]
Move most of the pre BB code to TailDuplicateAndUpdate. Change the
HasIndirectbr variable to be just that. No functionality change.

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

12 years agoReduce indentation and fix the count of how many PHIs we have inserted.
Rafael Espindola [Mon, 4 Jul 2011 00:13:36 +0000 (00:13 +0000)]
Reduce indentation and fix the count of how many PHIs we have inserted.

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

12 years agoFix PR10244.
Jakob Stoklund Olesen [Mon, 4 Jul 2011 00:05:28 +0000 (00:05 +0000)]
Fix PR10244.

A split point inserted in a block with a landing pad successor may be
hoisted above the call to ensure that it dominates all successors. The
code that handles the rest of the basic block must take this into
account.

I am not including a test case, it would be very fragile. PR10244 comes
from building clang with exceptions enabled.

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

12 years agoMake the i64 and f64 be 64bit ABI aligned in the target description.
Roman Divacky [Sun, 3 Jul 2011 16:24:07 +0000 (16:24 +0000)]
Make the i64 and f64 be 64bit ABI aligned in the target description.
This is what both the ABI and clang says.

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

12 years agotest/CodeGen/X86/lsr-nonaffine.ll: Relax expressions for Win64 CC to appease Win32...
NAKAMURA Takumi [Sun, 3 Jul 2011 09:26:14 +0000 (09:26 +0000)]
test/CodeGen/X86/lsr-nonaffine.ll: Relax expressions for Win64 CC to appease Win32 hosts.

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

12 years agoFix an easy fixme.
Rafael Espindola [Sun, 3 Jul 2011 05:26:42 +0000 (05:26 +0000)]
Fix an easy fixme.

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

12 years agoFileCheck-ize another test. Reduces the llc invocations from 8 to 1, and
Chandler Carruth [Sat, 2 Jul 2011 21:34:52 +0000 (21:34 +0000)]
FileCheck-ize another test. Reduces the llc invocations from 8 to 1, and
makes one of the tests actually mean something (as the string 'add' will
always appear in the output of this file).

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

12 years agoAvoid writing to an arbitrary filename during the test run by writing to
Chandler Carruth [Sat, 2 Jul 2011 20:43:18 +0000 (20:43 +0000)]
Avoid writing to an arbitrary filename during the test run by writing to
a file descriptor.

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

12 years agoFileCheck-ize another X86 test, making it more precisely verify the
Chandler Carruth [Sat, 2 Jul 2011 20:43:16 +0000 (20:43 +0000)]
FileCheck-ize another X86 test, making it more precisely verify the
desired result based on the comments in the file.

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

12 years agoQuote two greps which contain parentheses.
Chandler Carruth [Sat, 2 Jul 2011 20:43:13 +0000 (20:43 +0000)]
Quote two greps which contain parentheses.

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

12 years agoFileCheck-ize and simplify RUN lines.
Chandler Carruth [Sat, 2 Jul 2011 20:43:11 +0000 (20:43 +0000)]
FileCheck-ize and simplify RUN lines.

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

12 years agoFileCheck-ize
Chandler Carruth [Sat, 2 Jul 2011 20:43:08 +0000 (20:43 +0000)]
FileCheck-ize

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

12 years agoFileCheck-ize and tighten up assertions to only check the relevant sections.
Chandler Carruth [Sat, 2 Jul 2011 20:43:04 +0000 (20:43 +0000)]
FileCheck-ize and tighten up assertions to only check the relevant sections.

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

12 years agoFileCheck-ize and cleanup IR.
Chandler Carruth [Sat, 2 Jul 2011 20:43:01 +0000 (20:43 +0000)]
FileCheck-ize and cleanup IR.

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

12 years agoFileCheck-ize
Chandler Carruth [Sat, 2 Jul 2011 20:42:59 +0000 (20:42 +0000)]
FileCheck-ize

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

12 years agoRemove a grep that is already checked with FileCheck.
Chandler Carruth [Sat, 2 Jul 2011 20:42:56 +0000 (20:42 +0000)]
Remove a grep that is already checked with FileCheck.

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

12 years agoFileCheck-ize
Chandler Carruth [Sat, 2 Jul 2011 20:42:53 +0000 (20:42 +0000)]
FileCheck-ize

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

12 years agoFileCheck-ize and modernize IR.
Chandler Carruth [Sat, 2 Jul 2011 20:42:50 +0000 (20:42 +0000)]
FileCheck-ize and modernize IR.

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

12 years agoFileCheck-ize and simplify RUNs.
Chandler Carruth [Sat, 2 Jul 2011 20:42:48 +0000 (20:42 +0000)]
FileCheck-ize and simplify RUNs.

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

12 years agoFileCheck-ize and modernize the RUN line.
Chandler Carruth [Sat, 2 Jul 2011 20:42:44 +0000 (20:42 +0000)]
FileCheck-ize and modernize the RUN line.

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

12 years agoFileCheck-ize, tightening checks and avoiding a temporary file.
Chandler Carruth [Sat, 2 Jul 2011 20:42:42 +0000 (20:42 +0000)]
FileCheck-ize, tightening checks and avoiding a temporary file.

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

12 years agoFileCheck-ize, tightening checks and avoiding a temporary file.
Chandler Carruth [Sat, 2 Jul 2011 20:42:39 +0000 (20:42 +0000)]
FileCheck-ize, tightening checks and avoiding a temporary file.

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

12 years agoFileCheck-ize
Chandler Carruth [Sat, 2 Jul 2011 20:42:36 +0000 (20:42 +0000)]
FileCheck-ize

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

12 years agoFileCheck-ize
Chandler Carruth [Sat, 2 Jul 2011 20:42:33 +0000 (20:42 +0000)]
FileCheck-ize

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

12 years agoFileCheck-ize a test, avoiding a temporary file.
Chandler Carruth [Sat, 2 Jul 2011 20:42:31 +0000 (20:42 +0000)]
FileCheck-ize a test, avoiding a temporary file.

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

12 years agoFileCheck-ize and simplify this test.
Chandler Carruth [Sat, 2 Jul 2011 20:42:28 +0000 (20:42 +0000)]
FileCheck-ize and simplify this test.

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

12 years agoFileCheck-ize
Chandler Carruth [Sat, 2 Jul 2011 20:42:25 +0000 (20:42 +0000)]
FileCheck-ize

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

12 years agoFileCheck-ize another codegen test.
Chandler Carruth [Sat, 2 Jul 2011 20:42:22 +0000 (20:42 +0000)]
FileCheck-ize another codegen test.

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

12 years agoPartially FileCheck-ize a test to remove a weird quoting situation.
Chandler Carruth [Sat, 2 Jul 2011 20:42:20 +0000 (20:42 +0000)]
Partially FileCheck-ize a test to remove a weird quoting situation.

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

12 years agoFileCheck-ize another test, and upgrade its syntax a bit.
Chandler Carruth [Sat, 2 Jul 2011 20:42:17 +0000 (20:42 +0000)]
FileCheck-ize another test, and upgrade its syntax a bit.

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

12 years agoFileCheck-ize another codegen test, tightening it up.
Chandler Carruth [Sat, 2 Jul 2011 20:42:14 +0000 (20:42 +0000)]
FileCheck-ize another codegen test, tightening it up.

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