Commit Graph

21912 Commits

Author SHA1 Message Date
Chris Lattner
7f9975a793 Disable a broken optimization
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25340 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-15 19:15:46 +00:00
Chris Lattner
bf40c4bfe1 Disable two transformations that contribute to bus errors on SparcV8.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25339 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-15 18:58:59 +00:00
Evan Cheng
cf74a7c762 Added patterns for 8-bit multiply
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25338 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-15 10:05:20 +00:00
Evan Cheng
37e9005db3 Type inferencing bug
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25337 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-15 10:04:45 +00:00
Duraid Madina
2e0348e18e explain that r12 is the stack pointer reg
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25336 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-15 09:45:23 +00:00
Chris Lattner
4fca01731a 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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25335 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-15 09:26:27 +00:00
Chris Lattner
b22c08b808 Use the default impl of DYNAMIC_STACKALLOC, allowing us to delete some code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25334 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-15 09:02:48 +00:00
Chris Lattner
e112552b5a Use the default lowering of ISD::DYNAMIC_STACKALLOC, delete now dead code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25333 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-15 09:00:21 +00:00
Chris Lattner
934ea49a55 Have legalize take care of DYNAMIC_STACKALLOC for us, implement llvm.stacksave/stackrestore.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25332 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-15 08:55:25 +00:00
Chris Lattner
903d278a9b Allow the target to specify 'expand' if they just require the amount to
be subtracted from the stack pointer.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25331 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-15 08:54:32 +00:00
Chris Lattner
bce8887cee Implement DYNAMIC_STACKALLOC for V8
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25330 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-15 08:43:57 +00:00
Chris Lattner
5f652295c2 Fix custom lowering of dynamic_stackalloc
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25329 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-15 08:43:08 +00:00
Chris Lattner
3776fea371 add a missing break that Reid noticed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25328 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-15 08:40:16 +00:00
Chris Lattner
cc0aad20dd add a missing node name
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25327 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-15 08:39:35 +00:00
Chris Lattner
7c41907887 reorder passes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25326 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-15 07:19:53 +00:00
Chris Lattner
c0ab5226cc 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)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25325 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-14 22:41:46 +00:00
Chris Lattner
bc0f46097d Cleanup IA64ISD, tell the graph drawer what the symbolic names for the enums are.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25324 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-14 22:27:21 +00:00
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
426b245597 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25319 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-14 20:07:07 +00:00
Chris Lattner
4c2881ecb9 Teach inline function how to update the callgraph when it makes changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25318 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-14 20:05:06 +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
56151dad2e Add CallGraph::getOrInsertFunction, to allow clients to update the callgraph
when they change the program


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25316 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-14 20:01:50 +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
Jeff Cohen
b69c190c26 Fix generous source of VC++ truncation warnings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25311 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-14 02:17:20 +00:00
Nate Begeman
2f86c223d3 Fix the instructions for adding an intrinsic.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25310 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-14 01:27: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
Jim Laskey
088a84eb2d testcase for PR676: http://llvm.cs.uiuc.edu/PR676
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25306 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-14 00:29:48 +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
Chris Lattner
2790383f73 Add a new InvalidateStructLayoutInfo method and some comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25303 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-14 00:06:42 +00:00
Nate Begeman
7e36c47307 Make the bswap documentation more to sabre's liking!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25302 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-13 23:26:38 +00:00
Chris Lattner
fb6977de4f fix some minor errors
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25301 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-13 23:26:01 +00:00
Nate Begeman
ed4ac951e5 Add documentation for the upcoming bswap intrinsics!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25300 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-13 23:02:51 +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
Chris Lattner
1787ee31ed testcase for PR691
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25298 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-13 22:05:36 +00:00
Chris Lattner
e5445dc6a2 new testcases for the stackrestore instcombine optimizations
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25297 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-13 22:01:47 +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
Chris Lattner
b419b0e682 Simplify the implementations of classof using the new IntrinsicInst classof.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25291 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-13 20:00:51 +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