Commit Graph

12399 Commits

Author SHA1 Message Date
Chris Lattner
f91e97ae81 Clean up the FFS optimization code, and make it correctly create the appropriate
unsigned llvm.cttz.* intrinsic, fixing the 2005-05-11-Popcount-ffs-fls regression
last night.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25398 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-17 18:27:17 +00:00
Jim Laskey
063e765345 Adding basic support for Dwarf line number debug information.
I promise to keep future commits smaller.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25396 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-17 17:31:53 +00:00
Evan Cheng
e5d9343377 Zero extending load from i1 to i8.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25391 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-17 07:02:46 +00:00
Duraid Madina
a2610934a0 oops, this shouldn't have gotten in
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25388 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-17 03:09:48 +00:00
Evan Cheng
6892f28e99 SSE does not support i64 SINT_TO_FP (FP stack doesn't either, but we custom
expand it), so ask legalizer to expand i32 UINT_TO_FP.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25386 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-17 02:32:49 +00:00
Duraid Madina
362071d7d4 use proper (82-bit) spills/fills when spilling FP regs, so that
divides don't get broken. this fixes obsequi, smg2000, and probably
a bunch of other stuff (tm)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25385 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-17 02:04:52 +00:00
Duraid Madina
ae6dcddcfe fixing divides
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25383 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-17 01:19:49 +00:00
Chris Lattner
4df8665bf9 Revert this, I didn't mean to commit it
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25382 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-17 00:40:24 +00:00
Evan Cheng
2059f884aa Added a FIXME comment about why FST is currently flagged to fpGETRESULT.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25381 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-17 00:37:42 +00:00
Chris Lattner
79959d21c7 Add support for programs with a null argv[0]
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25379 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-17 00:32:28 +00:00
Evan Cheng
42ef0bc6fb Bug fixes: fpGETRESULT should produces a flag result and X86ISD::FST should
read a flag.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25378 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-17 00:19:47 +00:00
Evan Cheng
b5d0b0bae5 More typo's
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25375 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-16 23:26:53 +00:00
Evan Cheng
8a3f4c75fa Some typo's
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25374 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-16 22:48:46 +00:00
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
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
Chris Lattner
d9d681d128 Patch #10 from Saem:
"Extracts a few more methods, reduces some redundancy in the code at
the same time."


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25248 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-12 16:48:23 +00:00
Evan Cheng
5ee4ccce5b X86ISD::SETCC (e.g. SETEr) produces a flag (so multiple SETCC can be
linked together).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25247 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-12 08:27:59 +00:00