Commit Graph

12336 Commits

Author SHA1 Message Date
Andrew Lenharth
6e707fb39c fix short immediate loads
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25371 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-16 21:41:39 +00:00
Andrew Lenharth
739027ee4c stack and rpcc
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25369 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-16 21:22:38 +00:00
Evan Cheng
0cc3945efe Fix FP_TO_INT**_IN_MEM lowering.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25368 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-16 21:21:29 +00:00
Reid Spencer
0b118206bf For PR411:
This patch is an incremental step towards supporting a flat symbol table.
It de-overloads the intrinsic functions by providing type-specific intrinsics
and arranging for automatically upgrading from the old overloaded name to
the new non-overloaded name. Specifically:
  llvm.isunordered -> llvm.isunordered.f32, llvm.isunordered.f64
  llvm.sqrt -> llvm.sqrt.f32, llvm.sqrt.f64
  llvm.ctpop -> llvm.ctpop.i8, llvm.ctpop.i16, llvm.ctpop.i32, llvm.ctpop.i64
  llvm.ctlz -> llvm.ctlz.i8, llvm.ctlz.i16, llvm.ctlz.i32, llvm.ctlz.i64
  llvm.cttz -> llvm.cttz.i8, llvm.cttz.i16, llvm.cttz.i32, llvm.cttz.i64
New code should not use the overloaded intrinsic names. Warnings will be
emitted if they are used.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25366 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-16 21:12:35 +00:00
Reid Spencer
e86bf519e1 For PR411:
This file makes the helper functions for auto-upgrade of llvm assembly and
bytecode more accessible. This is part of de-overloading of intrinsic
functions to support the flat symbol table (no type planes).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25365 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-16 21:06:01 +00:00
Andrew Lenharth
84a0605feb Friendly names
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25364 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-16 19:53:25 +00:00
Chris Lattner
72223eea95 fix a crash due to missing parens
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25363 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-16 19:47:21 +00:00
Chris Lattner
98fbc2fd1b add notes from my *other* email acct.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25362 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-16 17:58:54 +00:00
Chris Lattner
1db4b4f5c4 transfer some notes from my email to somewhere useful.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25361 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-16 17:53:00 +00:00
Duraid Madina
76bb6ae211 fixing divides: FP should now be 100%, and integers are fine too
unless you try to div/mod 0 by anything, in which case you will
get some cute number, and not 0, which is bad.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25358 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-16 14:33:04 +00:00
Nate Begeman
1b5db7aaec Constant fold ctpop/ctlz/cttz, and a couple other small cleanups
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25357 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-16 08:07:10 +00:00
Nate Begeman
c02d98e335 Expand case for 64b Legalize, even though no one should end up using this
(itanium supports bswap natively, alpha should custom lower it using the
VAX floating point swapload, ha ha).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25356 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-16 07:59:13 +00:00
Nate Begeman
e598181889 Add BSWAP stuff to intrinsic lowering for CBE & friends.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25355 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-16 07:57:00 +00:00
Duraid Madina
0c81dc887c fix division! again!! pattern isel, prepare to die.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25353 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-16 06:33:38 +00:00
Chris Lattner
99cf50937d Silly Sparc is big endian. If we have to load args out of incoming stack slots
that are smaller than an int, make sure to adjust the frame pointer to take
this into consideration.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25351 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-16 01:40:00 +00:00
Chris Lattner
57a47d6a4b This pass has never worked correctly. Remove.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25349 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-16 01:06:00 +00:00
Chris Lattner
f7511b4943 Make sure that bool,byte and short arguments are the right type when loaded
from memory.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25346 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-15 22:22:01 +00:00
Chris Lattner
e2ba1b32ec Thanks to Daniel Berlin's ETForest fix, we can now use it again for the verifier
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25345 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-15 21:58:50 +00:00
Chris Lattner
14c02b752a ET-Forest has issues with unreachable blocks. Temporarily disable verifiers use
of it until they are resolved.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25341 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-15 20:00:51 +00:00
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
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
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