Commit Graph

12301 Commits

Author SHA1 Message Date
Chris Lattner
25abb1dc09 Change ET-Forest to automatically recalculate its DFSnum's if too many slow
queries are made.

Patch by Daniel Berlin!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25323 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-14 20:55:09 +00:00
Chris Lattner
b47fad9892 silence a warning
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25322 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-14 20:11:13 +00:00
Chris Lattner
432a205769 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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25321 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-14 20:09:18 +00:00
Chris Lattner
468fb1df7d Teach the inliner to update the CallGraph itself, and have it add edges to
llvm.stacksave/restore when it inserts calls to them.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25320 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-14 20:07:50 +00:00
Chris Lattner
c54b1c1f8b Add a new CallGraph::getOrInsertFunction for clients to use when updating
the callgraph.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25317 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-14 20:03:00 +00:00
Chris Lattner
516a74c01a FunctionPass's cannot do IPO things.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25315 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-14 19:30:35 +00:00
Chris Lattner
1694ec615f add a dump method to CallGraph
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25314 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-14 19:17:02 +00:00
Nate Begeman
3a04ffbf6d Remove some duplicated code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25313 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-14 03:18:27 +00:00
Nate Begeman
d88fc03602 bswap implementation
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25312 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-14 03:14:10 +00:00
Nate Begeman
6fb3bd6a65 Add bswap intrinsics as documented in the Language Reference
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25309 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-14 01:25:24 +00:00
Nate Begeman
6283760cd1 Remove some redundant stuff out of the readme.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25308 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-14 01:24:22 +00:00
Evan Cheng
e3703d44e9 A typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25307 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-14 01:18:49 +00:00
Chris Lattner
8dff24f378 Implement a new InvalidateStructLayoutInfo method and add some comments
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25304 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-14 00:07:34 +00:00
Robert Bocchino
1d7456d0bf Added instcombine support for extractelement.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25299 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-13 22:48:06 +00:00
Evan Cheng
b8414333ac Add truncstore i1 patterns.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25296 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-13 21:45:19 +00:00
Chris Lattner
5522037136 it is ok to dce stacksave.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25295 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-13 21:31:54 +00:00
Chris Lattner
a728ddc815 Do a simple instcombine xforms to delete llvm.stackrestore cases.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25294 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-13 21:28:09 +00:00
Chris Lattner
052d2ff5dd Fix a bug in my last X86 checkin, pointed out by cozmic
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25293 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-13 20:19:44 +00:00
Chris Lattner
8b0ea313d9 Simplify this a tiny bit by using the new IntrinsicInst functionality.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25292 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-13 20:11:04 +00:00
Evan Cheng
e90da97f3e LHS = X86ISD::CMOVcc LHS, RHS means LHS = RHS if cc. So the operands must be
flipped around.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25290 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-13 19:51:46 +00:00
Chris Lattner
ccca3ca85f Permit inlining functions that contain dynamic allocations now that
InlineFunction handles this case safely.  This implements
Transforms/Inline/dynamic_alloca_test.ll.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25288 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-13 19:35:43 +00:00
Chris Lattner
bf229f488a If inlining a call to a function that contains dynamic allocas, wrap the
resultant code with llvm.stacksave/llvm.stackrestore intrinsics.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25286 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-13 19:34:14 +00:00
Chris Lattner
1fdf4a859f Use ClonedCodeInfo to avoid another walk over the inlined code, this this
time in common C cases.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25285 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-13 19:18:11 +00:00
Chris Lattner
727d1dd587 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25284 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-13 19:15:15 +00:00
Chris Lattner
cd4d339ec1 Refactor a bunch of invoke handling stuff out into a new function
"HandleInlinedInvoke".  No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25283 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-13 19:05:59 +00:00
Andrew Lenharth
512c77e532 make DAG isel the default
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25282 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-13 18:49:47 +00:00
Chris Lattner
a4c29d2037 Allow the code cloning interfaces to capture some important info about the
code being cloned if the client wants.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25281 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-13 18:39:17 +00:00
Chris Lattner
21f20558d6 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25280 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-13 18:16:48 +00:00
Chris Lattner
8acb249725 Fix 80 column violations
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25279 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-13 18:06:56 +00:00
Chris Lattner
9edba7605e Enable X86 support for savestack/restorestack
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25278 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-13 18:00:54 +00:00
Chris Lattner
cadd7420f9 implement stacksave/stackrestore on PPC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25277 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-13 17:52:03 +00:00
Chris Lattner
4f0d8e4018 If a target specified a stack pointer with setStackPointerRegisterToSaveRestore,
lower STACKSAVE/STACKRESTORE into a copy from/to that register.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25276 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-13 17:48:44 +00:00
Duraid Madina
544cbbd479 don't be a doofus - this fixes storing bools
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25274 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-13 10:28:25 +00:00
Chris Lattner
140d53c99c Compile llvm.stacksave/restore into STACKSAVE/STACKRESTORE nodes, and allow
targets to custom expand them as they desire.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25273 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-13 02:50:02 +00:00
Chris Lattner
b99329e8a0 expand unsupported stacksave/stackrestore nodes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25272 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-13 02:42:53 +00:00
Chris Lattner
33f79df40c new nodes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25271 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-13 02:40:58 +00:00
Chris Lattner
5a67afc118 add stacksave/stackrestore nodes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25270 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-13 02:39:42 +00:00
Chris Lattner
e8f7a4bbee Add "support" for stacksave/stackrestore to the dag isel
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25268 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-13 02:24:42 +00:00
Chris Lattner
0c067bc11d Add "support" for the llvm.stacksave/stackrestore intrinsics, this is
used by the C backend.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25267 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-13 02:22:08 +00:00
Chris Lattner
71d0e3de8d Add recognition and verification of new llvm.stacksave/llvm.stackrestore intrinsics
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25266 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-13 02:15:39 +00:00
Evan Cheng
e08c270623 Minor update.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25263 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-13 01:20:42 +00:00
Evan Cheng
80ebe38118 More typo's. I need new eye glasses...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25261 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-13 01:17:24 +00:00
Evan Cheng
189d01e8cc Oops. Typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25260 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-13 01:06:49 +00:00
Evan Cheng
1bcee3602e Fix a SETCC / BRCOND folding bug.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25259 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-13 01:03:02 +00:00
Evan Cheng
a3195e8643 Fix sint_to_fp (fild*) support.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25257 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-12 22:54:21 +00:00
Chris Lattner
4aafb4ff92 Add a simple missing fold to produce this:
subfic r3, r2, 33

instead of this:

        subfic r2, r2, 32
        addi r3, r2, 1


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25255 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-12 20:22:43 +00:00
Evan Cheng
77e9043b84 Specify transformation from GlobalAddress to TargetGlobalAddress and
ExternalSymbol to TargetExternalSymbol.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25253 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-12 19:36:31 +00:00
Chris Lattner
5166b82866 If using __main, emit global ctor/dtor list like any other global
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25251 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-12 19:17:23 +00:00
Chris Lattner
af551bcf6b Don't create rotate instructions in unsupported types, because we don't have
promote/expand code yet.  This fixes the 177.mesa failure on PPC.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25250 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-12 18:57:33 +00:00
Chris Lattner
4bb91024ac Fix branches on FP compares
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25249 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-12 17:05:32 +00:00