oota-llvm.git
12 years agoFix typo in comment.
Richard Osborne [Fri, 17 Feb 2012 16:39:47 +0000 (16:39 +0000)]
Fix typo in comment.

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

12 years agoDon't lazily allocate eh_frame. We're not lazily allocating things like the LSDA...
David Chisnall [Fri, 17 Feb 2012 16:32:07 +0000 (16:32 +0000)]
Don't lazily allocate eh_frame.  We're not lazily allocating things like the LSDA, which are only used when the eh frame is used, so this lazy allocation doesn't really make sense.

Fix the type of eh_frame on Solaris so that Sun ld doesn't fail to combine them (thus making it impossible for the unwind library to find them and breaking exceptions).

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

12 years ago... and it's probably best to use the correct alignment, rather than just guessing...
David Chisnall [Fri, 17 Feb 2012 16:30:39 +0000 (16:30 +0000)]
... and it's probably best to use the correct alignment, rather than just guessing that it's the same as the size.

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

12 years agoIt turns out that putting an 8-byte symbol in a 4-byte section makes Solaris ld sulk...
David Chisnall [Fri, 17 Feb 2012 16:05:50 +0000 (16:05 +0000)]
It turns out that putting an 8-byte symbol in a 4-byte section makes Solaris ld sulk.  GNU ld is perfectly happy with it, which is worrying for a whole other set of reasons...

Thanks to Anton, Duncan and Rafael for helping me track this down.
Pointy hat to Rafael for introducing the bug in the first place.

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

12 years agoRemove question.
Nick Lewycky [Fri, 17 Feb 2012 09:55:20 +0000 (09:55 +0000)]
Remove question.

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

12 years agoremove Emacs-tag form .cpp files in Mips Backend, and fix some typo.
Jia Liu [Fri, 17 Feb 2012 08:55:11 +0000 (08:55 +0000)]
remove Emacs-tag form .cpp files in Mips Backend, and fix some typo.

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

12 years agoTypo in variable name.
Eric Christopher [Fri, 17 Feb 2012 07:08:46 +0000 (07:08 +0000)]
Typo in variable name.

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

12 years agoRemove the last of the old vector_shuffle patterns from X86 isel.
Craig Topper [Fri, 17 Feb 2012 07:02:34 +0000 (07:02 +0000)]
Remove the last of the old vector_shuffle patterns from X86 isel.

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

12 years agoAdd support for invariant.start inside the static constructor evaluator. This is
Nick Lewycky [Fri, 17 Feb 2012 06:59:21 +0000 (06:59 +0000)]
Add support for invariant.start inside the static constructor evaluator. This is
useful to represent a variable that is const in the source but can't be constant
in the IR because of a non-trivial constructor. If globalopt evaluates the
constructor, and there was an invariant.start with no matching invariant.end
possible, it will mark the global constant afterwards.

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

12 years agoDo not promote i32 arguments to i64. This was causing unnecessary sign extension
Akira Hatanaka [Fri, 17 Feb 2012 02:20:26 +0000 (02:20 +0000)]
Do not promote i32 arguments to i64. This was causing unnecessary sign extension
instructions to be emitted.

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

12 years agoRemove redundant comment. Use a more efficient datatype.
Bill Wendling [Fri, 17 Feb 2012 02:12:54 +0000 (02:12 +0000)]
Remove redundant comment. Use a more efficient datatype.

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

12 years agoFix some grammar-os and formatting.
Bill Wendling [Fri, 17 Feb 2012 02:09:28 +0000 (02:09 +0000)]
Fix some grammar-os and formatting.

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

12 years agoReverse iterator - should be incrementing rather than decrementing.
Lang Hames [Fri, 17 Feb 2012 01:54:11 +0000 (01:54 +0000)]
Reverse iterator - should be incrementing rather than decrementing.

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

12 years agoadd Emacs tag and fix some comment error in file headers
Jia Liu [Fri, 17 Feb 2012 01:23:50 +0000 (01:23 +0000)]
add Emacs tag and fix some comment error in file headers

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

12 years ago[fast-isel] Add support for returning non-legal types with no sign- or zero-
Chad Rosier [Fri, 17 Feb 2012 01:21:28 +0000 (01:21 +0000)]
[fast-isel] Add support for returning non-legal types with no sign- or zero-
entend flag.

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

12 years agoMachineScheduler shouldn't use/preserve LiveDebugVariables.
Lang Hames [Fri, 17 Feb 2012 01:11:37 +0000 (01:11 +0000)]
MachineScheduler shouldn't use/preserve LiveDebugVariables.

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

12 years agoOops - isRegLiveIntoSuccessor is used in non-assert builds now. Remove NDEBUG guards.
Lang Hames [Fri, 17 Feb 2012 00:51:32 +0000 (00:51 +0000)]
Oops - isRegLiveIntoSuccessor is used in non-assert builds now. Remove NDEBUG guards.

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

12 years agoRe-enable 150652 and 150654 - Make FPSCR non-reserved, and make MachineCSE bail on...
Lang Hames [Fri, 17 Feb 2012 00:27:16 +0000 (00:27 +0000)]
Re-enable 150652 and 150654 - Make FPSCR non-reserved, and make MachineCSE bail on reserved registers. This *should* be safe as of r150786.

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

12 years agoTurn off assertion, conservatively compute liveness for live-in un-allocatable registers.
Lang Hames [Fri, 17 Feb 2012 00:18:18 +0000 (00:18 +0000)]
Turn off assertion, conservatively compute liveness for live-in un-allocatable registers.

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

12 years agoRemove comment.
Akira Hatanaka [Thu, 16 Feb 2012 22:52:29 +0000 (22:52 +0000)]
Remove comment.

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

12 years agoRemove unnecessary assignment to temporary, ResultReg.
Chad Rosier [Thu, 16 Feb 2012 22:45:33 +0000 (22:45 +0000)]
Remove unnecessary assignment to temporary, ResultReg.

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

12 years agoUse –mcpu=generic, so that the test will not fail when run on an Intel Atom
Bill Wendling [Thu, 16 Feb 2012 22:42:48 +0000 (22:42 +0000)]
Use –mcpu=generic, so that the test will not fail when run on an Intel Atom
processor, due to the Atom scheduler producing an instruction sequence that is
different from that which is expected.
Patch by Michael Spencer!

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

12 years agoUpdate credits.
Chad Rosier [Thu, 16 Feb 2012 18:54:41 +0000 (18:54 +0000)]
Update credits.

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

12 years agoNote x86 regmask operands in release notes.
Jakob Stoklund Olesen [Thu, 16 Feb 2012 18:22:39 +0000 (18:22 +0000)]
Note x86 regmask operands in release notes.

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

12 years agoRemove the YMM_HI_6_15 hack.
Jakob Stoklund Olesen [Thu, 16 Feb 2012 17:56:06 +0000 (17:56 +0000)]
Remove the YMM_HI_6_15 hack.

Call clobbers are now represented with register mask operands.  The
regmask can easily represent the fact that xmm6 is call-preserved while
ymm6 isn't.  This is automatically computed by TableGen from the
CalleeSavedRegs containing xmm6.

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

12 years agoUse the same CALL instructions for Windows as for everything else.
Jakob Stoklund Olesen [Thu, 16 Feb 2012 17:56:02 +0000 (17:56 +0000)]
Use the same CALL instructions for Windows as for everything else.

The different calling conventions and call-preserved registers are
represented with regmask operands that are added dynamically.

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

12 years agoRemove trailing whitespace. Add newline.
Akira Hatanaka [Thu, 16 Feb 2012 17:48:20 +0000 (17:48 +0000)]
Remove trailing whitespace. Add newline.

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

12 years agoDisable machine copy propagation for now. It's known to be buggy (PR11940) and introd...
Benjamin Kramer [Thu, 16 Feb 2012 17:29:50 +0000 (17:29 +0000)]
Disable machine copy propagation for now. It's known to be buggy (PR11940) and introduces subtle miscompiles in many places.

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

12 years agoRevert "InstSimplify: Strip pointer casts early."
Benjamin Kramer [Thu, 16 Feb 2012 15:19:59 +0000 (15:19 +0000)]
Revert "InstSimplify: Strip pointer casts early."

Turns out this isn't safe, because the code below depends on LHS and RHS having
the same type.

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

12 years agoInstSimplify: Strip pointer casts early.
Benjamin Kramer [Thu, 16 Feb 2012 15:03:04 +0000 (15:03 +0000)]
InstSimplify: Strip pointer casts early.

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

12 years agoInstSimplify: Ignore pointer casts when constant folding compares between pointers.
Benjamin Kramer [Thu, 16 Feb 2012 13:49:39 +0000 (13:49 +0000)]
InstSimplify: Ignore pointer casts when constant folding compares between pointers.

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

12 years agos/ModAttrBehavior/ModFlagBehavior/g to be consistent with how module flags are named...
Bill Wendling [Thu, 16 Feb 2012 10:28:10 +0000 (10:28 +0000)]
s/ModAttrBehavior/ModFlagBehavior/g to be consistent with how module flags are named elsewhere.

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

12 years agoAdd 'exception handling' to my description.
Bill Wendling [Thu, 16 Feb 2012 10:25:07 +0000 (10:25 +0000)]
Add 'exception handling' to my description.

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

12 years agoAdd blurb about module flags and reformat a bit.
Bill Wendling [Thu, 16 Feb 2012 10:23:43 +0000 (10:23 +0000)]
Add blurb about module flags and reformat a bit.

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

12 years agoRemove extraneous #include and spelling mistake introduced in r150669.
James Molloy [Thu, 16 Feb 2012 09:48:07 +0000 (09:48 +0000)]
Remove extraneous #include and spelling mistake introduced in r150669.

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

12 years agoModify the algorithm when traversing the DAGCombiner's worklist to be O(log N) for...
James Molloy [Thu, 16 Feb 2012 09:17:04 +0000 (09:17 +0000)]
Modify the algorithm when traversing the DAGCombiner's worklist to be O(log N) for all operations. This fixes a horrible worst case with lots of nodes where 99% of the time was being spent in std::remove.

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

12 years agoVMCore/AsmWriter.cpp: Tweak to check #INF and #NAN earlier.
NAKAMURA Takumi [Thu, 16 Feb 2012 08:12:24 +0000 (08:12 +0000)]
VMCore/AsmWriter.cpp: Tweak to check #INF and #NAN earlier.

With MSVCRT, prior checker missed emission of #INF and #NAN.

FIXME: Checking should be simpler.

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

12 years agoReplace all instances of dg.exp file with lit.local.cfg, since all tests are run...
Eli Bendersky [Thu, 16 Feb 2012 06:28:33 +0000 (06:28 +0000)]
Replace all instances of dg.exp file with lit.local.cfg, since all tests are run with LIT now and now Dejagnu. dg.exp is no longer needed.

Patch reviewed by Daniel Dunbar. It will be followed by additional cleanup patches.

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

12 years agoTemplate specialize SmallVector::push_back based on POD-ness of the type. Reduces...
Pete Cooper [Thu, 16 Feb 2012 04:58:48 +0000 (04:58 +0000)]
Template specialize SmallVector::push_back based on POD-ness of the type.  Reduces clang binary by 188KB

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

12 years agoVMCore/AsmWriter.cpp: Use APFloat instead of atof(3).
NAKAMURA Takumi [Thu, 16 Feb 2012 04:19:15 +0000 (04:19 +0000)]
VMCore/AsmWriter.cpp: Use APFloat instead of atof(3).

atof(3) might behave differently among platforms.

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

12 years agoOop - r150653 + r150654 broke one of my test cases. Backing out for now...
Lang Hames [Thu, 16 Feb 2012 02:32:10 +0000 (02:32 +0000)]
Oop - r150653 + r150654 broke one of my test cases. Backing out for now...

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

12 years agoFPSCR shouldn't be reserved.
Lang Hames [Thu, 16 Feb 2012 02:28:14 +0000 (02:28 +0000)]
FPSCR shouldn't be reserved.

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

12 years agoMachineCSE shouldn't extend the live ranges of reserved or allocatable registers.
Lang Hames [Thu, 16 Feb 2012 02:19:35 +0000 (02:19 +0000)]
MachineCSE shouldn't extend the live ranges of reserved or allocatable registers.

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

12 years agoGive a description of the Objective-C garbage collection module flags.
Bill Wendling [Thu, 16 Feb 2012 01:10:50 +0000 (01:10 +0000)]
Give a description of the Objective-C garbage collection module flags.

The rule governing the flags is this:

  no-gc + no-gc   = no-gc
  no-gc +    gc   = no-gc
  no-gc + gc-only = error
     gc +    gc   = gc
     gc + gc-only = gc-only
gc-only + gc-only = gc-only

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

12 years agoloop-rotate shouldn't hoist alloca instructions out of a loop. Patch by Patrik Häggl...
Eli Friedman [Thu, 16 Feb 2012 00:41:10 +0000 (00:41 +0000)]
loop-rotate shouldn't hoist alloca instructions out of a loop.  Patch by Patrik Hägglund, with slightly modified test.  Issue reported by Patrik Hägglund on llvmdev.

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

12 years agoEnable register mask operands for x86 calls.
Jakob Stoklund Olesen [Thu, 16 Feb 2012 00:02:50 +0000 (00:02 +0000)]
Enable register mask operands for x86 calls.

Call instructions no longer have a list of 43 call-clobbered registers.
Instead, they get a single register mask operand with a bit vector of
call-preserved registers.

This saves a lot of memory, 42 x 32 bytes = 1344 bytes per call
instruction, and it speeds up building call instructions because those
43 imp-def operands no longer need to be added to use-def lists. (And
removed and shifted and re-added for every explicit call operand).

Passes like LiveVariables, LiveIntervals, RAGreedy, PEI, and
BranchFolding are significantly faster because they can deal with call
clobbers in bulk.

Overall, clang -O2 is between 0% and 8% faster, uniformly distributed
depending on call density in the compiled code.  Debug builds using
clang -O0 are 0% - 3% faster.

I have verified that this patch doesn't change the assembly generated
for the LLVM nightly test suite when building with -disable-copyprop
and -disable-branch-fold.

Branch folding behaves slightly differently in a few cases because call
instructions have different hash values now.

Copy propagation flushes its data structures when it crosses a register
mask operand. This causes it to leave a few dead copies behind, on the
order of 20 instruction across the entire nightly test suite, including
SPEC. Fixing this properly would require the pass to use different data
structures.

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

12 years agoRemove extraneous tests.
Bill Wendling [Wed, 15 Feb 2012 23:44:05 +0000 (23:44 +0000)]
Remove extraneous tests.

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

12 years agoAdd a test for generating Objective-C metadata from module flags.
Bill Wendling [Wed, 15 Feb 2012 23:43:37 +0000 (23:43 +0000)]
Add a test for generating Objective-C metadata from module flags.

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

12 years agoHandle register masks in branch folding.
Jakob Stoklund Olesen [Wed, 15 Feb 2012 23:42:54 +0000 (23:42 +0000)]
Handle register masks in branch folding.

Don't attempt to move instructions with regmask operands. They are most
likely calls anyway.

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

12 years agoFix library visibility problems with VLIWPacketizer.
Andrew Trick [Wed, 15 Feb 2012 23:34:15 +0000 (23:34 +0000)]
Fix library visibility problems with VLIWPacketizer.

The existing framework for postra scheduling is library local. We want to keep it that way. Soon we will have a more general MachineScheduler interface. At that time, various bits will be exposed to targets. In the meantime, the VLIWPacketizer wants to use ScheduleDAGInstrs directly, so it needs to wrapped in a PIMPL to avoid exposing it to the target interface.

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

12 years agoUse the enum instead of 'unsigned'.
Bill Wendling [Wed, 15 Feb 2012 23:27:50 +0000 (23:27 +0000)]
Use the enum instead of 'unsigned'.

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

12 years agoMake LiveIntervals::handleMove() bundle aware.
Lang Hames [Wed, 15 Feb 2012 23:21:33 +0000 (23:21 +0000)]
Make LiveIntervals::handleMove() bundle aware.

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

12 years agoUse 'getDataNoRel' for the section kind.
Bill Wendling [Wed, 15 Feb 2012 22:47:53 +0000 (22:47 +0000)]
Use 'getDataNoRel' for the section kind.

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

12 years agoFix assertion condition.
Lang Hames [Wed, 15 Feb 2012 22:45:51 +0000 (22:45 +0000)]
Fix assertion condition.

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

12 years agoAdd a test for the Objective-C garbage collection metadata stuff.
Bill Wendling [Wed, 15 Feb 2012 22:44:10 +0000 (22:44 +0000)]
Add a test for the Objective-C garbage collection metadata stuff.

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

12 years agoModify the code that emits the module flags to use the new module flags accessor
Bill Wendling [Wed, 15 Feb 2012 22:36:15 +0000 (22:36 +0000)]
Modify the code that emits the module flags to use the new module flags accessor
method. This allows the target lowering code to not have to deal with MDNodes.

Also, avoid leaking memory like a sieve by not creating a global variable for
the image info section, but just emitting the code directly.

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

12 years agoAdd a module flags accessor method which returns the flags in a vector.
Bill Wendling [Wed, 15 Feb 2012 22:34:20 +0000 (22:34 +0000)]
Add a module flags accessor method which returns the flags in a vector.

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

12 years agoAdd function for computing the edit distance of two arrays.
Kaelyn Uhrain [Wed, 15 Feb 2012 22:13:07 +0000 (22:13 +0000)]
Add function for computing the edit distance of two arrays.

Accomplished by moving the body of StringRef::edit_distance into
a separate function that accepts two ArrayRefs, and making
StringRef::edit_distance a wrapper around the new function.

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

12 years agoDon't expose DefaultVLIWScheduler
Andrew Trick [Wed, 15 Feb 2012 22:06:21 +0000 (22:06 +0000)]
Don't expose DefaultVLIWScheduler

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

12 years agoutils: Kill NewNightlyTest.pl, which has been replaced by LNT (as far as I know).
Daniel Dunbar [Wed, 15 Feb 2012 19:24:11 +0000 (19:24 +0000)]
utils: Kill NewNightlyTest.pl, which has been replaced by LNT (as far as I know).

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

12 years agoRemove overly conservative assert.
Lang Hames [Wed, 15 Feb 2012 19:04:53 +0000 (19:04 +0000)]
Remove overly conservative assert.

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

12 years agoGeneric "VLIW" packetizer based on a DFA generated from target itinerary.
Andrew Trick [Wed, 15 Feb 2012 18:55:14 +0000 (18:55 +0000)]
Generic "VLIW" packetizer based on a DFA generated from target itinerary.

Patch by Sundeep!

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

12 years agoOptimize redundant sign extends and negation of predicates.
Sirish Pande [Wed, 15 Feb 2012 18:52:27 +0000 (18:52 +0000)]
Optimize redundant sign extends and negation of predicates.

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

12 years agoRevert "Replacing HexagonOptimizeSZExtends with HexagonPeephole."
Eric Christopher [Wed, 15 Feb 2012 18:34:25 +0000 (18:34 +0000)]
Revert "Replacing HexagonOptimizeSZExtends with HexagonPeephole."

This reverts commit 1656806a944bbd23e98c6e578810fe02495ab741.

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

12 years agoRevert "Optimize redundant sign extends and negation of predicates"
Eric Christopher [Wed, 15 Feb 2012 18:32:25 +0000 (18:32 +0000)]
Revert "Optimize redundant sign extends and negation of predicates"
as it's breaking the build.

This reverts commit 11241abca5e2a313412fed594bb9d9fa2a2057fb.

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

12 years agoReplacing HexagonOptimizeSZExtends with HexagonPeephole.
Sirish Pande [Wed, 15 Feb 2012 18:31:35 +0000 (18:31 +0000)]
Replacing HexagonOptimizeSZExtends with HexagonPeephole.

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

12 years agoOptimize redundant sign extends and negation of predicates
Sirish Pande [Wed, 15 Feb 2012 18:22:18 +0000 (18:22 +0000)]
Optimize redundant sign extends and negation of predicates

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

12 years agoAdd braces to if clause to make symmetric with associate else clause.
Chad Rosier [Wed, 15 Feb 2012 17:36:21 +0000 (17:36 +0000)]
Add braces to if clause to make symmetric with associate else clause.

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

12 years agoFor ELF, also call fixSymbolsInTLSFixups() on expressions passed to EmitValue (litera...
David Meyer [Wed, 15 Feb 2012 15:09:06 +0000 (15:09 +0000)]
For ELF, also call fixSymbolsInTLSFixups() on expressions passed to EmitValue (literal values). Previously only called on expressions in instructions. New test cases added to tls.s, tls-i386.s. Resolves PR11981.

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

12 years agoStrip the pointer casts from the constants here.
Bill Wendling [Wed, 15 Feb 2012 09:14:08 +0000 (09:14 +0000)]
Strip the pointer casts from the constants here.

The c'tor list is stored as a list of 'void ()*'s, so all of the functions are
bitcast to that. However, the dyn_cast doesn't automagically look through
bitcasts. Do that for it.
<rdar://problem/10813350>

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

12 years agoAdd a way to replace a field inside a metadata node. This can be
Eric Christopher [Wed, 15 Feb 2012 09:09:29 +0000 (09:09 +0000)]
Add a way to replace a field inside a metadata node. This can be
used to incrementally update a created node without needing a
temporary node and RAUW.

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

12 years agoRevert r150565 again. Appears to be a stage2 failure with dragonegg.
Andrew Trick [Wed, 15 Feb 2012 07:57:03 +0000 (07:57 +0000)]
Revert r150565 again. Appears to be a stage2 failure with dragonegg.

I'll put MachineLICM back before PEI. All my arm/x86 benchmarks look good, but buildbots don't like it.

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

12 years agoReapply r150565 with the typo fix properly merged.
Andrew Trick [Wed, 15 Feb 2012 05:43:27 +0000 (05:43 +0000)]
Reapply r150565 with the typo fix properly merged.

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

12 years agoreverting r150565. Premature push.
Andrew Trick [Wed, 15 Feb 2012 05:22:12 +0000 (05:22 +0000)]
reverting r150565. Premature push.

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

12 years agoMove PostRAMachineLICM into MachineLateOptimization. It now runs after PEI!
Andrew Trick [Wed, 15 Feb 2012 05:13:47 +0000 (05:13 +0000)]
Move PostRAMachineLICM into MachineLateOptimization. It now runs after PEI!

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

12 years agoAdd a check to make sure we don't assign slot indexes for instructions inside bundles.
Lang Hames [Wed, 15 Feb 2012 04:33:48 +0000 (04:33 +0000)]
Add a check to make sure we don't assign slot indexes for instructions inside bundles.

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

12 years agoAllow CodeGen (llc) command line options to work as expected.
Andrew Trick [Wed, 15 Feb 2012 03:21:51 +0000 (03:21 +0000)]
Allow CodeGen (llc) command line options to work as expected.

The llc command line options for enabling/disabling passes are local to CodeGen/Passes.cpp. This patch associates those options with standard pass IDs so they work regardless of how the target configures the passes.

A target has two ways of overriding standard passes:
1) Redefine the pass pipeline (override TargetPassConfig::add%Stage)
2) Replace or suppress individiual passes with TargetPassConfig::substitutePass.

In both cases, the command line options associated with the pass override the target default.

For example, say a target wants to disable machine instruction scheduling by default:

- The target calls disablePass(MachineSchedulerID) but otherwise does not override any TargetPassConfig methods.

- Without any llc options, no scheduler is run.

- With -enable-misched, the standard machine scheduler is run and honors the -misched=... flag to select the scheduler variant, which may be used for performance evaluation or testing.

Sorry overridePass is ugly. I haven't thought of a better way without replacing the cl::opt framework. I hope to do that one day...

I haven't figured out why CodeGen uses char& for pass IDs. AnalysisID is much easier to use and less bug prone. I'm using it wherever I can for internal implementation. Maybe later we can change the global pass ID definitions as well.

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

12 years agoAdded TargetPassConfig::disablePass/substitutePass as a general mechanism to override...
Andrew Trick [Wed, 15 Feb 2012 03:21:47 +0000 (03:21 +0000)]
Added TargetPassConfig::disablePass/substitutePass as a general mechanism to override specific passes.

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

12 years agocomment
Andrew Trick [Wed, 15 Feb 2012 03:21:43 +0000 (03:21 +0000)]
comment

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

12 years agoDon't emit live ranges for physregs live-ins that are dead.
Lang Hames [Wed, 15 Feb 2012 01:31:10 +0000 (01:31 +0000)]
Don't emit live ranges for physregs live-ins that are dead.

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

12 years agoDisentangle moving a machine instr from updating LiveIntervals.
Lang Hames [Wed, 15 Feb 2012 01:23:52 +0000 (01:23 +0000)]
Disentangle moving a machine instr from updating LiveIntervals.

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

12 years agoAdded hook to let targets custom lower splitting of illegal vectors
Pete Cooper [Wed, 15 Feb 2012 00:55:31 +0000 (00:55 +0000)]
Added hook to let targets custom lower splitting of illegal vectors

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

12 years agoUse a temporary variable, rather then a series of redundant calls.
Chad Rosier [Wed, 15 Feb 2012 00:36:26 +0000 (00:36 +0000)]
Use a temporary variable, rather then a series of redundant calls.

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

12 years agoStop custom lowering forr x86 DEC64m from happening if the load in the lowered sequen...
Pete Cooper [Wed, 15 Feb 2012 00:33:37 +0000 (00:33 +0000)]
Stop custom lowering forr x86 DEC64m from happening if the load in the lowered sequence has more than 1 user

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

12 years agoUse a temporary variable, rather then a series of redundant calls.
Chad Rosier [Wed, 15 Feb 2012 00:23:55 +0000 (00:23 +0000)]
Use a temporary variable, rather then a series of redundant calls.

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

12 years agoFix global live range splitting regmask accuracy.
Jakob Stoklund Olesen [Tue, 14 Feb 2012 23:53:23 +0000 (23:53 +0000)]
Fix global live range splitting regmask accuracy.

Pretend that regmask interference ends at the 'dead' slot, even when
there is other interference ending at the 'reg' slot of the same
instruction.

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

12 years agoFix details in local live range splitting with regmasks.
Jakob Stoklund Olesen [Tue, 14 Feb 2012 23:51:27 +0000 (23:51 +0000)]
Fix details in local live range splitting with regmasks.

Perform all comparisons at instruction granularity, and make sure
register masks on uses count in both gaps.

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

12 years agoHandle regmasks in findRegisterDefOperandIdx().
Jakob Stoklund Olesen [Tue, 14 Feb 2012 23:49:37 +0000 (23:49 +0000)]
Handle regmasks in findRegisterDefOperandIdx().

Only accept register masks when looking for an 'overlapping' def. When
Overlap is not set, the function searches for a proper definition of
Reg.

This means MI->modifiesRegister() considers register masks, but
MI->definesRegister() doesn't.

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

12 years agoUse the proper clobber check in handleLiveInRegister().
Jakob Stoklund Olesen [Tue, 14 Feb 2012 23:46:24 +0000 (23:46 +0000)]
Use the proper clobber check in handleLiveInRegister().

When a physreg is live in to a basic block, look for any instruction in
the block that clobbers the physreg.

The instruction doesn't have to properly redefine the register, any
overlapping clobber is OK.

This slightly changes live ranges when compiling with register masks.

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

12 years agoDump live intervals in numerical order.
Jakob Stoklund Olesen [Tue, 14 Feb 2012 23:46:21 +0000 (23:46 +0000)]
Dump live intervals in numerical order.

The old DenseMap hashed order was very confusing.

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

12 years agoDon't create a new copy of reserved regs - we already have one handy.
Lang Hames [Tue, 14 Feb 2012 23:06:12 +0000 (23:06 +0000)]
Don't create a new copy of reserved regs - we already have one handy.

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

12 years agoRemove unnecessary assignment to temporary, ResultReg.
Chad Rosier [Tue, 14 Feb 2012 22:29:48 +0000 (22:29 +0000)]
Remove unnecessary assignment to temporary, ResultReg.

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

12 years agoSilence the new -Wempty-body warning. It appeared because the next statement
Dmitri Gribenko [Tue, 14 Feb 2012 22:17:14 +0000 (22:17 +0000)]
Silence the new -Wempty-body warning.  It appeared because the next statement
after the `for(...) ;' has more indentation than for itself.

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

12 years agoUsing the new external-linkage warning recently added instead of disabling all return...
Aaron Ballman [Tue, 14 Feb 2012 21:44:03 +0000 (21:44 +0000)]
Using the new external-linkage warning recently added instead of disabling all return type warnings.

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

12 years agoFixing warning due to the new "UTD return type in extern 'C'".
Aaron Ballman [Tue, 14 Feb 2012 21:29:32 +0000 (21:29 +0000)]
Fixing warning due to the new "UTD return type in extern 'C'".

Patch by Matt Johnson

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

12 years agoAdd code to the target lowering object file module to handle module flags.
Bill Wendling [Tue, 14 Feb 2012 21:28:13 +0000 (21:28 +0000)]
Add code to the target lowering object file module to handle module flags.

The MachO back-end needs to emit the garbage collection flags specified in the
module flags. This is a WIP, so the front-end hasn't been modified to emit these
flags just yet. Documentation and front-end switching to occur soon.

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

12 years agoUpdate MachineVerifier to check the new physreg live-in rules.
Lang Hames [Tue, 14 Feb 2012 19:17:48 +0000 (19:17 +0000)]
Update MachineVerifier to check the new physreg live-in rules.

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

12 years agoTighten physical register invariants: Allocatable physical registers can
Lang Hames [Tue, 14 Feb 2012 18:51:53 +0000 (18:51 +0000)]
Tighten physical register invariants: Allocatable physical registers can
only be live in to a block if it is the function entry point or a landing pad.

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

12 years agoFix PR12000. Some vector operations may use scalar operands with types
Nadav Rotem [Tue, 14 Feb 2012 13:06:32 +0000 (13:06 +0000)]
Fix PR12000. Some vector operations may use scalar operands with types
that are greater than the vector element type. For example BUILD_VECTOR
of type <1 x i1> with a constant i8 operand.
This patch fixes the assertion.

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

12 years agoTurn push_back loops into append/insert.
Benjamin Kramer [Tue, 14 Feb 2012 10:29:27 +0000 (10:29 +0000)]
Turn push_back loops into append/insert.

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