Commit Graph

21891 Commits

Author SHA1 Message Date
Chris Lattner 7eb2947546 New testcase for a regression last night: the -inline pass wasn't updating
callgraph to include new edges do to inserted llvm.stacksave/llvm.stackrestore
calls.

llvm-svn: 25319
2006-01-14 20:07:07 +00:00
Chris Lattner a1128c23d1 Teach inline function how to update the callgraph when it makes changes.
llvm-svn: 25318
2006-01-14 20:05:06 +00:00
Chris Lattner 00ca8d2de8 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 b332156c1e Add CallGraph::getOrInsertFunction, to allow clients to update the callgraph
when they change the program

llvm-svn: 25316
2006-01-14 20:01:50 +00:00
Chris Lattner ef530c24c1 FunctionPass's cannot do IPO things.
llvm-svn: 25315
2006-01-14 19:30:35 +00:00
Chris Lattner bc351e171f add a dump method to CallGraph
llvm-svn: 25314
2006-01-14 19:17:02 +00:00
Nate Begeman 542c3c17a9 Remove some duplicated code
llvm-svn: 25313
2006-01-14 03:18:27 +00:00
Nate Begeman 2fba8a3aaa bswap implementation
llvm-svn: 25312
2006-01-14 03:14:10 +00:00
Jeff Cohen 8f8504b3c6 Fix generous source of VC++ truncation warnings.
llvm-svn: 25311
2006-01-14 02:17:20 +00:00
Nate Begeman f6b7dd7ca9 Fix the instructions for adding an intrinsic.
llvm-svn: 25310
2006-01-14 01:27:10 +00:00
Nate Begeman 82049eba2c Add bswap intrinsics as documented in the Language Reference
llvm-svn: 25309
2006-01-14 01:25:24 +00:00
Nate Begeman f2b38dbdc7 Remove some redundant stuff out of the readme.
llvm-svn: 25308
2006-01-14 01:24:22 +00:00
Evan Cheng 3bc25e8a54 A typo.
llvm-svn: 25307
2006-01-14 01:18:49 +00:00
Jim Laskey 2d7162aaf4 testcase for PR676: http://llvm.cs.uiuc.edu/PR676
llvm-svn: 25306
2006-01-14 00:29:48 +00:00
Chris Lattner a4de9baf40 Implement a new InvalidateStructLayoutInfo method and add some comments
llvm-svn: 25304
2006-01-14 00:07:34 +00:00
Chris Lattner 48c60c0285 Add a new InvalidateStructLayoutInfo method and some comments.
llvm-svn: 25303
2006-01-14 00:06:42 +00:00
Nate Begeman 0f223bbce2 Make the bswap documentation more to sabre's liking!
llvm-svn: 25302
2006-01-13 23:26:38 +00:00
Chris Lattner 333374713d fix some minor errors
llvm-svn: 25301
2006-01-13 23:26:01 +00:00
Nate Begeman 611ecc07b6 Add documentation for the upcoming bswap intrinsics!
llvm-svn: 25300
2006-01-13 23:02:51 +00:00
Robert Bocchino a83529678e Added instcombine support for extractelement.
llvm-svn: 25299
2006-01-13 22:48:06 +00:00
Chris Lattner 403a11ca8f testcase for PR691
llvm-svn: 25298
2006-01-13 22:05:36 +00:00
Chris Lattner db8c13acf3 new testcases for the stackrestore instcombine optimizations
llvm-svn: 25297
2006-01-13 22:01:47 +00:00
Evan Cheng 392c7d2779 Add truncstore i1 patterns.
llvm-svn: 25296
2006-01-13 21:45:19 +00:00
Chris Lattner 5fba6e6696 it is ok to dce stacksave.
llvm-svn: 25295
2006-01-13 21:31:54 +00:00
Chris Lattner 503221f5c5 Do a simple instcombine xforms to delete llvm.stackrestore cases.
llvm-svn: 25294
2006-01-13 21:28:09 +00:00
Chris Lattner 5f9c134bac 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 c66b223b28 Simplify this a tiny bit by using the new IntrinsicInst functionality.
llvm-svn: 25292
2006-01-13 20:11:04 +00:00
Chris Lattner 0de6020d6a Simplify the implementations of classof using the new IntrinsicInst classof.
llvm-svn: 25291
2006-01-13 20:00:51 +00:00
Evan Cheng dba84bbc1e 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 d5bb9df4d8 Add some functionality to the IntrinsicInst class and some comments
llvm-svn: 25289
2006-01-13 19:49:02 +00:00
Chris Lattner 45406c0c53 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 accc5bfe92 New testcase that functions with dynamic allocas can be inlined, and are
inlined correctly.

llvm-svn: 25287
2006-01-13 19:35:05 +00:00
Chris Lattner 2be0607a8d 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 e24f79a032 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 19e6a08d78 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 908d79556d 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 045371a744 make DAG isel the default
llvm-svn: 25282
2006-01-13 18:49:47 +00:00
Chris Lattner edad1288fd 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 257492c0ab 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 49c4d536bd Fix 80 column violations
llvm-svn: 25279
2006-01-13 18:06:56 +00:00
Chris Lattner 1a8d918ef1 Enable X86 support for savestack/restorestack
llvm-svn: 25278
2006-01-13 18:00:54 +00:00
Chris Lattner 776c326c96 implement stacksave/stackrestore on PPC
llvm-svn: 25277
2006-01-13 17:52:03 +00:00
Chris Lattner ed9b3e1c0a 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
Chris Lattner 3b8b0c4f6a Provide an interface for Targets to specify their stack pointer register
for llvm.stacksave/restore.

llvm-svn: 25275
2006-01-13 17:47:52 +00:00
Duraid Madina 0b94324c5e don't be a doofus - this fixes storing bools
llvm-svn: 25274
2006-01-13 10:28:25 +00:00
Chris Lattner b32664583b 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 8e2f52e645 expand unsupported stacksave/stackrestore nodes
llvm-svn: 25272
2006-01-13 02:42:53 +00:00
Chris Lattner fdc6d1ea69 new nodes
llvm-svn: 25271
2006-01-13 02:40:58 +00:00
Chris Lattner a5110e854d add stacksave/stackrestore nodes
llvm-svn: 25270
2006-01-13 02:39:42 +00:00
Chris Lattner 00720d8ff0 testcase for the llvm.stacksave/llvm.stackrestore intrinsics.
llvm-svn: 25269
2006-01-13 02:25:08 +00:00