oota-llvm.git
12 years agoAdd API "handleMoveIntoBundl" for updating liveness when moving instructions into
Lang Hames [Tue, 21 Feb 2012 22:29:38 +0000 (22:29 +0000)]
Add API "handleMoveIntoBundl" for updating liveness when moving instructions into
bundles. This method takes a bundle start and an MI being bundled, and makes
the intervals for the MI's operands appear to start/end on the bundle start.

Also fixes some minor cosmetic issues (whitespace, naming convention) in the
HMEditor code.

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

12 years agoTestcase for previous commit.
Eric Christopher [Tue, 21 Feb 2012 22:25:56 +0000 (22:25 +0000)]
Testcase for previous commit.

rdar://10493979

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

12 years agoThere's no need for a DW_AT_byte_size on a pointer type.
Eric Christopher [Tue, 21 Feb 2012 22:25:53 +0000 (22:25 +0000)]
There's no need for a DW_AT_byte_size on a pointer type.

Part of rdar://10493979 where it reduces by about .5% (10k)

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

12 years agoUse the target-aware constant folder on expressions to improve the chance
Nick Lewycky [Tue, 21 Feb 2012 22:08:06 +0000 (22:08 +0000)]
Use the target-aware constant folder on expressions to improve the chance
they'll be simple enough to simulate, and to reduce the chance we'll encounter
equal but different simple pointer constants.

This removes the symptoms from PR11352 but is not a full fix. A proper fix would
either require a guarantee that two constant objects we simulate are folded
when equal, or a different way of handling equal pointers (ie., trying a
constantexpr icmp on them to see whether we know they're equal or non-equal or
unsure).

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

12 years agoProper support for a bastardized darwin-eabi hybird ABI.
Evan Cheng [Tue, 21 Feb 2012 20:46:00 +0000 (20:46 +0000)]
Proper support for a bastardized darwin-eabi hybird ABI.

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

12 years agos/the the/the/
Rafael Espindola [Tue, 21 Feb 2012 19:27:16 +0000 (19:27 +0000)]
s/the the/the/

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

12 years agoFix unsigned off-by-one in comment.
Benjamin Kramer [Tue, 21 Feb 2012 13:40:06 +0000 (13:40 +0000)]
Fix unsigned off-by-one in comment.

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

12 years agoInstCombine: Don't transform a signed icmp of two GEPs into a signed compare of the...
Benjamin Kramer [Tue, 21 Feb 2012 13:31:09 +0000 (13:31 +0000)]
InstCombine: Don't transform a signed icmp of two GEPs into a signed compare of the indices.

This transformation is not safe in some pathological cases (signed icmp of pointers should be an
extremely rare thing, but it's valid IR!). Add an explanatory comment.

Kudos to Duncan for pointing out this edge case (and not giving up explaining it until I finally got it).

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

12 years agoMove the implementation of StringRef::split out of StringExtras.cpp
Duncan Sands [Tue, 21 Feb 2012 12:00:25 +0000 (12:00 +0000)]
Move the implementation of StringRef::split out of StringExtras.cpp
and into StringRef.cpp, which is where the other StringRef stuff is.

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

12 years agotest/CodeGen/X86/2012-02-20-MachineCPBug.ll: Fix on generic(non-x86) hosts to add...
NAKAMURA Takumi [Tue, 21 Feb 2012 11:56:42 +0000 (11:56 +0000)]
test/CodeGen/X86/2012-02-20-MachineCPBug.ll: Fix on generic(non-x86) hosts to add -mattr=+sse.

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

12 years agoRevert r151049 cos it broke the buildbots.
Jay Foad [Tue, 21 Feb 2012 11:44:46 +0000 (11:44 +0000)]
Revert r151049 cos it broke the buildbots.

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

12 years agoTiny cosmetic change to use the same style for all of the while loops in
Chandler Carruth [Tue, 21 Feb 2012 09:29:14 +0000 (09:29 +0000)]
Tiny cosmetic change to use the same style for all of the while loops in
the normalize routine, especially the empty while loops.

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

12 years agoPR1210: make uniquing of struct and function types more efficient by
Jay Foad [Tue, 21 Feb 2012 09:25:52 +0000 (09:25 +0000)]
PR1210: make uniquing of struct and function types more efficient by
using a DenseMap and Talin's new GeneralHash, avoiding the need for a
temporary std::vector on every lookup.

Patch by Meador Inge!

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

12 years agoReplace a hand rolled loop with a lovely StringRef helper we have these
Chandler Carruth [Tue, 21 Feb 2012 09:12:48 +0000 (09:12 +0000)]
Replace a hand rolled loop with a lovely StringRef helper we have these
days. No functionality changed.

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

12 years agoPull the parsing helper functions out of the Triple interface entirely.
Chandler Carruth [Tue, 21 Feb 2012 08:53:32 +0000 (08:53 +0000)]
Pull the parsing helper functions out of the Triple interface entirely.
They're private static methods but we can just make them static
functions in the implementation. It makes the implementations a touch
more wordy, but takes another chunk out of the header file.

Also, take the opportunity to switch the names to the new coding
conventions.

No functionality changed here.

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

12 years agoClean up comments that I missed when changing the triple representation.
Chandler Carruth [Tue, 21 Feb 2012 08:31:18 +0000 (08:31 +0000)]
Clean up comments that I missed when changing the triple representation.
Somehow, I even missed the ones I wrote just the other day...

Thanks to Matt for the code review.

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

12 years agoReorder some members in MCRegisterClass to remove padding on 64-bit builds.
Craig Topper [Tue, 21 Feb 2012 07:36:39 +0000 (07:36 +0000)]
Reorder some members in MCRegisterClass to remove padding on 64-bit builds.

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

12 years agoIn generated RegisterInfo files, replace a pointer to the end of an array with just...
Craig Topper [Tue, 21 Feb 2012 06:54:41 +0000 (06:54 +0000)]
In generated RegisterInfo files, replace a pointer to the end of an array with just the size of the array to avoid relocations.

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

12 years agoMerge some tables in generated RegisterInfo file. Store indices into larger table...
Craig Topper [Tue, 21 Feb 2012 06:23:21 +0000 (06:23 +0000)]
Merge some tables in generated RegisterInfo file. Store indices into larger table instead of pointers to reduce relocations and shrink table size on 64-bit builds. Shaves ~24K off X86MCTargetDesc.o. Accidentally commited only part of this in r151038.

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

12 years agoMerge some tables in generated RegisterInfo file. Store indices into larger table...
Craig Topper [Tue, 21 Feb 2012 06:22:36 +0000 (06:22 +0000)]
Merge some tables in generated RegisterInfo file. Store indices into larger table instead of pointers to reduce relocations and shrink table size on 64-bit builds. Shaves ~24K off X86MCTargetDesc.o

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

12 years agoClear virtual registers after they are no longer referenced.
Andrew Trick [Tue, 21 Feb 2012 04:51:23 +0000 (04:51 +0000)]
Clear virtual registers after they are no longer referenced.

Passes after RegAlloc should be able to rely on MRI->getNumVirtRegs() == 0.
This makes sharing code for pre/postRA passes more robust.
Now, to check if a pass is running before the RA pipeline begins, use MRI->isSSA().
To check if a pass is running after the RA pipeline ends, use !MRI->getNumVirtRegs().

PEI resets virtual regs when it's done scavenging.

PTX will either have to provide its own PEI pass or assign physregs.

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

12 years agoStackSlotColoring does not use a VirtRegMap
Andrew Trick [Tue, 21 Feb 2012 04:51:19 +0000 (04:51 +0000)]
StackSlotColoring does not use a VirtRegMap

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

12 years agowhitespace
Andrew Trick [Tue, 21 Feb 2012 04:51:17 +0000 (04:51 +0000)]
whitespace

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

12 years agoUse more idiomatic assert.
Rafael Espindola [Tue, 21 Feb 2012 03:51:14 +0000 (03:51 +0000)]
Use more idiomatic assert.

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

12 years agoAvoid warning on non assert builds.
Rafael Espindola [Tue, 21 Feb 2012 03:48:30 +0000 (03:48 +0000)]
Avoid warning on non assert builds.

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

12 years agoSwitch the llvm::Triple class to immediately parse the triple string on
Chandler Carruth [Tue, 21 Feb 2012 03:39:36 +0000 (03:39 +0000)]
Switch the llvm::Triple class to immediately parse the triple string on
construction. Simplify its interface, implementation, and users
accordingly as there is no longer an 'uninitialized' state to check for.
Also, fixes a bug lurking in the interface as there was one method that
didn't correctly check for initialization.

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

12 years agoIt turns out that with the current scev organization ReuseOrCreateCast cannot
Rafael Espindola [Tue, 21 Feb 2012 01:19:51 +0000 (01:19 +0000)]
It turns out that with the current scev organization ReuseOrCreateCast cannot
know where users will be added. Because of this, it cannot use
Builder.GetInsertPoint at all.

This patch
* removes the FIXME about adding the assert.
* adds a comment explaining hy we don't have one.
* removes a broken logic that only works for some callers and is not needed
  since r150884.
* adds an assert to caller that would have caught the bug fixed by r150884.

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

12 years agoFix some bugs in HMEditor's moveAllOperandsInto logic.
Lang Hames [Tue, 21 Feb 2012 00:00:36 +0000 (00:00 +0000)]
Fix some bugs in HMEditor's moveAllOperandsInto logic.

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

12 years agoCheck for the correct size in the invariant marker.
Nick Lewycky [Mon, 20 Feb 2012 23:32:26 +0000 (23:32 +0000)]
Check for the correct size in the invariant marker.

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

12 years agoFix machine-cp by having it to check sub-register indicies. e.g.
Evan Cheng [Mon, 20 Feb 2012 23:28:17 +0000 (23:28 +0000)]
Fix machine-cp by having it to check sub-register indicies. e.g.
ecx = mov eax
al  = mov ch
The second copy is not a nop because the sub-indices of ecx,ch is not the
same of that of eax/al.

Re-enabled machine-cp.
PR11940

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

12 years agoFix 80-column violation.
Chad Rosier [Mon, 20 Feb 2012 23:13:17 +0000 (23:13 +0000)]
Fix 80-column violation.

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

12 years agoTest case for r150978.
Benjamin Kramer [Mon, 20 Feb 2012 19:00:28 +0000 (19:00 +0000)]
Test case for r150978.

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

12 years agoInstCombine: Removing the base from the address calculation is only safe when the...
Benjamin Kramer [Mon, 20 Feb 2012 18:45:10 +0000 (18:45 +0000)]
InstCombine: Removing the base from the address calculation is only safe when the GEPs are inbounds.

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

12 years agoMake this a bit prettier and more obvious when a derived type isn't
Eric Christopher [Mon, 20 Feb 2012 18:04:39 +0000 (18:04 +0000)]
Make this a bit prettier and more obvious when a derived type isn't
derived from anything.

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

12 years agoIf a derived type is also a composite type, print that information
Eric Christopher [Mon, 20 Feb 2012 18:04:35 +0000 (18:04 +0000)]
If a derived type is also a composite type, print that information
too.

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

12 years agoAdd support for runtime languages on our forward declarations.
Eric Christopher [Mon, 20 Feb 2012 18:04:14 +0000 (18:04 +0000)]
Add support for runtime languages on our forward declarations.

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

12 years agoInstCombine: When comparing two GEPs that were derived from the same base pointer...
Benjamin Kramer [Mon, 20 Feb 2012 15:07:47 +0000 (15:07 +0000)]
InstCombine: When comparing two GEPs that were derived from the same base pointer but use different types, expand the offset calculation and to the compare on the offset if profitable.

This came up in SmallVector code.

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

12 years agoInstCombine: Make OptimizePointerDifference more aggressive.
Benjamin Kramer [Mon, 20 Feb 2012 14:34:57 +0000 (14:34 +0000)]
InstCombine: Make OptimizePointerDifference more aggressive.

- Ignore pointer casts.
- Also expand GEPs that aren't constantexprs when they have one use or only constant indices.

- We now compile "&foo[i] - &foo[j]" into "i - j".

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

12 years agoTeach the DAGCombiner that certain loadext nodes followed by ANDs can be converted...
James Molloy [Mon, 20 Feb 2012 12:02:38 +0000 (12:02 +0000)]
Teach the DAGCombiner that certain loadext nodes followed by ANDs can be converted to zeroexts.

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

12 years agoImprove generated code for extending loads and some trunc stores on ARM.
James Molloy [Mon, 20 Feb 2012 09:24:05 +0000 (09:24 +0000)]
Improve generated code for extending loads and some trunc stores on ARM.

Teach TargetSelectionDAG about lengthening loads for vector types and set v4i8 as legal. Allow FP_TO_UINT for v4i16 from v4i32.

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

12 years agoMake post-ra tail duplication bundle safe. No test case as recent codegen
Evan Cheng [Mon, 20 Feb 2012 07:51:58 +0000 (07:51 +0000)]
Make post-ra tail duplication bundle safe. No test case as recent codegen
flow changes have already hidden the bug. rdar://10893812

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

12 years agoRename class Evaluate to Evaluator and put it in an anonymous namespace.
Nick Lewycky [Mon, 20 Feb 2012 03:25:59 +0000 (03:25 +0000)]
Rename class Evaluate to Evaluator and put it in an anonymous namespace.

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

12 years agofold comparisons of gep'd alloca points with null to false,
Chris Lattner [Mon, 20 Feb 2012 00:42:49 +0000 (00:42 +0000)]
fold comparisons of gep'd alloca points with null to false,
implementing PR12013.  We now compile the testcase to:

__Z4testv:                              ## @_Z4testv
## BB#0:                                ## %_ZN4llvm15SmallVectorImplIiE9push_backERKi.exit
pushq %rbx
subq $64, %rsp
leaq 32(%rsp), %rbx
movq %rbx, (%rsp)
leaq 64(%rsp), %rax
movq %rax, 16(%rsp)
movl $1, 32(%rsp)
leaq 36(%rsp), %rax
movq %rax, 8(%rsp)
leaq (%rsp), %rdi
callq __Z1gRN4llvm11SmallVectorIiLj8EEE
movq (%rsp), %rdi
cmpq %rbx, %rdi
je LBB0_2
## BB#1:
callq _free
LBB0_2:                                 ## %_ZN4llvm11SmallVectorIiLj8EED1Ev.exit
addq $64, %rsp
popq %rbx
ret

instead of:

__Z4testv:                              ## @_Z4testv
## BB#0:
pushq %rbx
subq $64, %rsp
xorl %eax, %eax
leaq (%rsp), %rbx
addq $32, %rbx
movq %rbx, (%rsp)
movq %rbx, 8(%rsp)
leaq 64(%rsp), %rcx
movq %rcx, 16(%rsp)
je LBB0_2
## BB#1:
movl $1, 32(%rsp)
movq %rbx, %rax
LBB0_2:                                 ## %_ZN4llvm15SmallVectorImplIiE9push_backERKi.exit
addq $4, %rax
movq %rax, 8(%rsp)
leaq (%rsp), %rdi
callq __Z1gRN4llvm11SmallVectorIiLj8EEE
movq (%rsp), %rdi
cmpq %rbx, %rdi
je LBB0_4
## BB#3:
callq _free
LBB0_4:                                 ## %_ZN4llvm11SmallVectorIiLj8EED1Ev.exit
addq $64, %rsp
popq %rbx
ret

This doesn't shrink clang noticably though.

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

12 years agoSwitch to a more idiomatic way of silencing unused variable warnings in
Chandler Carruth [Mon, 20 Feb 2012 00:02:49 +0000 (00:02 +0000)]
Switch to a more idiomatic way of silencing unused variable warnings in
release builds. Silences clang's -Wself-assign.

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

12 years agoMove constructors out-of-line and flesh out their documentation. No
Chandler Carruth [Mon, 20 Feb 2012 00:02:47 +0000 (00:02 +0000)]
Move constructors out-of-line and flesh out their documentation. No
functionality changed. This is in preparation for some refactoring of
how this class behaves.

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

12 years agoMove EvaluateFunction and EvaluateBlock into a class, and make the class store
Nick Lewycky [Sun, 19 Feb 2012 23:26:27 +0000 (23:26 +0000)]
Move EvaluateFunction and EvaluateBlock into a class, and make the class store
the information that they pass around between them. No functionality change!

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

12 years agoSilence operator precedence warning.
Benjamin Kramer [Sun, 19 Feb 2012 12:25:07 +0000 (12:25 +0000)]
Silence operator precedence warning.

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

12 years agoautoconf/m4/visibility_inlines_hidden.m4: Tweak for cygwin-g++-4.5.3. It folded conft...
NAKAMURA Takumi [Sun, 19 Feb 2012 12:05:12 +0000 (12:05 +0000)]
autoconf/m4/visibility_inlines_hidden.m4: Tweak for cygwin-g++-4.5.3. It folded conftest regardress of attributge((noinline)) with >=O1 .

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

12 years agoRemove dead code. Improve llvm_unreachable text. Simplify some control flow.
Ahmed Charles [Sun, 19 Feb 2012 11:37:01 +0000 (11:37 +0000)]
Remove dead code. Improve llvm_unreachable text. Simplify some control flow.

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

12 years agoStringRef'ize EmitSourceFileHeader().
Ahmed Charles [Sun, 19 Feb 2012 11:35:20 +0000 (11:35 +0000)]
StringRef'ize EmitSourceFileHeader().

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

12 years agoRemove some unneeded includes and fix ordering in X86ISelLowering.cpp. Remove unneede...
Craig Topper [Sun, 19 Feb 2012 07:15:48 +0000 (07:15 +0000)]
Remove some unneeded includes and fix ordering in X86ISelLowering.cpp. Remove unneeded 'using namespace'.

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

12 years agoAdd machinery for pushing live ranges onto bundle starts while bundling.
Lang Hames [Sun, 19 Feb 2012 07:13:05 +0000 (07:13 +0000)]
Add machinery for pushing live ranges onto bundle starts while bundling.

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

12 years agoSimplify moveEnteringDownFrom rules.
Lang Hames [Sun, 19 Feb 2012 06:13:56 +0000 (06:13 +0000)]
Simplify moveEnteringDownFrom rules.

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

12 years agoUnify all shuffle mask checking functions take a mask and VT instead of VectorShuffle...
Craig Topper [Sun, 19 Feb 2012 05:41:45 +0000 (05:41 +0000)]
Unify all shuffle mask checking functions take a mask and VT instead of VectorShuffleSDNode.

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

12 years agoSkip through instructions rather than operands when looking for last use slot.
Lang Hames [Sun, 19 Feb 2012 04:38:25 +0000 (04:38 +0000)]
Skip through instructions rather than operands when looking for last use slot.

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

12 years agoAPFloat::toString(): Fix overrun at scanning.
NAKAMURA Takumi [Sun, 19 Feb 2012 03:18:29 +0000 (03:18 +0000)]
APFloat::toString(): Fix overrun at scanning.

FYI, clang/test/SemaTemplate/template-id-printing.cpp had been failing due to it on cygwin-clang.

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

12 years agoFix TODO and trailing whitespace.
Lang Hames [Sun, 19 Feb 2012 03:09:55 +0000 (03:09 +0000)]
Fix TODO and trailing whitespace.

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

12 years agoDefer sanity checks on live intervals until after all have been updated. Hold (LiveIn...
Lang Hames [Sun, 19 Feb 2012 03:00:30 +0000 (03:00 +0000)]
Defer sanity checks on live intervals until after all have been updated. Hold (LiveInterval, LiveRange) pairs to update, rather than vregs.

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

12 years agoMake a bunch of X86ISelLowering shuffle functions static now that they are no longer...
Craig Topper [Sun, 19 Feb 2012 02:53:47 +0000 (02:53 +0000)]
Make a bunch of X86ISelLowering shuffle functions static now that they are no longer needed by isel.

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

12 years agocomment fix ARM.h
Jia Liu [Sun, 19 Feb 2012 02:04:03 +0000 (02:04 +0000)]
comment fix ARM.h

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

12 years agosome comment fix for X86 and ARM
Jia Liu [Sun, 19 Feb 2012 02:03:36 +0000 (02:03 +0000)]
some comment fix for X86 and ARM

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

12 years agoAdd vmfunc instruction to X86 assembler and disassembler.
Craig Topper [Sun, 19 Feb 2012 01:39:49 +0000 (01:39 +0000)]
Add vmfunc instruction to X86 assembler and disassembler.

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

12 years agoFix issue with bitwise and precedence.
Ahmed Charles [Sat, 18 Feb 2012 22:56:41 +0000 (22:56 +0000)]
Fix issue with bitwise and precedence.

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

12 years agoHashing.h - utilities for hashing various data types.
Talin [Sat, 18 Feb 2012 21:00:49 +0000 (21:00 +0000)]
Hashing.h - utilities for hashing various data types.

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

12 years agoWhite space fixes.
Rafael Espindola [Sat, 18 Feb 2012 19:46:02 +0000 (19:46 +0000)]
White space fixes.

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

12 years agoTemporarily disable this assert. Looks like it found a similar issue when
Rafael Espindola [Sat, 18 Feb 2012 17:51:43 +0000 (17:51 +0000)]
Temporarily disable this assert. Looks like it found a similar issue when
building bullet.

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

12 years agoDon't skip debug instructions when looking for the insertion point of
Rafael Espindola [Sat, 18 Feb 2012 17:22:58 +0000 (17:22 +0000)]
Don't skip debug instructions when looking for the insertion point of
the cast. If we do, we can end up with

   inst1
   ---------------  < Insertion point
   dbg inst
   new inst

instead of the desired

   inst1
   new inst
   ---------------  < Insertion point
   dbg inst

Another option would be for InsertNoopCastOfTo (or its callers) to move the
insertion point and we would end up with

   inst1
   dbg inst
   new inst
   ---------------  < Insertion point

but that complicates the callers. This fixes PR12018 (and firefox's build).

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

12 years agoEmacs-tag and some comment fix for all ARM, CellSPU, Hexagon, MBlaze, MSP430, PPC...
Jia Liu [Sat, 18 Feb 2012 12:03:15 +0000 (12:03 +0000)]
Emacs-tag and some comment fix for all ARM, CellSPU, Hexagon, MBlaze, MSP430, PPC, PTX, Sparc, X86, XCore.

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

12 years agoOn Cygwin/MingW, add SharedLibDir and LLVMToolDir to the library search path, since...
David Meyer [Sat, 18 Feb 2012 10:03:19 +0000 (10:03 +0000)]
On Cygwin/MingW, add SharedLibDir and LLVMToolDir to the library search path, since shared libraries are placed in 'bin'. (static libraries are still in 'lib').

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

12 years agoAdd X86InstrSVM.td that I forgot to add in r150873.
Craig Topper [Sat, 18 Feb 2012 08:34:12 +0000 (08:34 +0000)]
Add X86InstrSVM.td that I forgot to add in r150873.

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

12 years agoAdd X86 assembler and disassembler support for AMD SVM instructions. Original patch...
Craig Topper [Sat, 18 Feb 2012 08:19:49 +0000 (08:19 +0000)]
Add X86 assembler and disassembler support for AMD SVM instructions. Original patch by Kay Tiong Khoo. Few tweaks by me for code density and to reduce replication.

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

12 years agoTrivial cleanup to group the generic 'armvN' cases with the 'arm' case,
Chandler Carruth [Sat, 18 Feb 2012 04:34:17 +0000 (04:34 +0000)]
Trivial cleanup to group the generic 'armvN' cases with the 'arm' case,
etc. No functionality changed.

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

12 years agoFix a rather nasty regression from r150690: LHS != RHS does not imply LHS->stripPoint...
Eli Friedman [Sat, 18 Feb 2012 03:29:25 +0000 (03:29 +0000)]
Fix a rather nasty regression from r150690: LHS != RHS does not imply LHS->stripPointerCasts() != RHS->stripPointerCasts().

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

12 years agoFix documentation.
Chad Rosier [Sat, 18 Feb 2012 01:38:41 +0000 (01:38 +0000)]
Fix documentation.

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

12 years agoTestcase for the previous commit.
Eric Christopher [Sat, 18 Feb 2012 00:05:45 +0000 (00:05 +0000)]
Testcase for the previous commit.

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

12 years agoBring HMEditor into line with LLVM coding standards.
Lang Hames [Fri, 17 Feb 2012 23:43:40 +0000 (23:43 +0000)]
Bring HMEditor into line with LLVM coding standards.

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

12 years agoIgnore the lifetime intrinsics in fast-isel.
Eric Christopher [Fri, 17 Feb 2012 23:03:39 +0000 (23:03 +0000)]
Ignore the lifetime intrinsics in fast-isel.

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

12 years agoDon't print out pointer values in SUnit::dump().
Jakob Stoklund Olesen [Fri, 17 Feb 2012 21:44:51 +0000 (21:44 +0000)]
Don't print out pointer values in SUnit::dump().

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

12 years agoSink variable into assert
Matt Beaumont-Gay [Fri, 17 Feb 2012 21:40:48 +0000 (21:40 +0000)]
Sink variable into assert

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

12 years agoAdd support for regmask slots to HMEditor. Also fixes a comment error.
Lang Hames [Fri, 17 Feb 2012 21:29:41 +0000 (21:29 +0000)]
Add support for regmask slots to HMEditor. Also fixes a comment error.

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

12 years agoFix typo in comment ldopen() -> dlopen().
Kevin Enderby [Fri, 17 Feb 2012 19:26:00 +0000 (19:26 +0000)]
Fix typo in comment ldopen() -> dlopen().

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

12 years agoHandle regmask operands in ARMInstrInfo.
Jakob Stoklund Olesen [Fri, 17 Feb 2012 19:23:15 +0000 (19:23 +0000)]
Handle regmask operands in ARMInstrInfo.

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

12 years agoPut back the initializing the targets in the disassembler API with a comment as
Kevin Enderby [Fri, 17 Feb 2012 19:18:29 +0000 (19:18 +0000)]
Put back the initializing the targets in the disassembler API with a comment as
to why this is needed.  This broke the darwin's otool(1) program.  This change
was made in r144385.

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

12 years agoFix ARMBaseInstrInfo::getInstrLatency for calls.
Jakob Stoklund Olesen [Fri, 17 Feb 2012 19:07:59 +0000 (19:07 +0000)]
Fix ARMBaseInstrInfo::getInstrLatency for calls.

Calls always clobber CPSR.

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

12 years agoTransfer regmasks to MRI.
Jakob Stoklund Olesen [Fri, 17 Feb 2012 19:07:56 +0000 (19:07 +0000)]
Transfer regmasks to MRI.

MRI keeps track of which physregs have been used. Make sure it gets
updated with all the regmask-clobbered registers.

Delete the closePhysRegsUsed() function which isn't necessary.

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

12 years agoCalls and invokes with the new clang.arc.no_objc_arc_exceptions
Dan Gohman [Fri, 17 Feb 2012 18:59:53 +0000 (18:59 +0000)]
Calls and invokes with the new clang.arc.no_objc_arc_exceptions
metadata may still unwind, but only in ways that the ARC
optimizer doesn't need to consider. This permits more
aggressive optimization.

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

12 years agoRefactor 'handleMove' code in live intervals. Clients of LiveIntervals won't see
Lang Hames [Fri, 17 Feb 2012 18:44:18 +0000 (18:44 +0000)]
Refactor 'handleMove' code in live intervals. Clients of LiveIntervals won't see
any changes.

Internally this adds a private inner class HMEditor, to LiveIntervals. HMEditor provides
an API for updating live intervals when code is moved or bundled.

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

12 years agoRemove a comment about an alternative approach that wouldn't
Dan Gohman [Fri, 17 Feb 2012 18:33:38 +0000 (18:33 +0000)]
Remove a comment about an alternative approach that wouldn't
actually work, at least as described. LLVM Metadata is not
intended to suppress LLVM IR rules, as it can be stripped at
any time.

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

12 years agoTidy up.
Jim Grosbach [Fri, 17 Feb 2012 17:35:10 +0000 (17:35 +0000)]
Tidy up.

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

12 years agoGenerate the correct EH frame section types on Solaris, this time without breaking...
David Chisnall [Fri, 17 Feb 2012 17:31:15 +0000 (17:31 +0000)]
Generate the correct EH frame section types on Solaris, this time without breaking other platforms...

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

12 years agoRevert r150814. It turns out that there is a good reason for this after all...
David Chisnall [Fri, 17 Feb 2012 16:51:02 +0000 (16:51 +0000)]
Revert r150814.  It turns out that there is a good reason for this after all...

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

12 years agoRevert r150288, "Allow Post-RA LICM to hoist reserved register reads."
Jakob Stoklund Olesen [Fri, 17 Feb 2012 16:40:44 +0000 (16:40 +0000)]
Revert r150288, "Allow Post-RA LICM to hoist reserved register reads."

This caused miscompilations on out-of-tree targets, and possibly i386 as
well.

I'll find some other way of hoisting %rip-relative loads from loops
containing calls.

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

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