Chris Lattner
b5bd654163
A few inline asm cleanups:
...
- Make targetlowering.h fit in 80 cols.
- Make LowerAsmOperandForConstraint const.
- Make lowerXConstraint -> LowerXConstraint
- Make LowerXConstraint return a const char* instead of taking a string byref.
llvm-svn: 50312
2008-04-26 23:02:14 +00:00
Chris Lattner
1c98ff80c0
no need to implement this method and just have it call
...
the default impl.
llvm-svn: 50311
2008-04-26 22:59:59 +00:00
Chris Lattner
2798e42a9f
When SRoA'ing a global variable, make sure the new globals get the
...
appropriate alignment. This fixes a miscompilation of 252.eon on
x86-64 (rdar://5891920).
Bill, please pull this into Tak.
llvm-svn: 50308
2008-04-26 07:40:11 +00:00
Dale Johannesen
cfba8d51b8
change comments per review
...
llvm-svn: 50300
2008-04-25 21:16:07 +00:00
Evan Cheng
318e7e042c
Extract the lower 64-bit if a MMX value is passed in a XMM register.
...
llvm-svn: 50292
2008-04-25 20:13:28 +00:00
Evan Cheng
eaaec15b4f
Fix illegal MMX_MOVDQ2Qrr pattern. vector_extract result must be a scalar value.
...
llvm-svn: 50291
2008-04-25 20:12:46 +00:00
Evan Cheng
11f101a800
Special handling for MMX values being passed in either GPR64 or lower 64-bits of XMM registers.
...
llvm-svn: 50289
2008-04-25 19:11:04 +00:00
Dan Gohman
c4b6768db4
Remove the code from CodeGenPrepare that moved getresult instructions
...
to the block that defines their operands. This doesn't work in the
case that the operand is an invoke, because invoke is a terminator
and must be the last instruction in a block.
Replace it with support in SelectionDAGISel for copying struct values
into sequences of virtual registers.
llvm-svn: 50279
2008-04-25 18:27:55 +00:00
Evan Cheng
0fe99f024d
Fix MMX_MOVQ2DQrr pattern. It's illegal to do a bitconvert from a smaller type to a larger one.
...
llvm-svn: 50278
2008-04-25 18:19:54 +00:00
Nate Begeman
f4adf0f05f
Pull the code to perform an INSERT_VECTOR_ELT in memory out into its own
...
function, and then use it to fix a bug in SplitVectorOp that expected inserts
to always have constant insertion indices.
llvm-svn: 50273
2008-04-25 18:07:40 +00:00
Nate Begeman
928566cbfe
Feedback from chris
...
llvm-svn: 50271
2008-04-25 17:45:52 +00:00
Chris Lattner
81742d7a8f
add a note
...
llvm-svn: 50267
2008-04-25 17:25:00 +00:00
Evan Cheng
bbbe14502f
80 col violation.
...
llvm-svn: 50266
2008-04-25 17:21:40 +00:00
Nick Lewycky
1f831c0f57
Remove 'unwinds to' support from mainline. This patch undoes r47802 r47989
...
r48047 r48084 r48085 r48086 r48088 r48096 r48099 r48109 and r48123.
llvm-svn: 50265
2008-04-25 16:53:59 +00:00
Evan Cheng
37ca5de3b7
Not checking for intrinsics which do not have a chain operand.
...
llvm-svn: 50260
2008-04-25 08:55:28 +00:00
Evan Cheng
e177dc6696
- Switch from std::set to SmallPtrSet.
...
- Add comments.
llvm-svn: 50259
2008-04-25 08:22:20 +00:00
Evan Cheng
39ae78cadb
MMX argument passing fixes:
...
On Darwin / Linux x86-32, v8i8, v4i16, v2i32 values are passed in MM[0-2].
On Darwin / Linux x86-32, v1i64 values are passed in memory.
On Darwin x86-64, v8i8, v4i16, v2i32 values are passed in XMM[0-7].
On Darwin x86-64, v1i64 values are passed in 64-bit GPRs.
llvm-svn: 50257
2008-04-25 07:56:45 +00:00
Nate Begeman
26b6f640a1
Teach the PruningFunctionCloner how to look through loads with
...
ConstantExpression GEPs pointing into constant globals.
llvm-svn: 50256
2008-04-25 06:37:06 +00:00
Chris Lattner
8c9f6c929a
Loosen up an assertion to allow intrinsics. I really have no
...
idea what this code (findNonImmUse) does, so I'm only guessing
that this is the right thing. It would be really really nice
if this had comments and perhaps switched to SmallPtrSet
(hint hint) :)
This fixes rdar://5886601, a crash on gcc.target/i386/sse4_1-pblendw.c
llvm-svn: 50252
2008-04-25 05:13:01 +00:00
Chris Lattner
1a6268f776
Don't infininitely thread branches when a threaded edge
...
goes back to the block, e.g.:
Threading edge through bool from 'bb37.us.thread3829' to 'bb37.us' with cost: 1, across block:
bb37.us: ; preds = %bb37.us.thread3829, %bb37.us, %bb33
%D1361.1.us = phi i32 [ %tmp36, %bb33 ], [ %D1361.1.us, %bb37.us ], [ 0, %bb37.us.thread3829 ] ; <i32> [#uses=2]
%tmp39.us = icmp eq i32 %D1361.1.us, 0 ; <i1> [#uses=1]
br i1 %tmp39.us, label %bb37.us, label %bb42.us
llvm-svn: 50251
2008-04-25 04:12:29 +00:00
Gordon Henriksen
c440737166
PR2202: LLVMCreateInterpreter creates a JIT
...
Applying fix by Frits van Bommel.
llvm-svn: 50249
2008-04-25 02:52:30 +00:00
Evan Cheng
484060ba4a
Fix bug in x86 memcpy / memset lowering. If there are trailing bytes not handled by rep instructions, a new memcpy / memset is introduced for them. However, since source / destination addresses are already adjusted, their offsets should be zero.
...
llvm-svn: 50239
2008-04-25 00:26:43 +00:00
Evan Cheng
c532dca878
Adjust inline cost computation to be less aggressive.
...
llvm-svn: 50222
2008-04-24 18:42:47 +00:00
Evan Cheng
1a97cb159e
- Check if a register is livein before removing it. It may have already been removed.
...
- Do not iterate over SmallPtrSet, the order of iteration is not deterministic.
llvm-svn: 50209
2008-04-24 09:06:33 +00:00
Chris Lattner
a646a59205
code restructuring, not functionality change.
...
llvm-svn: 50203
2008-04-24 00:21:50 +00:00
Chris Lattner
10ffed0ed0
Don't replace multiple result of calls with undef,
...
sccp tracks getresult values, not call values in this
case.
llvm-svn: 50202
2008-04-24 00:19:54 +00:00
Chris Lattner
8c6e641cf4
code cleanup, no functionality change.
...
llvm-svn: 50201
2008-04-24 00:16:28 +00:00
Chris Lattner
be35a0c224
Split some code out of the main SimplifyCFG loop into its own function.
...
Fix said code to handle merging return instructions together correctly
when handling multiple return values.
llvm-svn: 50199
2008-04-24 00:01:19 +00:00
Dan Gohman
6054efc488
Make these variables static.
...
llvm-svn: 50196
2008-04-23 23:15:23 +00:00
Anton Korobeynikov
ac6f6045bb
Drop dead includes
...
llvm-svn: 50192
2008-04-23 22:44:03 +00:00
Anton Korobeynikov
361e5f9eee
Adjust option names for C++ backend
...
llvm-svn: 50190
2008-04-23 22:37:03 +00:00
Anton Korobeynikov
193b7db7c7
First step of implementing PR1538: move llvm2cpp logic to new 'target'
...
llvm-svn: 50189
2008-04-23 22:29:24 +00:00
Dan Gohman
5df2f2c2e7
Initial CBE support for multiple return values.
...
llvm-svn: 50187
2008-04-23 21:49:29 +00:00
Chris Lattner
50069efc7a
tighten up verifier checks which missed cases where
...
return instrs operands didn't match up with function results.
llvm-svn: 50182
2008-04-23 20:33:41 +00:00
Dan Gohman
37f4dc9ab4
Use isa instead of dyn_cast.
...
llvm-svn: 50181
2008-04-23 20:25:16 +00:00
Dan Gohman
afa475f207
Add support to codegen for getresult instructions with undef operands.
...
llvm-svn: 50180
2008-04-23 20:21:29 +00:00
Devang Patel
88251a96f1
Check type instead of no. of operands.
...
llvm-svn: 50179
2008-04-23 20:18:29 +00:00
Dan Gohman
6de65a742d
Allow llvm-as to parse a getresult with an undef operand.
...
llvm-svn: 50175
2008-04-23 20:11:27 +00:00
Dale Johannesen
d70ea13581
Rewrite previous patch to suit Chris's preference.
...
llvm-svn: 50174
2008-04-23 18:34:37 +00:00
Anton Korobeynikov
74178d02d1
Unbreak JIT
...
llvm-svn: 50173
2008-04-23 18:26:03 +00:00
Anton Korobeynikov
4b572e0f73
Fix typo
...
llvm-svn: 50169
2008-04-23 18:24:25 +00:00
Anton Korobeynikov
372e69e652
Only allow increase of max alignment value
...
llvm-svn: 50168
2008-04-23 18:23:50 +00:00
Anton Korobeynikov
47a8e6d7a9
Be over-conservative: scan for all used virtual registers and calculate maximal stack alignment in assumption, that there will be spill of vector register.
...
llvm-svn: 50167
2008-04-23 18:23:30 +00:00
Anton Korobeynikov
e7754f758b
Add X86 Maximal Stack Alignment Calculator Pass before RA
...
llvm-svn: 50166
2008-04-23 18:23:05 +00:00
Anton Korobeynikov
b1ad6979dc
Add facility for pre-RA passes
...
llvm-svn: 50165
2008-04-23 18:22:28 +00:00
Anton Korobeynikov
5e735f1fd2
Use precomputed value, if any
...
llvm-svn: 50164
2008-04-23 18:21:50 +00:00
Anton Korobeynikov
158f614c67
Do proper book-keeping of offsets and prologue/epilogue code for stack realignment
...
llvm-svn: 50163
2008-04-23 18:21:27 +00:00
Anton Korobeynikov
1f07315f47
If stack realignment is used - incoming args will use EBP as base register and locals - ESP
...
llvm-svn: 50162
2008-04-23 18:21:02 +00:00
Anton Korobeynikov
5079553b9d
Eastimate required stack alignment early, so we can decide, whether we will need frame pointer or not
...
llvm-svn: 50161
2008-04-23 18:20:17 +00:00
Anton Korobeynikov
197eca0b2d
Cleanup
...
llvm-svn: 50160
2008-04-23 18:19:47 +00:00