Commit Graph

39157 Commits

Author SHA1 Message Date
Dan Gohman
e368b460a2 Eliminate unnecessary uses of getZExtValue().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106279 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-18 14:22:04 +00:00
Dan Gohman
7720cb3823 isValueValidForType can be a static member function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106278 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-18 14:01:07 +00:00
Eric Christopher
f627dc37bf Some assorted isTwoAddress -> Constraints cleanup.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106273 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-18 02:41:19 +00:00
Dan Gohman
963433115a Handle execution entrypoints with non-integer return types.
Fix from Russel Power in PR7284.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106271 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-18 02:01:10 +00:00
Dan Gohman
a52838285b Disable indvars on loops when LoopSimplify form is not available.
This fixes PR7333.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106267 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-18 01:35:11 +00:00
Dan Gohman
e54081088e Don't maintain a set of deleted nodes; instead, use a HandleSDNode
to track a node over CSE events. This fixes PR7368.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106266 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-18 01:24:29 +00:00
Bruno Cardoso Lopes
d7f9cc4de7 Add {mix,max}{ss,sd}{rr,rm} AVX forms.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106264 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-18 01:12:56 +00:00
Dan Gohman
8a7f7426ee Fold the ShrinkDemandedOps pass into the regular DAGCombiner pass,
which is faster, simpler, and less surprising.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106263 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-18 01:05:21 +00:00
Dan Gohman
4f46e14b8a Fix a typo in a comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106260 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-18 00:53:08 +00:00
Dan Gohman
9e86a73568 Handle ext(ext(x)) -> ext(x) immediately, since it's simple.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106256 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-18 00:08:30 +00:00
Dan Gohman
27ed6a41ce Simplify this code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106254 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-17 23:34:09 +00:00
Bruno Cardoso Lopes
597ec8ed51 Use new tablegen resources in SSE tablegen code. This will
be done incrementally and intermixed with the adding of more
AVX instructions. This is a first step in that direction


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106251 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-17 23:05:30 +00:00
Stuart Hastings
3bf9125933 Add a DebugLoc parameter to TargetInstrInfo::InsertBranch(). This
addresses a longstanding deficiency noted in many FIXMEs scattered
across all the targets.

This effectively moves the problem up one level, replacing eleven
FIXMEs in the targets with eight FIXMEs in CodeGen, plus one path
through FastISel where we actually supply a DebugLoc, fixing Radar
7421831.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106243 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-17 22:43:56 +00:00
Jim Grosbach
59c38f31ac add missing break. inconsequential as the code shouldn't be reached, but
for correctness' sake, it should be there.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106229 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-17 17:58:54 +00:00
Jim Grosbach
b56ce8171e Add entries for Expanding atomic intrinsics to libcalls. Just a placeholder
for the moment. The implementation of the libcall will follow.

Currently, the llvm-gcc knows when the intrinsics can be correctly handled by
the back end and only generates them in those cases, issuing libcalls directly
otherwise. That's too much coupling. The intrinsics should always be
generated and the back end decide how to handle them, be it with a libcall,
inline code, or whatever. This patch is a step in that direction.

rdar://8097623



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106227 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-17 17:50:54 +00:00
Jim Grosbach
7072cf62a5 Thumb1 and any pre-v6 ARM target should use the libcall expansion of
ISD::MEMBARRIER. v7 and v7 ARM mode continue to use the custom lowering.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106204 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-17 02:02:03 +00:00
Jim Grosbach
bbfc0d22a9 ISD::MEMBARRIER should lower to a libcall (__sync_synchronize) if the target
sets the legalize action to Expand.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106203 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-17 02:00:53 +00:00
Jim Grosbach
c73993b678 simplify code a bit and add a more explanatory assert for cases that
previously would result in 'cannot yet select' errors.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106199 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-17 01:37:00 +00:00
Jason Molenda
f7a503e6bb Add the entire range of DW_OP_lit[0..31], DW_OP_reg[0..31], and
DW_OP_breg[0..31] to Dwarf.h.

Add "DW_" prefix to the llvm::dwarf::*String methods which did not
already have them in Dwarf.cpp.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106197 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-17 01:23:24 +00:00
Eric Christopher
e98ad83543 Hack to let the move lowering handle dynamic-no-pic absolute moves of
TLVP:

movl _a@TLVP, %eax

Daniel: Please review if you get a chance.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106194 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-17 00:51:48 +00:00
Eric Christopher
04b8d3cc49 Update comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106191 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-17 00:49:46 +00:00
Jim Grosbach
7616b646f1 format and 80-column cleanup
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106173 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-16 23:45:49 +00:00
Jim Grosbach
d0e8469ba6 remove trailing whitespace
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106164 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-16 22:41:09 +00:00
Jakob Stoklund Olesen
a2846b4bee Don't attempt preserving conservative kill flags. We were doing it wrong.
This is before LiveVariables anyway, where these kill flags are recalculated.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106157 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-16 22:11:08 +00:00
Bob Wilson
07f6e805b1 Remove the hidden "neon-reg-sequence" option. The reg sequences are working
now, so there's no need to disable them.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106155 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-16 21:34:01 +00:00
Eric Christopher
bc06737c35 In progress on 32-bit addends.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106154 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-16 21:32:38 +00:00
Jakob Stoklund Olesen
c66d0f2a93 Allow a register to be redefined multiple times in a basic block.
LiveVariableAnalysis was a bit picky about a register only being redefined once,
but that really isn't necessary.

Here is an example of chained INSERT_SUBREGs that we can handle now:

68      %reg1040<def> = INSERT_SUBREG %reg1040, %reg1028<kill>, 14
                register: %reg1040 +[70,134:0)
76      %reg1040<def> = INSERT_SUBREG %reg1040, %reg1029<kill>, 13
                register: %reg1040 replace range with [70,78:1) RESULT: %reg1040,0.000000e+00 = [70,78:1)[78,134:0)  0@78-(134) 1@70-(78)
84      %reg1040<def> = INSERT_SUBREG %reg1040, %reg1030<kill>, 12
                register: %reg1040 replace range with [78,86:2) RESULT: %reg1040,0.000000e+00 = [70,78:1)[78,86:2)[86,134:0)  0@86-(134) 1@70-(78) 2@78-(86)
92      %reg1040<def> = INSERT_SUBREG %reg1040, %reg1031<kill>, 11
                register: %reg1040 replace range with [86,94:3) RESULT: %reg1040,0.000000e+00 = [70,78:1)[78,86:2)[86,94:3)[94,134:0)  0@94-(134) 1@70-(78) 2@78-(86) 3@86-(94)

rdar://problem/8096390

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106152 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-16 21:29:40 +00:00
Jim Grosbach
08f55d02da A few more places where SCEVExpander bits need to skip over debug intrinsics
when iterating through instructions. Yet more work for rdar://7797940

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106149 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-16 21:13:38 +00:00
Daniel Dunbar
a86de10508 MC/Mach-O: Rewrite atom association to be a final pass we do in Finish(), instead of tracking as part of emission.
- This allows sharing more code with the MCObjectStreamer.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106143 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-16 20:04:32 +00:00
Daniel Dunbar
843aa1f15b MC: Simplify MCAssembler::isSymbolLinkerVisible to only take an MCSymbol.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106142 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-16 20:04:29 +00:00
Daniel Dunbar
83b467178a MC: Lift SwitchSection() and Finish() into MCObjectStreamer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106141 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-16 20:04:25 +00:00
Daniel Dunbar
8dc68ab931 MC: Factor out an MCObjectStreamer class, which will be shared by the concrete
object file format writers.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106140 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-16 20:04:22 +00:00
Rafael Espindola
e96af56a5b Make sure that simplify libcalls does not replace a call with one calling
convention with a new call with a different calling convention.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106134 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-16 19:34:01 +00:00
Jim Grosbach
956352eb46 add FIXME
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106126 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-16 18:45:08 +00:00
Bill Wendling
504c0cda91 Improve comment to include that the use of a preg is also verboten in this situation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106119 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-16 18:01:31 +00:00
Benjamin Kramer
0f471e018f TODO--
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106102 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-16 15:47:00 +00:00
Benjamin Kramer
ea9ca0236d simplify-libcalls: fold strncmp(x, y, 1) -> memcmp(x, y, 1)
The memcmp will be optimized further and even the pathological case
'strstr(x, "x") == x' generates optimal code now.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106097 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-16 10:30:29 +00:00
Evan Cheng
46df4eb46e Make post-ra scheduling, anti-dep breaking, and register scavenger (conservatively) aware of predicated instructions. This enables ARM to move if-conversion before post-ra scheduler.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106091 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-16 07:35:02 +00:00
Devang Patel
ffd33cd364 Check function pointer first, before comparing function names.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106088 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-16 06:42:02 +00:00
Devang Patel
2f7d5291de Use separate named MDNode to hold each function's local variable info.
This speeds up local variable handling in DwarfDebug.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106075 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-16 00:53:55 +00:00
Eric Christopher
7500e06e38 Don't emit the linkage for initializer label for mach-o tls.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106073 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-16 00:27:30 +00:00
Eric Christopher
e48dbf8d83 Fix indentation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106072 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-16 00:26:36 +00:00
Bill Wendling
d361a77f14 Create a more targeted fix for not sinking instructions into a range where it
will conflict with another live range. The place which creates this scenerio is
the code in X86 that lowers a select instruction by splitting the MBBs. This
eliminates the need to check from the bottom up in an MBB for live pregs.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106066 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-15 23:46:31 +00:00
Eric Christopher
6102549737 For 32-bit non-pic tlv mach-o addressing we don't need a pic base or
a relative address.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106064 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-15 23:08:42 +00:00
Stuart Hastings
cad22ad0bf Added a comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106063 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-15 23:06:30 +00:00
Eric Christopher
c9ada472c8 Some more work on mach-o TLV relocations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106062 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-15 22:59:05 +00:00
Dale Johannesen
38d5f0441c Add file missing from previous commit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106058 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-15 22:24:08 +00:00
Bob Wilson
92fffe0405 Fix 80col violations, remove trailing whitespace, and clarify a comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106057 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-15 22:18:54 +00:00
Dale Johannesen
6470a116f1 Next round of tail call changes. Register used in a tail
call must not be callee-saved; following x86, add a new
regclass to represent this.  Also fixes a couple of bugs.
Still disabled by default; Thumb doesn't work yet.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106053 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-15 22:08:33 +00:00
Jakob Stoklund Olesen
8a3eab9b20 Remove the local register allocator.
Please use the fast allocator instead.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106051 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-15 21:58:33 +00:00