Chris Lattner
67ca6f6347
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
0d1d3df564
change comments per review
...
llvm-svn: 50300
2008-04-25 21:16:07 +00:00
Evan Cheng
1e78184a99
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
5ba02020e6
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
ccde6dd016
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
ca95a5f49f
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
6d653b58f9
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
6f94f61317
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
ca270ad96f
Feedback from chris
...
llvm-svn: 50271
2008-04-25 17:45:52 +00:00
Chris Lattner
33bd24bd92
add a note
...
llvm-svn: 50267
2008-04-25 17:25:00 +00:00
Evan Cheng
715eaa031c
80 col violation.
...
llvm-svn: 50266
2008-04-25 17:21:40 +00:00
Nick Lewycky
4d43d3c72c
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
59834d1c7a
Not checking for intrinsics which do not have a chain operand.
...
llvm-svn: 50260
2008-04-25 08:55:28 +00:00
Evan Cheng
051da5deaa
- Switch from std::set to SmallPtrSet.
...
- Add comments.
llvm-svn: 50259
2008-04-25 08:22:20 +00:00
Evan Cheng
df38b35a1e
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
6fed3b2038
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
741c7a3b49
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
f7de528463
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
7993f4a6d1
PR2202: LLVMCreateInterpreter creates a JIT
...
Applying fix by Frits van Bommel.
llvm-svn: 50249
2008-04-25 02:52:30 +00:00
Evan Cheng
9165e165dc
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
608eeef5ce
Adjust inline cost computation to be less aggressive.
...
llvm-svn: 50222
2008-04-24 18:42:47 +00:00
Evan Cheng
3980a7911a
- 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
97951ac580
code restructuring, not functionality change.
...
llvm-svn: 50203
2008-04-24 00:21:50 +00:00
Chris Lattner
12f1e007f7
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
769203cb03
code cleanup, no functionality change.
...
llvm-svn: 50201
2008-04-24 00:16:28 +00:00
Chris Lattner
86bbf338e5
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
c107d0020d
Make these variables static.
...
llvm-svn: 50196
2008-04-23 23:15:23 +00:00
Anton Korobeynikov
1ae135c87b
Drop dead includes
...
llvm-svn: 50192
2008-04-23 22:44:03 +00:00
Anton Korobeynikov
9dcc3e97a4
Adjust option names for C++ backend
...
llvm-svn: 50190
2008-04-23 22:37:03 +00:00
Anton Korobeynikov
78695035c4
First step of implementing PR1538: move llvm2cpp logic to new 'target'
...
llvm-svn: 50189
2008-04-23 22:29:24 +00:00
Dan Gohman
d871fa5cb6
Initial CBE support for multiple return values.
...
llvm-svn: 50187
2008-04-23 21:49:29 +00:00
Chris Lattner
1e31bf5b19
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
e9e3891c09
Use isa instead of dyn_cast.
...
llvm-svn: 50181
2008-04-23 20:25:16 +00:00
Dan Gohman
b418aafabf
Add support to codegen for getresult instructions with undef operands.
...
llvm-svn: 50180
2008-04-23 20:21:29 +00:00
Devang Patel
8f83081fea
Check type instead of no. of operands.
...
llvm-svn: 50179
2008-04-23 20:18:29 +00:00
Dan Gohman
6e9185093d
Allow llvm-as to parse a getresult with an undef operand.
...
llvm-svn: 50175
2008-04-23 20:11:27 +00:00
Dale Johannesen
f6e15a4774
Rewrite previous patch to suit Chris's preference.
...
llvm-svn: 50174
2008-04-23 18:34:37 +00:00
Anton Korobeynikov
0516b6f2b0
Unbreak JIT
...
llvm-svn: 50173
2008-04-23 18:26:03 +00:00
Anton Korobeynikov
0d6df367f1
Fix typo
...
llvm-svn: 50169
2008-04-23 18:24:25 +00:00
Anton Korobeynikov
965babda19
Only allow increase of max alignment value
...
llvm-svn: 50168
2008-04-23 18:23:50 +00:00
Anton Korobeynikov
c1534dca56
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
2659011b70
Add X86 Maximal Stack Alignment Calculator Pass before RA
...
llvm-svn: 50166
2008-04-23 18:23:05 +00:00
Anton Korobeynikov
7e859dd7f0
Add facility for pre-RA passes
...
llvm-svn: 50165
2008-04-23 18:22:28 +00:00
Anton Korobeynikov
41334635cc
Use precomputed value, if any
...
llvm-svn: 50164
2008-04-23 18:21:50 +00:00
Anton Korobeynikov
156550ae79
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
89a0a017fb
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
ba5129073c
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
f49bc9f8ed
Cleanup
...
llvm-svn: 50160
2008-04-23 18:19:47 +00:00
Anton Korobeynikov
c756b460d9
Cleanup
...
llvm-svn: 50159
2008-04-23 18:19:23 +00:00
Anton Korobeynikov
a8aac3db3f
Simplify
...
llvm-svn: 50158
2008-04-23 18:18:36 +00:00
Anton Korobeynikov
cb195f511d
Make stack alignment options global for all targets
...
llvm-svn: 50157
2008-04-23 18:18:10 +00:00
Anton Korobeynikov
9328fbc4c7
Provide option for enabling-disabling stack realignment
...
llvm-svn: 50156
2008-04-23 18:17:11 +00:00
Anton Korobeynikov
ca150edda6
Disable stack realignment for functions with dynamic-sized alloca's
...
llvm-svn: 50155
2008-04-23 18:16:43 +00:00
Anton Korobeynikov
a7495260ee
Provide ABI-correct stack alignment
...
llvm-svn: 50154
2008-04-23 18:16:16 +00:00
Anton Korobeynikov
8843487e16
Provide convenient helpers for some operations
...
llvm-svn: 50153
2008-04-23 18:15:48 +00:00
Anton Korobeynikov
2ccafa47ac
Whitespace cleanup
...
llvm-svn: 50152
2008-04-23 18:15:11 +00:00
Chris Lattner
a82d691caa
simplify code for propagation of constant arguments into
...
callees.
llvm-svn: 50142
2008-04-23 06:16:27 +00:00
Chris Lattner
5f1802cfdf
Fix a number of bugs in ipconstantprop, simplify the code, fit in 80 cols,
...
fix read after free bug (PR2238).
llvm-svn: 50141
2008-04-23 05:59:23 +00:00
Chris Lattner
5a58a4dc6d
Rewrite multiple return value handling in SCCP. Before, the -sccp pass
...
would turn every getresult instruction into undef. This helps with
rdar://5778210
llvm-svn: 50140
2008-04-23 05:38:20 +00:00
Chris Lattner
6e0284bba7
regenerate
...
llvm-svn: 50139
2008-04-23 05:37:08 +00:00
Chris Lattner
ff9089eb90
Validate that the result of a function type is valid using shared
...
logic with vmcore.
llvm-svn: 50138
2008-04-23 05:36:58 +00:00
Chris Lattner
b6917d2acc
Enforce that multiple return values have to have at least one result.
...
llvm-svn: 50137
2008-04-23 05:36:34 +00:00
Chris Lattner
31abd54e33
Verify that the operand of a getresult instruction is a
...
call/invoke or undef.
llvm-svn: 50129
2008-04-23 04:06:15 +00:00
Dale Johannesen
493527d8c9
Do not change the type of a ByVal argument to a
...
type of a different size.
llvm-svn: 50121
2008-04-23 01:03:05 +00:00
Evan Cheng
1c89ca7295
Don't do: "(X & 4) >> 1 == 2 --> (X & 4) == 4" if there are more than one uses of the shift result.
...
llvm-svn: 50118
2008-04-23 00:38:06 +00:00
Chris Lattner
37e9c187b0
Start doing the significantly useful part of jump threading: handle cases
...
where a comparison has a phi input and that phi is a constant. For example,
stuff like:
Threading edge through bool from 'bb2149' to 'bb2231' with cost: 1, across block:
bb2237: ; preds = %bb2231, %bb2149
%tmp2328.rle = phi i32 [ %tmp2232, %bb2231 ], [ %tmp2232439, %bb2149 ] ; <i32> [#uses=2]
%done.0 = phi i32 [ %done.2, %bb2231 ], [ 0, %bb2149 ] ; <i32> [#uses=1]
%tmp2239 = icmp eq i32 %done.0, 0 ; <i1> [#uses=1]
br i1 %tmp2239, label %bb2231, label %bb2327
or
bb38.i298: ; preds = %bb33.i295, %bb1693
%tmp39.i296.rle = phi %struct.ibox* [ null, %bb1693 ], [ %tmp39.i296.rle1109, %bb33.i295 ] ; <%struct.ibox*> [#uses=2]
%minspan.1.i291.reg2mem.1 = phi i32 [ 32000, %bb1693 ], [ %minspan.0.i288, %bb33.i295 ] ; <i32> [#uses=1]
%tmp40.i297 = icmp eq %struct.ibox* %tmp39.i296.rle, null ; <i1> [#uses=1]
br i1 %tmp40.i297, label %implfeeds.exit311, label %bb43.i301
This triggers thousands of times in spec.
llvm-svn: 50110
2008-04-22 21:40:39 +00:00
Chris Lattner
d5425e8f8d
Dig through multiple levels of AND to thread jumps if needed.
...
llvm-svn: 50106
2008-04-22 20:46:09 +00:00
Chris Lattner
3df4c15dc7
Teach jump threading to thread through blocks like:
...
br (and X, phi(Y, Z, false)), label L1, label L2
This triggers once on 252.eon and 6 times on 176.gcc. Blocks
in question often look like this:
bb262: ; preds = %bb261, %bb248
%iftmp.251.0 = phi i1 [ true, %bb261 ], [ false, %bb248 ] ; <i1> [#uses=4]
%tmp270 = icmp eq %struct.rtx_def* %tmp.0.i, null ; <i1> [#uses=1]
%bothcond = or i1 %iftmp.251.0, %tmp270 ; <i1> [#uses=1]
br i1 %bothcond, label %bb288, label %bb273
In this case, it is clear that it doesn't matter if tmp.0.i is null when coming from bb261. When coming from bb248, it is all that matters.
Another random example:
check_asm_operands.exit: ; preds = %check_asm_operands.exit.thr_comm, %bb30.i, %bb12.i, %bb6.i413
%tmp.0.i420 = phi i1 [ true, %bb6.i413 ], [ true, %bb12.i ], [ true, %bb30.i ], [ false, %check_asm_operands.exit.thr_comm ; <i1> [#uses=1]
call void @llvm.stackrestore( i8* %savedstack ) nounwind
%tmp4389 = icmp eq i32 %added_sets_1.0, 0 ; <i1> [#uses=1]
%tmp4394 = icmp eq i32 %added_sets_2.0, 0 ; <i1> [#uses=1]
%bothcond80 = and i1 %tmp4389, %tmp4394 ; <i1> [#uses=1]
%bothcond81 = and i1 %bothcond80, %tmp.0.i420 ; <i1> [#uses=1]
br i1 %bothcond81, label %bb4398, label %bb4397
Here is the case from 252.eon:
bb290.i.i: ; preds = %bb23.i57.i.i, %bb8.i39.i.i, %bb100.i.i, %bb100.i.i, %bb85.i.i110
%myEOF.1.i.i = phi i1 [ true, %bb100.i.i ], [ true, %bb100.i.i ], [ true, %bb85.i.i110 ], [ true, %bb8.i39.i.i ], [ false, %bb23.i57.i.i ] ; <i1> [#uses=2]
%i.4.i.i = phi i32 [ %i.1.i.i, %bb85.i.i110 ], [ %i.0.i.i, %bb100.i.i ], [ %i.0.i.i, %bb100.i.i ], [ %i.3.i.i, %bb8.i39.i.i ], [ %i.3.i.i, %bb23.i57.i.i ] ; <i32> [#uses=3]
%tmp292.i.i = load i8* %tmp16.i.i100, align 1 ; <i8> [#uses=1]
%tmp293.not.i.i = icmp ne i8 %tmp292.i.i, 0 ; <i1> [#uses=1]
%bothcond.i.i = and i1 %tmp293.not.i.i, %myEOF.1.i.i ; <i1> [#uses=1]
br i1 %bothcond.i.i, label %bb202.i.i, label %bb301.i.i
Factoring out 3 common predecessors.
On the path from any blocks other than bb23.i57.i.i, the load and compare
are dead.
llvm-svn: 50096
2008-04-22 07:05:46 +00:00
Chris Lattner
e369c35a84
refactor some code, no functionality change.
...
llvm-svn: 50094
2008-04-22 06:36:15 +00:00
Chris Lattner
8fb13cbe4e
remove dead code.
...
llvm-svn: 50080
2008-04-22 03:21:48 +00:00
Chris Lattner
c3a439351c
optimize "p != gep p, ..." better. This allows us to compile
...
getelementptr-seteq.ll into:
define i1 @test(i64 %X, %S* %P) {
%C = icmp eq i64 %X, -1 ; <i1> [#uses=1]
ret i1 %C
}
instead of:
define i1 @test(i64 %X, %S* %P) {
%A.idx.mask = and i64 %X, 4611686018427387903 ; <i64> [#uses=1]
%C = icmp eq i64 %A.idx.mask, 4611686018427387903 ; <i1> [#uses=1]
ret i1 %C
}
And fixes the second half of PR2235. This speeds up the insertion sort
case by 45%, from 1.12s to 0.77s. In practice, this will significantly
speed up for loops structured like:
for (double *P = Base + N; P != Base; --P)
...
Which happens frequently for C++ iterators.
llvm-svn: 50079
2008-04-22 02:53:33 +00:00
Chris Lattner
ff834c0ca3
more fallout from Nicholas' asmprinter patch.
...
llvm-svn: 50078
2008-04-22 02:45:44 +00:00
Dan Gohman
f166d2d0d6
Implement an x86-64 ABI detail of passing structs by hidden first
...
argument. The x86-64 ABI requires the incoming value of %rdi to
be copied to %rax on exit from a function that is returning a
large C struct.
Also, add a README-X86-64 entry detailing the missed optimization
opportunity and proposing an alternative approach.
llvm-svn: 50075
2008-04-21 23:59:07 +00:00
Dan Gohman
dc90919d2b
Fix an out-of-bounds access in -view-sunit-dags in the case of an
...
empty ScheduleDAG.
llvm-svn: 50054
2008-04-21 20:07:30 +00:00
Dan Gohman
db08f5218e
Fix the encoding of the MMX movd that moves from MMX to 64-bit GPR.
...
llvm-svn: 50053
2008-04-21 19:52:29 +00:00
Dan Gohman
79fff7cf85
Fix the way AliasSet::print prints "may alias".
...
llvm-svn: 50051
2008-04-21 19:48:48 +00:00
Chris Lattner
bab7bec9c8
fix grammar-o, thanks to Duncan for noticing.
...
llvm-svn: 50047
2008-04-21 18:25:01 +00:00
Owen Anderson
a5b96ecef9
Remove unneeded #include's.
...
llvm-svn: 50035
2008-04-21 07:47:38 +00:00
Owen Anderson
6a7355caa2
Refactor memcpyopt based on Chris' suggestions. Consolidate several functions
...
and simplify code that was fallout from the separation of memcpyopt and gvn.
llvm-svn: 50034
2008-04-21 07:45:10 +00:00
Duncan Sands
5429033c03
Fix a "large integer implicitly truncated to unsigned type"
...
warning.
llvm-svn: 50033
2008-04-21 07:35:28 +00:00
Chris Lattner
00cab5b9a6
don't print dominators every time it is computed with -debug.
...
llvm-svn: 50032
2008-04-21 06:19:02 +00:00
Chris Lattner
d5fbc8f0af
another bug introduced in r47802 by nicholas, for no apparent reason.
...
llvm-svn: 50031
2008-04-21 06:12:55 +00:00
Chris Lattner
a89143f1e0
Add an ugly note.
...
llvm-svn: 50029
2008-04-21 04:46:30 +00:00
Chris Lattner
67bec133b2
fix a bug introduced by Nicholas' "unwinds to" stuff: we
...
lost newlines between blocks.
llvm-svn: 50024
2008-04-21 04:20:33 +00:00
Chris Lattner
ad0d42ba15
don't assume that the argument passed to fprintf("%s" is a string. This
...
fixes a crash in opt on 433.milc.
llvm-svn: 50023
2008-04-21 03:18:33 +00:00
Chris Lattner
f6236cc2e9
Use the new SplitBlockPredecessors to implement a todo.
...
llvm-svn: 50022
2008-04-21 02:57:57 +00:00
Chris Lattner
a5b11705b6
Move SplitBlockPredecessors out of loopsimplify into BasicBlockUtils.h
...
as a global helper function. At the same type, switch it from taking
a vector of predecessors to an arbitrary sequential input. This allows
us to switch LoopSimplify to use a SmallVector for various temporary
vectors that it passed into SplitBlockPredecessors.
llvm-svn: 50020
2008-04-21 01:28:02 +00:00
Chris Lattner
d418b06abf
Move domtree/frontier updating earlier, allowing us to use it to update phi
...
nodes, removing a hack.
llvm-svn: 50019
2008-04-21 01:05:08 +00:00
Chris Lattner
96e9e22269
Factor dominator tree and frontier updating into SplitBlockPredecessors
...
instead of doing it after every call.
llvm-svn: 50018
2008-04-21 00:54:38 +00:00
Chris Lattner
559c867ece
fit some more code in 80 cols.
...
llvm-svn: 50016
2008-04-21 00:25:49 +00:00
Chris Lattner
aca912d793
simplify code, fit in 80 cols.
...
llvm-svn: 50015
2008-04-21 00:23:14 +00:00
Chris Lattner
38806c3e9c
fit in 80 cols
...
llvm-svn: 50014
2008-04-21 00:19:16 +00:00
Nicolas Geoffray
481f44e12f
Be pessimistic in computing the buffer size when aligning.
...
llvm-svn: 50008
2008-04-20 23:39:44 +00:00
Nicolas Geoffray
984e7199cc
Don't forget to update the current operand when getting the size of an instruction.
...
llvm-svn: 50007
2008-04-20 23:36:47 +00:00
Chris Lattner
ff1c6e388c
finish the first cut of a jump threading pass implementation.
...
llvm-svn: 50006
2008-04-20 22:39:42 +00:00
Chris Lattner
567166c0a8
replace a slow and verbose version of Instruction::isUsedOutsideOfBlock with
...
a call to Instruction::isUsedOutsideOfBlock.
llvm-svn: 50005
2008-04-20 22:18:22 +00:00
Chris Lattner
8ec6e8af60
add a handy helper method to instruction, useful for determining
...
whether it is used outside of some block. This can be used to see
if there are any non-local references, for example.
llvm-svn: 50004
2008-04-20 22:11:30 +00:00
Chris Lattner
9c1f1a82bf
we can only thread blocks when there is a pred we can determine the succ of.
...
llvm-svn: 50003
2008-04-20 21:18:09 +00:00
Chris Lattner
2115722ffa
improve comments, infrastructure, and add some validity checks for threading.
...
Add a cost function.
llvm-svn: 50002
2008-04-20 21:13:06 +00:00
Chris Lattner
b3b6007c8b
Add a new Jump Threading pass, which will handle cases
...
such as those in PR2235. Right now the pass is not very
effective. :)
llvm-svn: 50000
2008-04-20 20:35:01 +00:00
Chris Lattner
912bec79ca
hopefully resolve PR2240
...
llvm-svn: 49999
2008-04-20 19:59:12 +00:00
Chris Lattner
6b05605829
rearrange some code, simplify handling of shifts.
...
llvm-svn: 49995
2008-04-20 18:24:14 +00:00
Dale Johannesen
aac27592f0
Check we aren't trying to convert PPC long double.
...
This fixes the testsuite failure on ppcf128-4.ll.
llvm-svn: 49994
2008-04-20 18:23:46 +00:00
Nicolas Geoffray
f77618e6e8
Cosmetic changes, as suggested by Evan. No functionality changes.
...
llvm-svn: 49993
2008-04-20 17:44:19 +00:00
Dale Johannesen
6145727b43
(re)fix handling of UGT. Pointed out by Nick Lewycky.
...
llvm-svn: 49991
2008-04-20 16:58:57 +00:00
Torok Edwin
ab20784740
g++-4.3 build-fix: CHAR_BIT requires <climits>.
...
llvm-svn: 49989
2008-04-20 08:33:11 +00:00
Nicolas Geoffray
568f9818f7
Do not hold the JIT lock when materializing a function and verify if the
...
function has already been codegen'd. This is required by the Java class loading
mechanism which executes Java code when materializing a function.
llvm-svn: 49988
2008-04-20 08:33:02 +00:00
Chris Lattner
470ab00c76
A better fix for my previous patch, MOVZQI2PQIrr just requires SSE2.
...
llvm-svn: 49986
2008-04-20 05:52:46 +00:00
Dale Johannesen
64bbdb17f5
Check that APFloat::convert is not trying to target
...
ppc long double, which doesn't work.
This may break some stuff temporarily, but I want to
avoid the propagation of code that assumes this works.
llvm-svn: 49983
2008-04-20 01:34:03 +00:00
Chris Lattner
167dbe5e39
regenerate
...
llvm-svn: 49978
2008-04-20 00:41:19 +00:00
Chris Lattner
3b18762f40
Switch to using Simplified ConstantFP::get API.
...
llvm-svn: 49977
2008-04-20 00:41:09 +00:00
Chris Lattner
d3018e6a0e
Use simplified ConstantFP::get method, fix a bug handling frem x, 0 with long doubles.
...
llvm-svn: 49976
2008-04-20 00:26:06 +00:00
Chris Lattner
bc26e1bb8a
Implement PR2206.
...
llvm-svn: 49967
2008-04-19 22:17:26 +00:00
Chris Lattner
334d33cad1
refactor handling of symbolic constant folding, picking up
...
a few new cases( see Integer/a1.ll), but not anything that
would happen in practice.
llvm-svn: 49965
2008-04-19 21:58:19 +00:00
Chris Lattner
6072ead8e2
indentation fix.
...
llvm-svn: 49964
2008-04-19 21:13:00 +00:00
Chris Lattner
eb6bb803a7
Allow argpromote to promote struct arguments with a specified number
...
of elements. Patch by Matthijs Kooijman!
llvm-svn: 49962
2008-04-19 19:50:01 +00:00
Evan Cheng
5102bd9359
64-bit atomic operations.
...
llvm-svn: 49949
2008-04-19 02:30:38 +00:00
Evan Cheng
5e7ee0a002
Also LXCHG64 -> XCHG64rm.
...
llvm-svn: 49948
2008-04-19 02:05:42 +00:00
Evan Cheng
51096affb5
PPC32 atomic operations.
...
llvm-svn: 49947
2008-04-19 01:30:48 +00:00
Evan Cheng
7f4240a47c
xchg which references a memory operand does not need to lock prefix. Atomicity is guaranteed.
...
llvm-svn: 49946
2008-04-19 01:20:30 +00:00
Dan Gohman
41eb949aaf
Teach llvm-as to accept function types with multiple return types.
...
llvm-svn: 49945
2008-04-19 00:24:39 +00:00
Dale Johannesen
ce9dc86994
Fix a scalar evolution bug. Reversing everything
...
does not work because of 0; 2>0 but -2U is also >0.
llvm-svn: 49928
2008-04-18 21:38:31 +00:00
Nicolas Geoffray
85a9f1911e
Enable jitting with a known memory size.
...
llvm-svn: 49924
2008-04-18 20:59:31 +00:00
Duncan Sands
1ec193e90b
Implement a bit more softfloat support in
...
LegalizeTypes. Correct the load logic so
that it actually works, and also teach it
to handle floating point extending loads.
llvm-svn: 49923
2008-04-18 20:56:03 +00:00
Dan Gohman
ad4071a9e1
Fix the handling of va_copy on x86-64. As of llvm-gcc r49920
...
llvm-gcc is now lowering va_copy on x86-64, so this completes
the fix for PR2230.
llvm-svn: 49922
2008-04-18 20:55:41 +00:00
Evan Cheng
00bd8d904a
- Fix atomic operation JIT encoding.
...
- Remove unused instructions.
llvm-svn: 49921
2008-04-18 20:55:36 +00:00
Duncan Sands
a8a61562af
Add some more FIXME's for indexed loads and stores.
...
llvm-svn: 49916
2008-04-18 20:27:12 +00:00
Duncan Sands
b4e0b24e0a
Provide an explicit list of operands to MakeLibcall,
...
rather than having it suck them out of a node. Add
a bunch of new libcalls, and remove dead softfloat
code (dead, because FloatToInt is used not Expand
in this case). Note that indexed stores probably
aren't handled properly, likewise for loads.
llvm-svn: 49915
2008-04-18 20:25:14 +00:00
Evan Cheng
d556115e7e
Correct comment.
...
llvm-svn: 49913
2008-04-18 19:25:26 +00:00
Evan Cheng
495a516390
Not safe to "kill" a register if its live range extends pass the end of block branch.
...
llvm-svn: 49911
2008-04-18 19:22:23 +00:00
Evan Cheng
5879213597
Also support Intel asm syntax.
...
llvm-svn: 49878
2008-04-17 23:35:10 +00:00
Dan Gohman
75c895dbc4
Remove the implicit conversion from SDOperandPtr to SDOperand*; this
...
may fix a build error on Visual Studio.
llvm-svn: 49876
2008-04-17 23:02:12 +00:00
Evan Cheng
4704baa555
Fix assembly code for atomic operations.
...
llvm-svn: 49869
2008-04-17 21:26:35 +00:00
Evan Cheng
7e4a55bc58
Be more careful with insert_subreg and extract_subreg where either source or destination operand has already been coalesced with another register that's defined by a insert_subreg or extract_subreg.
...
llvm-svn: 49843
2008-04-17 07:58:04 +00:00
Owen Anderson
f9ae76d89c
Make GVN able to remove unnecessary calls to read-only functions again.
...
llvm-svn: 49842
2008-04-17 05:36:50 +00:00
Bill Wendling
288ef83b8a
Use correct name for method in comment.
...
llvm-svn: 49841
2008-04-17 05:20:39 +00:00
Dan Gohman
9752a8f3b4
Correct the SrcValue information in the Expand code for va_copy.
...
llvm-svn: 49839
2008-04-17 02:09:26 +00:00
Scott Michel
376acf4aaa
Remove unused variable
...
llvm-svn: 49838
2008-04-17 01:30:44 +00:00
Evan Cheng
c8c3a899c0
Fix a sub-register indice propagation bug.
...
llvm-svn: 49832
2008-04-17 00:06:42 +00:00
Scott Michel
f66cb3696a
Workaround for PR2207, in which pred_iterator assert gets triggered due to a
...
wee problem in Xcode 2.[45]/gcc 4.0.1.
llvm-svn: 49831
2008-04-16 23:46:39 +00:00
Evan Cheng
147cb764b5
Don't forget about sub-register indices when rematting instructions.
...
llvm-svn: 49830
2008-04-16 23:44:44 +00:00
Dale Johannesen
c1279f5e4b
Unbreak build on x86-64.
...
llvm-svn: 49822
2008-04-16 22:24:33 +00:00
Nicolas Geoffray
a7557dfe71
Correlate stubs with functions in JIT: when emitting a stub, the JIT tells the memory manager which function
...
the stub will resolve.
llvm-svn: 49814
2008-04-16 20:46:05 +00:00
Evan Cheng
59aa126e48
After reading memory that's already freed.
...
llvm-svn: 49810
2008-04-16 20:24:25 +00:00
Nicolas Geoffray
ae84bbdbed
Infrastructure for getting the machine code size of a function and an instruction. X86, PowerPC and ARM are implemented
...
llvm-svn: 49809
2008-04-16 20:10:13 +00:00
Evan Cheng
a15cee1036
Initialize X863DNowLevel.
...
llvm-svn: 49808
2008-04-16 19:03:02 +00:00
Evan Cheng
23f12757ed
Fix PR2226. Avoid using uninitialized variables.
...
llvm-svn: 49807
2008-04-16 18:48:43 +00:00
Evan Cheng
8dc8a8d8af
Empty basic block should have an empty range.
...
llvm-svn: 49800
2008-04-16 18:01:08 +00:00
Dale Johannesen
4675c4e7e7
Don't read off end of the input array.
...
llvm-svn: 49799
2008-04-16 17:31:41 +00:00
Roman Levenstein
a3ee1a38a3
Ongoing work on improving the instruction selection infrastructure:
...
Rename SDOperandImpl back to SDOperand.
Introduce the SDUse class that represents a use of the SDNode referred by
an SDOperand. Now it is more similar to Use/Value classes.
Patch is approved by Dan Gohman.
llvm-svn: 49795
2008-04-16 16:15:27 +00:00
Evan Cheng
e45b8f89c5
Rewrite LiveVariable liveness computation. The new implementation is much simplified. It eliminated the nasty recursive routines and removed the partial def / use bookkeeping. There is also potential for performance improvement by replacing the conservative handling of partial physical register definitions. The code is currently disabled until live interval analysis is taught of the name scheme.
...
This patch also fixed a couple of nasty corner cases.
llvm-svn: 49784
2008-04-16 09:46:40 +00:00
Evan Cheng
6c17773ccc
Code clean up.
...
llvm-svn: 49783
2008-04-16 09:41:59 +00:00
Owen Anderson
57236b58f7
Major repairs to the post-dominators implementation. Patch from Florian Brandner!
...
llvm-svn: 49768
2008-04-16 04:21:16 +00:00
Dan Gohman
d43d3beeb0
Add support for the form of the SSE41 extractps instruction that
...
puts its result in a 32-bit GPR.
llvm-svn: 49762
2008-04-16 02:32:24 +00:00
Dan Gohman
8c99ccaf96
Recreate the size SDNode instead of reusing the old one in the x86
...
memcpy lowering code; this ensures that the size node has the desired
result type. This fixes a regression from r49572 with @llvm.memcpy.i64
on x86-32.
llvm-svn: 49761
2008-04-16 01:32:32 +00:00
Evan Cheng
e29e9774a4
Avoid read after free.
...
llvm-svn: 49760
2008-04-16 01:22:28 +00:00
Dan Gohman
3dd8ba6235
Remove X86_64SRet; it isn't used anymore.
...
llvm-svn: 49759
2008-04-16 00:24:30 +00:00
Dan Gohman
01a5d36d9d
Add movd instructions to move from MMX registers
...
to 64-bit GPR registers on x86-64.
llvm-svn: 49757
2008-04-15 23:55:07 +00:00
Dan Gohman
82b6673c44
Fix the new scheduler assertion checks to work when
...
the scheduler has inserted no-ops. This fixes
the 2006-07-03-schedulers.ll regression on ppc32.
llvm-svn: 49747
2008-04-15 22:40:14 +00:00
Chuck Rose III
c6a47e8a79
VisualStudio project files updated. #include <algorithm> added to make VisualStudio happy. Also had to undefine setjmp because of #include <csetjmp> turning setjmp into _setjmp in VisualStudio.
...
llvm-svn: 49743
2008-04-15 21:27:11 +00:00
Dale Johannesen
8fc8a272e0
Don't assume a tail call can't reference a byval
...
argument to the outer function, this isn't correct.
llvm-svn: 49731
2008-04-15 17:41:34 +00:00
Dan Gohman
53d3241b52
Use gv's --spartan option, which trades away an extra row of UI buttons
...
for more space for displaying the graph.
llvm-svn: 49730
2008-04-15 17:27:05 +00:00
Nicolas Geoffray
7000c8f1aa
Change Divided flag to Split, as suggested by Evan
...
llvm-svn: 49715
2008-04-15 08:08:50 +00:00
Dan Gohman
4370f26750
Treat EntryToken nodes as "passive" so that they aren't added to the
...
ScheduleDAG; they don't correspond to any actual instructions so they
don't need to be scheduled.
This fixes a bug where the EntryToken was being scheduled multiple
times in some cases, though it ended up not causing any trouble because
EntryToken doesn't expand into anything. With this fixed the schedulers
reliably schedule the expected number of units, so we can check this
with an assertion.
This requires a tweak to test/CodeGen/X86/loop-hoist.ll because it
ends up getting scheduled differently in a trivial way, though it was
enough to fool the prcontext+grep that the test does.
llvm-svn: 49701
2008-04-15 01:22:18 +00:00
Dan Gohman
e5f21cea3e
In -view-sunit-dags, display "special" chain dependencies as cyan
...
instead of blue to distinguish them from regular dependencies.
llvm-svn: 49696
2008-04-14 23:15:07 +00:00
Dan Gohman
4fff979a43
Remove unnecessary <sstream> includes.
...
llvm-svn: 49681
2008-04-14 20:40:47 +00:00
Dan Gohman
5b61a288a7
Avoid creating MERGE_VALUES nodes for single values.
...
llvm-svn: 49676
2008-04-14 18:43:25 +00:00
Dan Gohman
2cd8e38ab9
Teach AliasSetTracker about VAArgInst.
...
llvm-svn: 49674
2008-04-14 18:34:50 +00:00
Dan Gohman
e36714c0b4
Minor whitespace and comment cleanups.
...
llvm-svn: 49671
2008-04-14 18:26:16 +00:00
Dan Gohman
5e6ce7bb33
In the special case, call the comparison function instead of
...
manually performing the comparison. This allows the special
case to work correctly even in the case where someone is
experimenting with a different comparison function :-).
llvm-svn: 49670
2008-04-14 18:23:56 +00:00
Dan Gohman
2505d86783
Fix const-correctness issues with the SrcValue handling in the
...
memory intrinsic expansion code.
llvm-svn: 49666
2008-04-14 17:55:48 +00:00
Dale Johannesen
876224b1e8
Reverse sense of unwind-tables option. This means
...
stack tracebacks on Darwin x86-64 won't work by default;
nevertheless, everybody but me thinks this is a good idea.
llvm-svn: 49663
2008-04-14 17:54:17 +00:00
Owen Anderson
7629b71dd4
Revert r49614. As Dan pointed out, some of these aren't correct.
...
llvm-svn: 49657
2008-04-14 17:38:21 +00:00
Nicolas Geoffray
db0ea1ff4e
Fix /test/CodeGen/PowerPC/big-endian-actual-args.ll for linux/ppc32
...
llvm-svn: 49652
2008-04-14 17:17:14 +00:00
Dan Gohman
19bce7f18c
VAArg may trap.
...
llvm-svn: 49646
2008-04-14 15:07:08 +00:00
Duncan Sands
6c503f9a65
Initial libcall support for LegalizeTypes. This is
...
much simpler than in LegalizeDAG because calls are
not yet expanded into call sequences: that happens
after type legalization has finished.
llvm-svn: 49634
2008-04-14 06:48:48 +00:00
Chris Lattner
cc9709cff4
add a new CallGraphNode::removeCallEdgeFor method, tidy some comments.
...
llvm-svn: 49617
2008-04-13 19:41:25 +00:00
Owen Anderson
1f6fbc4bc3
Replace calls of the form V1->setName(V2->getName()) with V1->takeName(V2),
...
which is significantly more efficient.
llvm-svn: 49614
2008-04-13 19:15:17 +00:00
Duncan Sands
0a8a4c4a0c
LegalizeTypes can sometimes have deleted nodes
...
in its maps. Add some sanity checks that catch
this kind of thing. Hopefully these can be
removed one day (once all problems are fixed!)
but for the moment it seems wise to have them in.
llvm-svn: 49612
2008-04-13 16:04:03 +00:00
Nicolas Geoffray
dcc2eda5fc
Add a divided flag for the first piece of an argument divided into mulitple parts. Fixes PR1643
...
llvm-svn: 49611
2008-04-13 13:40:22 +00:00
Chris Lattner
4d232bccca
Fix some serious logic errors that broke the jit on darwin/x86-64.
...
llvm-svn: 49606
2008-04-13 07:04:56 +00:00
Duncan Sands
a07136ee2d
Merge LLVMBuilder and FoldingBuilder, calling
...
the result IRBuilder. Patch by Dominic Hamon.
llvm-svn: 49604
2008-04-13 06:22:09 +00:00
Chris Lattner
a0a58b63f7
Gabor points out that reserveOperandSpace takes # of values,
...
not # of operands as an input.
llvm-svn: 49599
2008-04-13 00:14:42 +00:00
Anton Korobeynikov
b9f38f38fa
Provide option for stack alignment override
...
llvm-svn: 49593
2008-04-12 22:12:22 +00:00
Arnold Schwaighofer
634fc9a33a
This patch corrects the handling of byval arguments for tailcall
...
optimized x86-64 (and x86) calls so that they work (... at least for
my test cases).
Should fix the following problems:
Problem 1: When i introduced the optimized handling of arguments for
tail called functions (using a sequence of copyto/copyfrom virtual
registers instead of always lowering to top of the stack) i did not
handle byval arguments correctly e.g they did not work at all :).
Problem 2: On x86-64 after the arguments of the tail called function
are moved to their registers (which include ESI/RSI etc), tail call
optimization performs byval lowering which causes xSI,xDI, xCX
registers to be overwritten. This is handled in this patch by moving
the arguments to virtual registers first and after the byval lowering
the arguments are moved from those virtual registers back to
RSI/RDI/RCX.
llvm-svn: 49584
2008-04-12 18:11:06 +00:00
Duncan Sands
844d55a42a
Factor some libcall code.
...
llvm-svn: 49583
2008-04-12 17:14:18 +00:00
Dan Gohman
544ab2c50b
Drop ISD::MEMSET, ISD::MEMMOVE, and ISD::MEMCPY, which are not Legal
...
on any current target and aren't optimized in DAGCombiner. Instead
of using intermediate nodes, expand the operations, choosing between
simple loads/stores, target-specific code, and library calls,
immediately.
Previously, the code to emit optimized code for these operations
was only used at initial SelectionDAG construction time; now it is
used at all times. This fixes some cases where rep;movs was being
used for small copies where simple loads/stores would be better.
This also cleans up code that checks for alignments less than 4;
let the targets make that decision instead of doing it in
target-independent code. This allows x86 to use rep;movs in
low-alignment cases.
Also, this fixes a bug that resulted in the use of rep;stos for
memsets of 0 with non-constant memory size when the alignment was
at least 4. It's better to use the library in this case, which
can be significantly faster when the size is large.
This also preserves more SourceValue information when memory
intrinsics are lowered into simple loads/stores.
llvm-svn: 49572
2008-04-12 04:36:06 +00:00
Dan Gohman
8c7cf88f7e
Fix a bug that prevented x86-64 from using rep.movsq for
...
8-byte-aligned data.
llvm-svn: 49571
2008-04-12 02:35:39 +00:00
Nate Begeman
7417348a7e
80 col fix
...
llvm-svn: 49569
2008-04-12 00:47:57 +00:00
Nate Begeman
4840515dff
Restore code to disable crash catcher on older OS X systems
...
llvm-svn: 49568
2008-04-12 00:47:46 +00:00
Evan Cheng
213ea6b276
Add debugging code.
...
llvm-svn: 49566
2008-04-12 00:22:01 +00:00
Chris Lattner
ad281e8e19
Reenable JIT symbol table.
...
llvm-svn: 49548
2008-04-11 18:11:56 +00:00
Evan Cheng
305d268ac3
Do not add empty live intervals to handled_. They should never be undone for backtracking.
...
llvm-svn: 49544
2008-04-11 17:55:47 +00:00
Evan Cheng
33281864c1
If a PHI node has a single implicit_def source, replace it with an implicit_def instead of a copy.
...
llvm-svn: 49543
2008-04-11 17:54:45 +00:00
Evan Cheng
499ffa9055
Use of implicit_def is not part of live interval. Create empty intervals for the uses when the live interval is being spilled.
...
llvm-svn: 49542
2008-04-11 17:53:36 +00:00
Gabor Greif
c422383e08
detabify
...
llvm-svn: 49524
2008-04-11 09:34:57 +00:00
Owen Anderson
1e73f29a7f
Fix PR2213 by simultaneously making GVN more aggressive with the return values
...
of calls and less aggressive with non-readnone calls.
llvm-svn: 49516
2008-04-11 05:11:49 +00:00
Evan Cheng
c6864b6652
Remove implicit_def instructions that become dead as result of coalescing.
...
llvm-svn: 49513
2008-04-10 23:48:35 +00:00
Evan Cheng
2cb98eb4bb
Allow registers defined by implicit_def to be clobbered.
...
llvm-svn: 49512
2008-04-10 23:47:53 +00:00
Dan Gohman
9b5ffc8408
Fix a typo in a comment.
...
llvm-svn: 49504
2008-04-10 23:02:38 +00:00
Owen Anderson
53336d8055
Fix for PR2190. Memdep's non-local caching was checking dirtied blocks in the
...
wrong order.
llvm-svn: 49499
2008-04-10 22:13:32 +00:00
Dan Gohman
f4bc782495
Make several symbols static.
...
llvm-svn: 49496
2008-04-10 21:11:47 +00:00
Dan Gohman
99b7b3f03b
Teach InstCombine's ComputeMaskedBits to handle pointer expressions
...
in addition to integer expressions. Rewrite GetOrEnforceKnownAlignment
as a ComputeMaskedBits problem, moving all of its special alignment
knowledge to ComputeMaskedBits as low-zero-bits knowledge.
Also, teach ComputeMaskedBits a few basic things about Mul and PHI
instructions.
This improves ComputeMaskedBits-based simplifications in a few cases,
but more noticeably it significantly improves instcombine's alignment
detection for loads, stores, and memory intrinsics.
llvm-svn: 49492
2008-04-10 18:43:06 +00:00
Evan Cheng
16ea87d6ee
A copy instruction may use a register multiple times on some targets. Change them all.
...
llvm-svn: 49491
2008-04-10 18:38:47 +00:00
Evan Cheng
5e1971c894
Add comment.
...
llvm-svn: 49469
2008-04-10 08:03:14 +00:00
Chris Lattner
aeb23a8a34
add a note, this is actually not too bad to implement.
...
llvm-svn: 49466
2008-04-10 05:54:50 +00:00
Chris Lattner
c692188075
move the x86-32 part of PR2108 here.
...
llvm-svn: 49465
2008-04-10 05:37:47 +00:00
Chris Lattner
ad75302497
Fix the x86-64 side of PR2108 by adding a v2f64 version of
...
MOVZQI2PQIrr. This would be better handled as a dag combine
(with the goal of eliminating the bitconvert) but I don't know
how to do that safely. Thoughts welcome.
llvm-svn: 49463
2008-04-10 05:13:43 +00:00
Evan Cheng
9d339849ee
Teach branch folding pass about implicit_def instructions. Unfortunately we can't just eliminate them since register scavenger expects every register use to be defined. However, we can delete them when there are no intra-block uses. Carefully removing some implicit def's which enable more blocks to be optimized away.
...
llvm-svn: 49461
2008-04-10 02:32:10 +00:00
Chris Lattner
a29d2536aa
Disable an xform we've had for a long time, pow(x,0.5) -> sqrt.
...
This is not safe for all inputs.
llvm-svn: 49458
2008-04-10 02:07:51 +00:00
Evan Cheng
c8eeb752a3
- More aggressively coalescing away copies whose source is defined by an implicit_def.
...
- Added insert_subreg coalescing support.
llvm-svn: 49448
2008-04-09 20:57:25 +00:00
Dan Gohman
33b3300178
Make isVectorClearMaskLegal's operand list const.
...
llvm-svn: 49446
2008-04-09 20:09:42 +00:00
Dan Gohman
3d074a3125
Add XMM1 as a second return value register for f32 and f64 on x86-64. This
...
is needed for the x86-64-ABI handling of structs that contain floating-point
members that are returned by value.
llvm-svn: 49441
2008-04-09 17:54:37 +00:00
Dan Gohman
cbf87313a2
Add DX as a second return value register for i16 on x86.
...
llvm-svn: 49440
2008-04-09 17:53:38 +00:00
Chris Lattner
802134fc02
Generalize getUnaryFloatFunction to handle any FP unary function, automatically
...
figuring out the suffix to use. implement pow(2,x) -> exp2(x).
llvm-svn: 49437
2008-04-09 17:48:11 +00:00
Chris Lattner
cca74e5ab9
use the new ConstantFP::get method to make this work with
...
long double and simplify the code.
llvm-svn: 49435
2008-04-09 17:17:35 +00:00
Devang Patel
a7dfbc0366
Be conservative if getresult operand is neither call nor invoke.
...
llvm-svn: 49430
2008-04-09 15:58:24 +00:00
Owen Anderson
ef9a6fd5c2
Factor a bunch of functionality related to memcpy and memset transforms out of
...
GVN and into its own pass.
llvm-svn: 49419
2008-04-09 08:23:16 +00:00
Owen Anderson
8ee792d1b6
Remove accidentally duplicated code.
...
llvm-svn: 49418
2008-04-09 07:55:01 +00:00
Chris Lattner
98bd939af8
add a simplified accessor for creating an fp constant of a
...
particular value but variable type.
llvm-svn: 49416
2008-04-09 06:38:30 +00:00
Evan Cheng
aa3b55f842
Missed a hasInterval check.
...
llvm-svn: 49415
2008-04-09 01:30:15 +00:00
Chris Lattner
b5b3e3136b
add a version of ConstantFP::get that doesn't take a redundant Type* value,
...
start migrating code over to use it.
llvm-svn: 49413
2008-04-09 00:45:01 +00:00
Chris Lattner
b859fb49ed
many cleanups to the pow optimizer. Allow it to handle powf,
...
add support for pow(x, 2.0) -> x*x.
llvm-svn: 49411
2008-04-09 00:07:45 +00:00
Dale Johannesen
4c0c018bc5
Rename -disable-required-unwind-tables to unwind-tables-optional.
...
llvm-svn: 49389
2008-04-08 18:07:49 +00:00
Duncan Sands
57d3a36386
Convenience method for setting the nounwind
...
attribute for a function.
llvm-svn: 49373
2008-04-08 07:23:58 +00:00
Devang Patel
8cd2a3ae2a
Fix insert point handling for multiple return values.
...
llvm-svn: 49367
2008-04-08 02:24:08 +00:00
Dale Johannesen
fe767621ca
Handle the situation in 2008-01-25-EmptyFunction.ll
...
correctly when unwind info is being generated.
llvm-svn: 49366
2008-04-08 00:37:56 +00:00
Dale Johannesen
344aec2952
Implement new llc flag -disable-required-unwind-tables.
...
Corresponds to -fno-unwind-tables (usually default in gcc).
llvm-svn: 49361
2008-04-08 00:10:24 +00:00
Ted Kremenek
a518bb79b1
Make getDirnameSep a static method (not part of Path's interface).
...
llvm-svn: 49354
2008-04-07 22:01:32 +00:00
Ted Kremenek
c042bf1db5
Added method Path::getDirname().
...
llvm-svn: 49352
2008-04-07 21:53:57 +00:00
Dan Gohman
3bc3ddd638
Rename MemOperand to MachineMemOperand. This was suggested by
...
review feedback from Chris quite a while ago. No functionality
change.
llvm-svn: 49348
2008-04-07 19:35:22 +00:00
Owen Anderson
ed92b41a39
Add operator= implementations to SparseBitVector, allowing it to be used in GVN. This results
...
in both time and memory savings for GVN. For example, one testcase went from 10.5s to 6s with
this patch.
llvm-svn: 49345
2008-04-07 17:38:23 +00:00
Daniel Berlin
b646062ad5
Fix PR 2169.
...
llvm-svn: 49339
2008-04-07 14:20:50 +00:00
Duncan Sands
813384951e
Use Intrinsic::getDeclaration in more places.
...
llvm-svn: 49338
2008-04-07 13:45:04 +00:00
Duncan Sands
1416ebf1fe
The "stacksave is not nounwind problem" no longer
...
needs to be fixed here - a previous commit made sure
that intrinsics always get the right attributes.
So remove no-longer needed code, and while there use
Intrinsic::getDeclaration rather than getOrInsertFunction.
llvm-svn: 49337
2008-04-07 13:43:58 +00:00
Duncan Sands
fbc6adcc59
Use Intrinsic::getDeclaration to get hold of
...
intrinsics. Fix up the argument type (should
be i8*, was an array*).
llvm-svn: 49336
2008-04-07 13:41:19 +00:00
Duncan Sands
a8ff6ca2e3
Make sure that intrinsics automagically get the
...
right parameter attributes no matter how they
are obtained.
llvm-svn: 49335
2008-04-07 13:39:11 +00:00
Roman Levenstein
51f532f92d
Re-commit of the r48822, where the infinite looping problem discovered
...
by Dan Gohman is fixed.
llvm-svn: 49330
2008-04-07 10:06:32 +00:00
Owen Anderson
0c1e634cbb
Make GVN more memory efficient, particularly on code that contains a large number of
...
allocations, which GVN can't optimize anyways.
llvm-svn: 49329
2008-04-07 09:59:07 +00:00
Dale Johannesen
87e484f08b
Mark calls to llvm.stacksave, llvm.stackrestore as
...
nounwind. When such calls are inlined into something
else that is invoked, they were getting changed to invokes,
which is badness.
llvm-svn: 49299
2008-04-07 00:08:48 +00:00
Gabor Greif
92f493dc72
regenerate
...
llvm-svn: 49293
2008-04-06 23:07:54 +00:00
Chris Lattner
982e8502c9
fix warnings with assertions disabled.
...
llvm-svn: 49285
2008-04-06 21:50:58 +00:00
Chris Lattner
4db1f62d84
Silence warning when no assertions.
...
llvm-svn: 49284
2008-04-06 21:46:45 +00:00
Chris Lattner
a39cfc5c5b
silence a warning when assertions are disabled.
...
llvm-svn: 49283
2008-04-06 21:44:08 +00:00
Gabor Greif
dd8b7a0a47
fix a warning
...
llvm-svn: 49282
2008-04-06 21:42:13 +00:00
Torok Edwin
613d7afe64
Prefer to expand mask for xor to -1, so we have a chance to turn it into a not.
...
If it cannot be expanded, it will keep the old behaviour and try to shrink the constant.
Part of enhancement for PR2191.
llvm-svn: 49280
2008-04-06 21:23:02 +00:00
Gabor Greif
e9ecc68d8f
API changes for class Use size reduction, wave 1.
...
Specifically, introduction of XXX::Create methods
for Users that have a potentially variable number of
Uses.
llvm-svn: 49277
2008-04-06 20:25:17 +00:00
Chris Lattner
8519c0ead8
disable this for now.
...
llvm-svn: 49248
2008-04-05 04:12:01 +00:00
Evan Cheng
b5fdc923d3
1. IMPLICIT_DEF can *re-define* any register.
...
2. Coalescer can now create an interesting situation where a register def can
reaches itself without being killed.
llvm-svn: 49246
2008-04-05 01:27:09 +00:00
Evan Cheng
f77b5ef3d0
Favors pshufd over shufps when shuffling elements from one vector. pshufd is faster than shufps.
...
llvm-svn: 49244
2008-04-05 00:30:36 +00:00