oota-llvm.git
14 years agoFix a bad merge.
David Greene [Fri, 4 Dec 2009 23:08:02 +0000 (23:08 +0000)]
Fix a bad merge.

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

14 years agoUpdate the TargetInstrInfo interfaces so hasLoad/StoreFrom/ToStackSlot
David Greene [Fri, 4 Dec 2009 23:00:50 +0000 (23:00 +0000)]
Update the TargetInstrInfo interfaces so hasLoad/StoreFrom/ToStackSlot
can return a MachineMemOperand.

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

14 years agoFix indentation.
Bob Wilson [Fri, 4 Dec 2009 22:46:47 +0000 (22:46 +0000)]
Fix indentation.

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

14 years agoUse new interfaces to print spill size.
David Greene [Fri, 4 Dec 2009 22:46:04 +0000 (22:46 +0000)]
Use new interfaces to print spill size.

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

14 years agoHave hasLoad/StoreFrom/ToStackSlot return the relevant MachineMemOperand.
David Greene [Fri, 4 Dec 2009 22:38:46 +0000 (22:38 +0000)]
Have hasLoad/StoreFrom/ToStackSlot return the relevant MachineMemOperand.

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

14 years agoFix up some comments.
Bob Wilson [Fri, 4 Dec 2009 21:57:37 +0000 (21:57 +0000)]
Fix up some comments.

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

14 years agoFix 80-column violations.
Bob Wilson [Fri, 4 Dec 2009 21:51:35 +0000 (21:51 +0000)]
Fix 80-column violations.

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

14 years agoOptParser: Emit HelpText field for option groups.
Daniel Dunbar [Fri, 4 Dec 2009 21:41:24 +0000 (21:41 +0000)]
OptParser: Emit HelpText field for option groups.

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

14 years agoSome code cleanup. No functionality change.
Bill Wendling [Fri, 4 Dec 2009 21:03:02 +0000 (21:03 +0000)]
Some code cleanup. No functionality change.

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

14 years agoAvoid creating a metadata slot for all metadata that contains an instruction
Victor Hernandez [Fri, 4 Dec 2009 20:07:10 +0000 (20:07 +0000)]
Avoid creating a metadata slot for all metadata that contains an instruction

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

14 years agoHandle recursive PHI's.
Evan Cheng [Fri, 4 Dec 2009 19:09:10 +0000 (19:09 +0000)]
Handle recursive PHI's.

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

14 years agoFix crasher when N->getElement(n) is NULL
Victor Hernandez [Fri, 4 Dec 2009 18:29:23 +0000 (18:29 +0000)]
Fix crasher when N->getElement(n) is NULL

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

14 years agoAdd a pre-regalloc tail duplication pass.
Evan Cheng [Fri, 4 Dec 2009 09:42:45 +0000 (09:42 +0000)]
Add a pre-regalloc tail duplication pass.

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

14 years agoDon't try to be cute with undef optimization here. Let ProcessImplicitDefs handle it.
Evan Cheng [Fri, 4 Dec 2009 09:23:37 +0000 (09:23 +0000)]
Don't try to be cute with undef optimization here. Let ProcessImplicitDefs handle it.

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

14 years agoAdd note about a subtle bug in this code. Does not effect the main
Duncan Sands [Fri, 4 Dec 2009 08:42:17 +0000 (08:42 +0000)]
Add note about a subtle bug in this code.  Does not effect the main
architectures that LLVM targets, because they don't use this code.

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

14 years agoFix typo and add missing include.
Daniel Dunbar [Fri, 4 Dec 2009 08:17:07 +0000 (08:17 +0000)]
Fix typo and add missing include.

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

14 years agoAdded debug output for inherited passes that are invalidated.
Andreas Neustifter [Fri, 4 Dec 2009 06:58:24 +0000 (06:58 +0000)]
Added debug output for inherited passes that are invalidated.

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

14 years agoForward -m32/-m64 to the linker.
Mikhail Glushenkov [Fri, 4 Dec 2009 06:38:45 +0000 (06:38 +0000)]
Forward -m32/-m64 to the linker.

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

14 years agoSupport -march/-mtune/-mcpu.
Mikhail Glushenkov [Fri, 4 Dec 2009 06:38:28 +0000 (06:38 +0000)]
Support -march/-mtune/-mcpu.

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

14 years agoFix PR5551 by not ignoring the top level constantexpr when
Chris Lattner [Fri, 4 Dec 2009 06:29:29 +0000 (06:29 +0000)]
Fix PR5551 by not ignoring the top level constantexpr when
folding a load from constant.

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

14 years agoadd to cmake
Chris Lattner [Fri, 4 Dec 2009 04:15:36 +0000 (04:15 +0000)]
add to cmake

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

14 years agoSmall and carefully crafted testcase showing a miscompilation by GVN
Chris Lattner [Fri, 4 Dec 2009 02:12:12 +0000 (02:12 +0000)]
Small and carefully crafted testcase showing a miscompilation by GVN
that I'm working on.  This is manifesting as a miscompile of 255.vortex
on some targets.  No check lines yet because it fails.

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

14 years agoadd the start of a class used to handle phi translation in memdep and
Chris Lattner [Fri, 4 Dec 2009 02:10:16 +0000 (02:10 +0000)]
add the start of a class used to handle phi translation in memdep and
gvn (this is just a skeleton so far).  This will ultimately be used
to fix a nasty miscompilation with GVN.

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

14 years agoCreate yet another helper for Invoke.
Mike Stump [Fri, 4 Dec 2009 01:53:15 +0000 (01:53 +0000)]
Create yet another helper for Invoke.

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

14 years agoTeach AsmWriter to write inline (not via a global metadata slot) metadata that contai...
Victor Hernandez [Fri, 4 Dec 2009 01:35:02 +0000 (01:35 +0000)]
Teach AsmWriter to write inline (not via a global metadata slot) metadata that contains an instruction

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

14 years agoFix a comment typo.
Bob Wilson [Fri, 4 Dec 2009 01:33:04 +0000 (01:33 +0000)]
Fix a comment typo.

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

14 years agoAdd some helpers for Invoke to mirror CreateCall helpers.
Mike Stump [Fri, 4 Dec 2009 01:26:26 +0000 (01:26 +0000)]
Add some helpers for Invoke to mirror CreateCall helpers.

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

14 years agoadd an assert to make it really clear what this is doing. Return singularval as
Chris Lattner [Fri, 4 Dec 2009 01:03:32 +0000 (01:03 +0000)]
add an assert to make it really clear what this is doing.  Return singularval as
a compile time perf optimization to avoid a load.

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

14 years agoAlso attempt trivial coalescing for live intervals that end in a copy.
Jakob Stoklund Olesen [Fri, 4 Dec 2009 00:16:04 +0000 (00:16 +0000)]
Also attempt trivial coalescing for live intervals that end in a copy.

The coalescer is supposed to clean these up, but when setting up parameters
for a function call, there may be copies to physregs. If the defining
instruction has been LICM'ed far away, the coalescer won't touch it.

The register allocation hint does not always work - when the register
allocator is backtracking, it clears the hints.

This patch takes care of a few more cases that r90163 missed.

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

14 years ago- If the reaching definition is an undef and the use is a PHI, add the implicit_def...
Evan Cheng [Fri, 4 Dec 2009 00:09:05 +0000 (00:09 +0000)]
- If the reaching definition is an undef and the use is a PHI, add the implicit_def to the end of the source block.
- When reaching value is replaced with another, update the cache as well.

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

14 years agoInsert composite type DIE into the map before processing type fields. This allows...
Devang Patel [Thu, 3 Dec 2009 23:46:57 +0000 (23:46 +0000)]
Insert composite type DIE into the map before processing type fields. This allows fields to find their context DIE from the map.

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

14 years agoAdd ParseInlineMetadata() which can parses metadata that refers to an instruction...
Victor Hernandez [Thu, 3 Dec 2009 23:40:58 +0000 (23:40 +0000)]
Add ParseInlineMetadata() which can parses metadata that refers to an instruction.  Extend ParseParameterList() to use this new function so that calls to llvm.dbg.declare can pass inline metadata

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

14 years agoremove out of date FIXME.
Jim Grosbach [Thu, 3 Dec 2009 21:55:01 +0000 (21:55 +0000)]
remove out of date FIXME.

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

14 years agoHandle undef values properly.
Evan Cheng [Thu, 3 Dec 2009 21:51:55 +0000 (21:51 +0000)]
Handle undef values properly.

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

14 years agoWatch out for PHI instruction with no source operands.
Evan Cheng [Thu, 3 Dec 2009 21:50:58 +0000 (21:50 +0000)]
Watch out for PHI instruction with no source operands.

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

14 years agoFix a comment typo.
Bob Wilson [Thu, 3 Dec 2009 21:47:07 +0000 (21:47 +0000)]
Fix a comment typo.

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

14 years agoFix ExpandShiftWithUnknownAmountBit, which was completely bogus.
Duncan Sands [Thu, 3 Dec 2009 21:37:32 +0000 (21:37 +0000)]
Fix ExpandShiftWithUnknownAmountBit, which was completely bogus.
Pointed out by Javier Martinez (who also provided a patch).  Since
this logic is not used on (for example) x86, I guess nobody noticed.
Tested by generating SHL, SRL, SRA on various choices of i64 for all
possible shift amounts, and comparing with gcc.  Since I did this on
x86-32, I had to force the use of ExpandShiftWithUnknownAmountBit.
What I'm saying here is that I don't have a testcase I can add to the
repository.

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

14 years agoClean up some loop logic.
Jakob Stoklund Olesen [Thu, 3 Dec 2009 20:49:10 +0000 (20:49 +0000)]
Clean up some loop logic.

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

14 years agoAdd support to emit debug info for virtual functions and virtual base classes.
Devang Patel [Thu, 3 Dec 2009 19:11:07 +0000 (19:11 +0000)]
Add support to emit debug info for virtual functions and virtual base classes.

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

14 years agoPrint a newline after the Args: line so that unrelated errs() output doesn't
Dan Gohman [Thu, 3 Dec 2009 19:03:18 +0000 (19:03 +0000)]
Print a newline after the Args: line so that unrelated errs() output doesn't
end up on the same line.

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

14 years agoFix MSVC build.
Benjamin Kramer [Thu, 3 Dec 2009 13:23:03 +0000 (13:23 +0000)]
Fix MSVC build.

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

14 years agoConvert ProfileVerifier to template so it can be used for different types of ProfileInfo.
Andreas Neustifter [Thu, 3 Dec 2009 12:55:57 +0000 (12:55 +0000)]
Convert ProfileVerifier to template so it can be used for different types of ProfileInfo.

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

14 years agoDo not create negative edge weights in ProfileEstimator.
Andreas Neustifter [Thu, 3 Dec 2009 12:41:14 +0000 (12:41 +0000)]
Do not create negative edge weights in ProfileEstimator.
Use integer values for weights to prevent rounding errors.
Make ProfileEstimator more robust in general CFGs.

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

14 years agoAdd an implementation of the delta debugging algorithm.
Daniel Dunbar [Thu, 3 Dec 2009 11:12:42 +0000 (11:12 +0000)]
Add an implementation of the delta debugging algorithm.
 - This is a pretty slow / memory intensive implementation, and I will likely
   change it to an iterative model, but it works.

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

14 years agoUse ProfileInfo-API in ProfileInfo Loader and do more assertions.
Andreas Neustifter [Thu, 3 Dec 2009 11:00:37 +0000 (11:00 +0000)]
Use ProfileInfo-API in ProfileInfo Loader and do more assertions.

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

14 years agoConverted ProfileInfo to template, added more API for ProfileInfo-preserving.
Andreas Neustifter [Thu, 3 Dec 2009 09:30:12 +0000 (09:30 +0000)]
Converted ProfileInfo to template, added more API for ProfileInfo-preserving.

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

14 years agoTeach tail duplication to update SSA form. Work in progress.
Evan Cheng [Thu, 3 Dec 2009 08:43:53 +0000 (08:43 +0000)]
Teach tail duplication to update SSA form. Work in progress.

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

14 years agoexpand note.
Chris Lattner [Thu, 3 Dec 2009 07:43:46 +0000 (07:43 +0000)]
expand note.

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

14 years agoadd a note
Chris Lattner [Thu, 3 Dec 2009 07:41:54 +0000 (07:41 +0000)]
add a note

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

14 years agoDon't pull vector sext through both hands of a logical operation, since doing so...
Nate Begeman [Thu, 3 Dec 2009 07:11:29 +0000 (07:11 +0000)]
Don't pull vector sext through both hands of a logical operation, since doing so prevents the fusion of vector sext and setcc into vsetcc.
Add a testcase for the above transformation.
Fix a bogus use of APInt noticed while tracking this down.

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

14 years agofix a build problem with VC++, PR5664, patch by Alp Toker!
Chris Lattner [Thu, 3 Dec 2009 06:58:32 +0000 (06:58 +0000)]
fix a build problem with VC++, PR5664, patch by Alp Toker!

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

14 years agoRecognize canonical forms of vector shuffles where the same vector is used for
Bob Wilson [Thu, 3 Dec 2009 06:40:55 +0000 (06:40 +0000)]
Recognize canonical forms of vector shuffles where the same vector is used for
both source operands.  In the canonical form, the 2nd operand is changed to an
undef and the shuffle mask is adjusted to only reference elements from the 1st
operand.  Radar 7434842.

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

14 years agoDon't call getValueType() on a null SDValue
Jakob Stoklund Olesen [Thu, 3 Dec 2009 05:15:35 +0000 (05:15 +0000)]
Don't call getValueType() on a null SDValue

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

14 years agoFix this crasher, and add a FIXME for a missed optimization.
Owen Anderson [Thu, 3 Dec 2009 03:43:29 +0000 (03:43 +0000)]
Fix this crasher, and add a FIXME for a missed optimization.

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

14 years agoFill out codegen SSA updater. It's not yet tested.
Evan Cheng [Thu, 3 Dec 2009 02:31:43 +0000 (02:31 +0000)]
Fill out codegen SSA updater. It's not yet tested.

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

14 years agoRevert r90371. It was causing build failures.
Bill Wendling [Thu, 3 Dec 2009 01:54:07 +0000 (01:54 +0000)]
Revert r90371. It was causing build failures.

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

14 years agoDon't hang on to pointers or references after vector::push_back.
Jakob Stoklund Olesen [Thu, 3 Dec 2009 01:49:56 +0000 (01:49 +0000)]
Don't hang on to pointers or references after vector::push_back.

The MO reference to a MachineOperand can be invalidated by
MachineInstr::addOperand. Don't even use it for debugging.

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

14 years agoadd a failing testcase.
Chris Lattner [Thu, 3 Dec 2009 01:46:18 +0000 (01:46 +0000)]
add a failing testcase.

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

14 years agoEmit method definition DIE at module level (even for methods with inlined functino...
Devang Patel [Thu, 3 Dec 2009 01:25:38 +0000 (01:25 +0000)]
Emit method definition DIE at module level (even for methods with inlined functino body at soure level) so that the debugger can invoke it. This fixes many test failures in gdb test suite.

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

14 years agoFurther improvements: refactoring code that does the same thing into one
Bill Wendling [Thu, 3 Dec 2009 01:15:46 +0000 (01:15 +0000)]
Further improvements: refactoring code that does the same thing into one
function, converting "dyn_cast" to "cast", asserting the correct things, and
other general cleanups.

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

14 years agoyay for case insensitive file systems (?)
Chris Lattner [Thu, 3 Dec 2009 01:10:05 +0000 (01:10 +0000)]
yay for case insensitive file systems (?)

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

14 years agofix PR5673 by being more careful about pointers to functions.
Chris Lattner [Thu, 3 Dec 2009 01:05:45 +0000 (01:05 +0000)]
fix PR5673 by being more careful about pointers to functions.

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

14 years agoremove some dead std::ostream using code.
Chris Lattner [Thu, 3 Dec 2009 00:55:04 +0000 (00:55 +0000)]
remove some dead std::ostream using code.

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

14 years agoimprove portability to avoid conflicting with std::next in c++'0x.
Chris Lattner [Thu, 3 Dec 2009 00:50:42 +0000 (00:50 +0000)]
improve portability to avoid conflicting with std::next in c++'0x.
Patch by Howard Hinnant!

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

14 years agoThis initial code is meant to convert TargetData to use an AbstractTypesUser so
Bill Wendling [Thu, 3 Dec 2009 00:17:12 +0000 (00:17 +0000)]
This initial code is meant to convert TargetData to use an AbstractTypesUser so
that it doesn't have dangling pointers when abstract types are resolved. This
modifies it somewhat to address comments: making the "StructLayoutMap" an
anonymous structure, calling "removeAbstractTypeUser" when appropriate, and
adding asserts where helpful.

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

14 years agoFix CMake makefiles
Douglas Gregor [Wed, 2 Dec 2009 22:19:31 +0000 (22:19 +0000)]
Fix CMake makefiles

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

14 years agoSkeleton for MachineInstr level SSA updater.
Evan Cheng [Wed, 2 Dec 2009 22:02:52 +0000 (22:02 +0000)]
Skeleton for MachineInstr level SSA updater.

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

14 years agoRemove unnecessary check.
Bill Wendling [Wed, 2 Dec 2009 22:02:20 +0000 (22:02 +0000)]
Remove unnecessary check.

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

14 years agoAdd MaxStackAlignment.cpp to CMake
Jim Grosbach [Wed, 2 Dec 2009 19:31:07 +0000 (19:31 +0000)]
Add MaxStackAlignment.cpp to CMake

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

14 years agoFactor the stack alignment calculations out into a target independent pass.
Jim Grosbach [Wed, 2 Dec 2009 19:30:24 +0000 (19:30 +0000)]
Factor the stack alignment calculations out into a target independent pass.
No functionality change.

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

14 years agoDon't count PHI instructions toward the limit for tail duplicating a block.
Bob Wilson [Wed, 2 Dec 2009 17:15:24 +0000 (17:15 +0000)]
Don't count PHI instructions toward the limit for tail duplicating a block.

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

14 years agoMove EliminateDuplicatePHINodes() from SimplifyCFG.cpp to Local.cpp
Jim Grosbach [Wed, 2 Dec 2009 17:06:45 +0000 (17:06 +0000)]
Move EliminateDuplicatePHINodes() from SimplifyCFG.cpp to Local.cpp

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

14 years agoCheap, mostly strict, stable sorting.
Andreas Neustifter [Wed, 2 Dec 2009 15:57:15 +0000 (15:57 +0000)]
Cheap, mostly strict, stable sorting.

This is necessary for tests so the results are comparable.

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

14 years agoSilence compiler warnings.
Benjamin Kramer [Wed, 2 Dec 2009 15:33:44 +0000 (15:33 +0000)]
Silence compiler warnings.

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

14 years agoClarify that DIEString does not keep a copy of the string.
Devang Patel [Wed, 2 Dec 2009 15:25:16 +0000 (15:25 +0000)]
Clarify that DIEString does not keep a copy of the string.

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

14 years agoCleanup/remove some parts of the lifetime region handling code in memdep and GVN,
Owen Anderson [Wed, 2 Dec 2009 07:35:19 +0000 (07:35 +0000)]
Cleanup/remove some parts of the lifetime region handling code in memdep and GVN,
per Chris' comments.  Adjust testcases to match.

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

14 years agofactor some code better.
Chris Lattner [Wed, 2 Dec 2009 06:44:58 +0000 (06:44 +0000)]
factor some code better.

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

14 years agoformatting cleanups.
Chris Lattner [Wed, 2 Dec 2009 06:35:55 +0000 (06:35 +0000)]
formatting cleanups.

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

14 years agotidy up, remove dependence on order of evaluation of function args from EmitMemCpy.
Chris Lattner [Wed, 2 Dec 2009 06:05:42 +0000 (06:05 +0000)]
tidy up, remove dependence on order of evaluation of function args from EmitMemCpy.

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

14 years agomerge sext-2 into sext.ll
Chris Lattner [Wed, 2 Dec 2009 05:34:35 +0000 (05:34 +0000)]
merge sext-2 into sext.ll

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

14 years agorename test
Chris Lattner [Wed, 2 Dec 2009 05:32:33 +0000 (05:32 +0000)]
rename test

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

14 years agofilecheckize
Chris Lattner [Wed, 2 Dec 2009 05:32:16 +0000 (05:32 +0000)]
filecheckize

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

14 years agoFixed an assertion failure for tracking sext of a vector of integers
Mon P Wang [Wed, 2 Dec 2009 04:59:58 +0000 (04:59 +0000)]
Fixed an assertion failure for tracking sext of a vector of integers

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

14 years agoAdd utility routine to create subprogram definition entry from subprogram declaration...
Devang Patel [Tue, 1 Dec 2009 23:09:02 +0000 (23:09 +0000)]
Add utility routine to create subprogram definition entry from subprogram declaration entry.

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

14 years agoReuse existing subprogram DIE.
Devang Patel [Tue, 1 Dec 2009 23:07:59 +0000 (23:07 +0000)]
Reuse existing subprogram DIE.

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

14 years agoreturn more useful error messages by using strerror to format errno
Chris Lattner [Tue, 1 Dec 2009 22:51:41 +0000 (22:51 +0000)]
return more useful error messages by using strerror to format errno
instead of returning an ambiguous reason.

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

14 years agoUpdate per Bill's comments. Work in progress.
Eric Christopher [Tue, 1 Dec 2009 22:28:41 +0000 (22:28 +0000)]
Update per Bill's comments. Work in progress.

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

14 years agoFix PR5391: support early clobber physical register def tied with a use (ewwww)
Evan Cheng [Tue, 1 Dec 2009 22:25:00 +0000 (22:25 +0000)]
Fix PR5391: support early clobber physical register def tied with a use (ewwww)
- A valno should be set HasRedefByEC if there is an early clobber def in the middle of its live ranges. It should not be set if the def of the valno is defined by an early clobber.
- If a physical register def is tied to an use and it's an early clobber, it just means the HasRedefByEC is set since it's still one continuous live range.
- Add a couple of missing checks for HasRedefByEC in the coalescer. In general, it should not coalesce a vr with a physical register if the physical register has a early clobber def somewhere. This is overly conservative but that's the price for using such a nasty inline asm "feature".

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

14 years agotest case for IV-Users simplification loop improvement
Jim Grosbach [Tue, 1 Dec 2009 21:53:51 +0000 (21:53 +0000)]
test case for IV-Users simplification loop improvement

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

14 years agorename some variables.
Chris Lattner [Tue, 1 Dec 2009 21:16:01 +0000 (21:16 +0000)]
rename some variables.

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

14 years agotidy
Chris Lattner [Tue, 1 Dec 2009 21:15:15 +0000 (21:15 +0000)]
tidy

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

14 years agoAdd edge source labels to SelectionDAG graphs, now that the graph printing
Dan Gohman [Tue, 1 Dec 2009 19:20:00 +0000 (19:20 +0000)]
Add edge source labels to SelectionDAG graphs, now that the graph printing
framework omits differentiated edge sources in the case where the labels
are empty strings.

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

14 years agoMinor cleanups.
Dan Gohman [Tue, 1 Dec 2009 19:16:15 +0000 (19:16 +0000)]
Minor cleanups.

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

14 years agoTrim an unnecessary #include.
Dan Gohman [Tue, 1 Dec 2009 19:13:27 +0000 (19:13 +0000)]
Trim an unnecessary #include.

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

14 years agoDon't default warnings to ON on MSVC, the spew is enough to triple the build time. :/
Daniel Dunbar [Tue, 1 Dec 2009 19:11:36 +0000 (19:11 +0000)]
Don't default warnings to ON on MSVC, the spew is enough to triple the build time. :/

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

14 years agoClear function specific containers while processing end of a function, even if DW_TAG...
Devang Patel [Tue, 1 Dec 2009 18:13:48 +0000 (18:13 +0000)]
Clear function specific containers while processing end of a function, even if DW_TAG_subprogram for current function is not found.

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

14 years agoThumb1 exception handling setjmp
Jim Grosbach [Tue, 1 Dec 2009 18:10:36 +0000 (18:10 +0000)]
Thumb1 exception handling setjmp

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

14 years agoFor VLDM/VSTM (Advanced SIMD), set encoding bits Inst{11-8} to 0b1011.
Johnny Chen [Tue, 1 Dec 2009 17:37:06 +0000 (17:37 +0000)]
For VLDM/VSTM (Advanced SIMD), set encoding bits Inst{11-8} to 0b1011.

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

14 years agoMove PHIElimination::isLiveOut method to LiveVariables.
Jakob Stoklund Olesen [Tue, 1 Dec 2009 17:13:31 +0000 (17:13 +0000)]
Move PHIElimination::isLiveOut method to LiveVariables.

We want LiveVariables clients to use methods rather than accessing the
getVarInfo data structure directly. That way it will be possible to change the
LiveVariables representation.

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

14 years agotypo
Gabor Greif [Tue, 1 Dec 2009 15:53:33 +0000 (15:53 +0000)]
typo

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