Evan Cheng
fe83dd85c8
Added patterns for 8-bit multiply
...
llvm-svn: 25338
2006-01-15 10:05:20 +00:00
Duraid Madina
eb89d7a5d1
explain that r12 is the stack pointer reg
...
llvm-svn: 25336
2006-01-15 09:45:23 +00:00
Chris Lattner
a91c75e676
Don't print a label for the first MBB in a function.
...
Compile this:
%_2E_str_8 = external global [75 x sbyte]
implementation ; Functions:
declare int %printf(sbyte*, ...)
void %test()
%tmp.101 = call int (sbyte*, ...)* %printf( sbyte* getelementptr ([75 x sbyte]* %_2E_str_8, int 0, int 0) ) ; <int> [#uses=0]
unreachable
}
to this:
main_endif_2E_8:
save -96, %o6, %o6
sethi %hi(_2E_str_8), %l0
add %l0, %lo(_2E_str_8), %o0
call printf
nop
instead of this:
main_endif_2E_8:
save -96, %o6, %o6
sethi %hi(_2E_str_8), %l0
or %g0, %lo(_2E_str_8), %l1 ;; extra instruction
add %l1, %l0, %o0
call printf
nop
llvm-svn: 25335
2006-01-15 09:26:27 +00:00
Chris Lattner
4d2c4cb7a7
Use the default impl of DYNAMIC_STACKALLOC, allowing us to delete some code.
...
llvm-svn: 25334
2006-01-15 09:02:48 +00:00
Chris Lattner
20f25dc8c2
Use the default lowering of ISD::DYNAMIC_STACKALLOC, delete now dead code.
...
llvm-svn: 25333
2006-01-15 09:00:21 +00:00
Chris Lattner
ada619f3b6
Have legalize take care of DYNAMIC_STACKALLOC for us, implement llvm.stacksave/stackrestore.
...
llvm-svn: 25332
2006-01-15 08:55:25 +00:00
Chris Lattner
4b3181512b
Allow the target to specify 'expand' if they just require the amount to
...
be subtracted from the stack pointer.
llvm-svn: 25331
2006-01-15 08:54:32 +00:00
Chris Lattner
d8711c673d
Implement DYNAMIC_STACKALLOC for V8
...
llvm-svn: 25330
2006-01-15 08:43:57 +00:00
Chris Lattner
acf02c3510
Fix custom lowering of dynamic_stackalloc
...
llvm-svn: 25329
2006-01-15 08:43:08 +00:00
Chris Lattner
ab909c344b
add a missing break that Reid noticed.
...
llvm-svn: 25328
2006-01-15 08:40:16 +00:00
Chris Lattner
c23f5e6dc7
add a missing node name
...
llvm-svn: 25327
2006-01-15 08:39:35 +00:00
Chris Lattner
241b08f64d
reorder passes
...
llvm-svn: 25326
2006-01-15 07:19:53 +00:00
Chris Lattner
e92e4a4342
Token chain results are not always the first or last result. Consider copyfromreg nodes, where they are the middle result (the flag result is last)
...
llvm-svn: 25325
2006-01-14 22:41:46 +00:00
Chris Lattner
be7efab5dc
Cleanup IA64ISD, tell the graph drawer what the symbolic names for the enums are.
...
llvm-svn: 25324
2006-01-14 22:27:21 +00:00
Chris Lattner
551df64bd0
Change ET-Forest to automatically recalculate its DFSnum's if too many slow
...
queries are made.
Patch by Daniel Berlin!
llvm-svn: 25323
2006-01-14 20:55:09 +00:00
Chris Lattner
95882698e5
silence a warning
...
llvm-svn: 25322
2006-01-14 20:11:13 +00:00
Chris Lattner
f718ef50ad
Let the inliner update the callgraph to reflect the changes it makes, instead
...
of doing it ourselves. This fixes Transforms/Inline/2006-01-14-CallGraphUpdate.ll
llvm-svn: 25321
2006-01-14 20:09:18 +00:00
Chris Lattner
fea434f37e
Teach the inliner to update the CallGraph itself, and have it add edges to
...
llvm.stacksave/restore when it inserts calls to them.
llvm-svn: 25320
2006-01-14 20:07:50 +00:00
Chris Lattner
ab3707bf90
Add a new CallGraph::getOrInsertFunction for clients to use when updating
...
the callgraph.
llvm-svn: 25317
2006-01-14 20:03:00 +00:00
Chris Lattner
7cbd5dc1f0
FunctionPass's cannot do IPO things.
...
llvm-svn: 25315
2006-01-14 19:30:35 +00:00
Chris Lattner
f75f017cae
add a dump method to CallGraph
...
llvm-svn: 25314
2006-01-14 19:17:02 +00:00
Nate Begeman
956b57ce43
Remove some duplicated code
...
llvm-svn: 25313
2006-01-14 03:18:27 +00:00
Nate Begeman
85b2dc0c4e
bswap implementation
...
llvm-svn: 25312
2006-01-14 03:14:10 +00:00
Nate Begeman
4750001146
Add bswap intrinsics as documented in the Language Reference
...
llvm-svn: 25309
2006-01-14 01:25:24 +00:00
Nate Begeman
10813e4f97
Remove some redundant stuff out of the readme.
...
llvm-svn: 25308
2006-01-14 01:24:22 +00:00
Evan Cheng
d92410b194
A typo.
...
llvm-svn: 25307
2006-01-14 01:18:49 +00:00
Chris Lattner
bf03ecb920
Implement a new InvalidateStructLayoutInfo method and add some comments
...
llvm-svn: 25304
2006-01-14 00:07:34 +00:00
Robert Bocchino
4617a805da
Added instcombine support for extractelement.
...
llvm-svn: 25299
2006-01-13 22:48:06 +00:00
Evan Cheng
4d9bab5789
Add truncstore i1 patterns.
...
llvm-svn: 25296
2006-01-13 21:45:19 +00:00
Chris Lattner
818f217fad
it is ok to dce stacksave.
...
llvm-svn: 25295
2006-01-13 21:31:54 +00:00
Chris Lattner
61a2fca725
Do a simple instcombine xforms to delete llvm.stackrestore cases.
...
llvm-svn: 25294
2006-01-13 21:28:09 +00:00
Chris Lattner
b839f31954
Fix a bug in my last X86 checkin, pointed out by cozmic
...
llvm-svn: 25293
2006-01-13 20:19:44 +00:00
Chris Lattner
e79c8847f0
Simplify this a tiny bit by using the new IntrinsicInst functionality.
...
llvm-svn: 25292
2006-01-13 20:11:04 +00:00
Evan Cheng
a26ed7b9b2
LHS = X86ISD::CMOVcc LHS, RHS means LHS = RHS if cc. So the operands must be
...
flipped around.
llvm-svn: 25290
2006-01-13 19:51:46 +00:00
Chris Lattner
67a0c03bb4
Permit inlining functions that contain dynamic allocations now that
...
InlineFunction handles this case safely. This implements
Transforms/Inline/dynamic_alloca_test.ll.
llvm-svn: 25288
2006-01-13 19:35:43 +00:00
Chris Lattner
423aeb28d5
If inlining a call to a function that contains dynamic allocas, wrap the
...
resultant code with llvm.stacksave/llvm.stackrestore intrinsics.
llvm-svn: 25286
2006-01-13 19:34:14 +00:00
Chris Lattner
672f2df6d0
Use ClonedCodeInfo to avoid another walk over the inlined code, this this
...
time in common C cases.
llvm-svn: 25285
2006-01-13 19:18:11 +00:00
Chris Lattner
6f96396bae
Use the ClonedCodeInfo object to avoid scans of the inlined code when
...
it doesn't contain any calls. This is a fairly common case for C++ code,
so it will probably speed up the inliner marginally in these cases.
llvm-svn: 25284
2006-01-13 19:15:15 +00:00
Chris Lattner
ec00fcaba6
Refactor a bunch of invoke handling stuff out into a new function
...
"HandleInlinedInvoke". No functionality change.
llvm-svn: 25283
2006-01-13 19:05:59 +00:00
Andrew Lenharth
e591830a97
make DAG isel the default
...
llvm-svn: 25282
2006-01-13 18:49:47 +00:00
Chris Lattner
67fb415248
Allow the code cloning interfaces to capture some important info about the
...
code being cloned if the client wants.
llvm-svn: 25281
2006-01-13 18:39:17 +00:00
Chris Lattner
32ff638ae5
Fix a bug I noticed by inspection: if the first instruction in the inlined
...
function was not an alloca, we wouldn't check the entry block for any allocas,
leading to increased stack space in some cases. In practice, allocas are almost
always at the top of the block, so this was never noticed.
llvm-svn: 25280
2006-01-13 18:16:48 +00:00
Chris Lattner
32f54b291d
Fix 80 column violations
...
llvm-svn: 25279
2006-01-13 18:06:56 +00:00
Chris Lattner
344642961e
Enable X86 support for savestack/restorestack
...
llvm-svn: 25278
2006-01-13 18:00:54 +00:00
Chris Lattner
c615ed65ac
implement stacksave/stackrestore on PPC
...
llvm-svn: 25277
2006-01-13 17:52:03 +00:00
Chris Lattner
91b83a2448
If a target specified a stack pointer with setStackPointerRegisterToSaveRestore,
...
lower STACKSAVE/STACKRESTORE into a copy from/to that register.
llvm-svn: 25276
2006-01-13 17:48:44 +00:00
Duraid Madina
e8b42dc96d
don't be a doofus - this fixes storing bools
...
llvm-svn: 25274
2006-01-13 10:28:25 +00:00
Chris Lattner
4107b4d7ee
Compile llvm.stacksave/restore into STACKSAVE/STACKRESTORE nodes, and allow
...
targets to custom expand them as they desire.
llvm-svn: 25273
2006-01-13 02:50:02 +00:00
Chris Lattner
80fed2d66e
expand unsupported stacksave/stackrestore nodes
...
llvm-svn: 25272
2006-01-13 02:42:53 +00:00
Chris Lattner
ea59d9a498
new nodes
...
llvm-svn: 25271
2006-01-13 02:40:58 +00:00