Commit Graph

10355 Commits

Author SHA1 Message Date
Andrew Lenharth
e014f89f3d some call work
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22303 91177308-0d34-0410-b5e6-96231b3b80d8
2005-06-27 23:59:51 +00:00
Andrew Lenharth
f4b3278aeb Adapt the code for handling uint -> fp conversion for the 32 bit case to
handling it in the 64 bit case.  The two code paths should probably be merged.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22302 91177308-0d34-0410-b5e6-96231b3b80d8
2005-06-27 23:28:32 +00:00
Andrew Lenharth
6968bff783 So, it turns out I forgot that one valid way of restoring GP after a call
is to use RA, which assumes the called function uses RA for the register
holding the return address when it issues a ret.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22301 91177308-0d34-0410-b5e6-96231b3b80d8
2005-06-27 23:24:11 +00:00
Nate Begeman
f1702ac589 Initial set of .td file changes necessary to get scalar fp in xmm registers
working.  The instruction selector changes will hopefully be coming later
this week once they are debugged.  This is necessary to support the darwin
x86 FP model, and is recommended by intel as the replacement for x87.  As
a bonus, the register allocator knows how to deal with these registers
across basic blocks, unliky the FP stackifier.  This leads to significantly
better codegen in several cases.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22300 91177308-0d34-0410-b5e6-96231b3b80d8
2005-06-27 21:20:31 +00:00
Andrew Lenharth
c95d984f7c get rid of another pseudo op
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22299 91177308-0d34-0410-b5e6-96231b3b80d8
2005-06-27 21:11:40 +00:00
Andrew Lenharth
02c318e1d2 generate address of constant pool entries
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22298 91177308-0d34-0410-b5e6-96231b3b80d8
2005-06-27 21:02:56 +00:00
Andrew Lenharth
d4653b1852 Misha happification patch
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22297 91177308-0d34-0410-b5e6-96231b3b80d8
2005-06-27 17:39:17 +00:00
Andrew Lenharth
fe895e3d87 Reduce use of pseudo ops
Namely, output the rellocation flags explicitly when loading constants.
Added benifit: save a load when loading from the constant pool.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22296 91177308-0d34-0410-b5e6-96231b3b80d8
2005-06-27 17:15:36 +00:00
Andrew Lenharth
b72bcbb42b missed a load
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22295 91177308-0d34-0410-b5e6-96231b3b80d8
2005-06-27 16:40:26 +00:00
Andrew Lenharth
98f0eee406 make constant pool labels local
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22294 91177308-0d34-0410-b5e6-96231b3b80d8
2005-06-27 16:29:54 +00:00
Andrew Lenharth
3b91807da7 who said we had to use the return address in the return address register. Might save a move in many cases
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22293 91177308-0d34-0410-b5e6-96231b3b80d8
2005-06-27 15:36:48 +00:00
Chris Lattner
07a9144efe Add support to the X86 backend for emitting ELF files. To use this, we
currently use: llc t.bc --filetype=obj

This will produce a t.o file which is dumpable with readelf.  Currently
the file produced is empty, but the scaffolding to do more is now in place.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22292 91177308-0d34-0410-b5e6-96231b3b80d8
2005-06-27 06:30:12 +00:00
Chris Lattner
35f0a4f24e iniital checkin of ELFWriter implementation
For now, the elf writer is only capable of emitting an empty elf file, with
a section table and a section table string table.  This will be enhanced
in the future :)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22291 91177308-0d34-0410-b5e6-96231b3b80d8
2005-06-27 06:29:00 +00:00
Andrew Lenharth
694c29831a depend more on legalize putting constants on the RHS
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22289 91177308-0d34-0410-b5e6-96231b3b80d8
2005-06-26 23:01:11 +00:00
Andrew Lenharth
ec151361ba With setOperationAction(ISD::UINT_TO_FP, MVT::i64, Expand), Legalize
should be able to handle this case.  The code is there, so let's see
if it works.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22288 91177308-0d34-0410-b5e6-96231b3b80d8
2005-06-26 22:23:06 +00:00
Chris Lattner
0431c96cec Refactor the addPassesToEmitAssembly interface into a addPassesToEmitFile
interface.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22282 91177308-0d34-0410-b5e6-96231b3b80d8
2005-06-25 02:48:37 +00:00
Chris Lattner
548021f411 Fix grammar
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22279 91177308-0d34-0410-b5e6-96231b3b80d8
2005-06-24 18:00:40 +00:00
Chris Lattner
543a02704e add a debug type
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22277 91177308-0d34-0410-b5e6-96231b3b80d8
2005-06-24 16:00:46 +00:00
Andrew Lenharth
3f5aa1cd8c remove a pseudo instruction, make ret always right, and fix vararg chains
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22276 91177308-0d34-0410-b5e6-96231b3b80d8
2005-06-23 23:42:05 +00:00
Andrew Lenharth
a9e39e28b7 finally, Working varargs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22275 91177308-0d34-0410-b5e6-96231b3b80d8
2005-06-23 16:48:51 +00:00
Andrew Lenharth
cdf233d55d more complete Lowering for vacopy and vaarg
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22274 91177308-0d34-0410-b5e6-96231b3b80d8
2005-06-22 23:04:28 +00:00
Andrew Lenharth
213e557cef If we support structs as va_list, we must pass pointers to them to va_copy
See last commit for LangRef, this implements it on all targets.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22273 91177308-0d34-0410-b5e6-96231b3b80d8
2005-06-22 21:04:42 +00:00
Andrew Lenharth
b69f342b0e Make it easier to find alpha stuff in doxygen, and fixup labeling
of memory instructions in the assembly, to allow later linking
of traces with LLVM Value*s.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22271 91177308-0d34-0410-b5e6-96231b3b80d8
2005-06-22 17:19:45 +00:00
John Criswell
57c24508d3 Fixed indentation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22270 91177308-0d34-0410-b5e6-96231b3b80d8
2005-06-20 19:59:22 +00:00
Andrew Lenharth
31c98bfb85 because some functions just use va_start and pass things to vfprintf
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22269 91177308-0d34-0410-b5e6-96231b3b80d8
2005-06-20 15:41:37 +00:00
Andrew Lenharth
c826aea982 the correct fix was to fix AliasAnalysis.getModRefInfo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22268 91177308-0d34-0410-b5e6-96231b3b80d8
2005-06-20 15:25:22 +00:00
Andrew Lenharth
e3e1739b7d prevent GCSE from forwarding stores to loads around vaarg. This is uggly, and I am trying to fix the AliasInfo, as it should catch the problem instead.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22266 91177308-0d34-0410-b5e6-96231b3b80d8
2005-06-20 15:02:05 +00:00
Andrew Lenharth
38b5807bd9 prevent va_arg from being hoisted from a loop
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22265 91177308-0d34-0410-b5e6-96231b3b80d8
2005-06-20 13:36:33 +00:00
Andrew Lenharth
94cd87f658 prevent DCE of vaarg intrinsics. This should take care of most regressions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22263 91177308-0d34-0410-b5e6-96231b3b80d8
2005-06-19 14:41:20 +00:00
Andrew Lenharth
017fba9d0f va_end fix
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22262 91177308-0d34-0410-b5e6-96231b3b80d8
2005-06-19 14:04:55 +00:00
Andrew Lenharth
08b06dc956 so this doesn't crash when run. It is hard to tell if things are right enough to work correctly with all the TmpInstructions running around
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22261 91177308-0d34-0410-b5e6-96231b3b80d8
2005-06-19 05:45:00 +00:00
Andrew Lenharth
e78f50deea add a check for the mixing of vaarg and vanext with va_arg
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22260 91177308-0d34-0410-b5e6-96231b3b80d8
2005-06-19 03:53:56 +00:00
Andrew Lenharth
5fb7f20469 OK, at least get rid of old stuff, and mark what needs to be fixed for V9
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22255 91177308-0d34-0410-b5e6-96231b3b80d8
2005-06-18 18:46:40 +00:00
Andrew Lenharth
558bc88a00 core changes for varargs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22254 91177308-0d34-0410-b5e6-96231b3b80d8
2005-06-18 18:34:52 +00:00
Reid Spencer
134d2e4af8 Fix a problem with the strcmp optimization checking the wrong string and
not casting to the correct type.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22250 91177308-0d34-0410-b5e6-96231b3b80d8
2005-06-18 17:46:28 +00:00
Reid Spencer
4b828e6384 Clean up some uninitialized variables and missing return statements that
GCC 4.0.0 compiler (sometimes incorrectly) warns about under release build.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22249 91177308-0d34-0410-b5e6-96231b3b80d8
2005-06-18 17:37:34 +00:00
Andrew Lenharth
72b16d820c A start at a Sparc V8 Pattern ISel. Anyone want to implement the calling
convention? ;)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22247 91177308-0d34-0410-b5e6-96231b3b80d8
2005-06-17 16:52:12 +00:00
Chris Lattner
b157f858a2 silence incredibly braindead GCC 4 warning
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22246 91177308-0d34-0410-b5e6-96231b3b80d8
2005-06-17 13:44:07 +00:00
Chris Lattner
9cb2d6167d silence a bogus warning
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22245 91177308-0d34-0410-b5e6-96231b3b80d8
2005-06-17 13:23:32 +00:00
Tanya Lattner
60b62aa046 Removed IIIi specific changes. This should be fixed to add floating point deps for the IIi.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22243 91177308-0d34-0410-b5e6-96231b3b80d8
2005-06-17 04:21:09 +00:00
Tanya Lattner
d70cee2d5a Special dep graph for SMS for superblocks.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22242 91177308-0d34-0410-b5e6-96231b3b80d8
2005-06-17 04:16:14 +00:00
Tanya Lattner
747e053cba Special versions of the dep graph and scheduled for SMS for superblocks.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22241 91177308-0d34-0410-b5e6-96231b3b80d8
2005-06-17 04:15:43 +00:00
Tanya Lattner
8352e23d11 Added statistic to count number of spills.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22240 91177308-0d34-0410-b5e6-96231b3b80d8
2005-06-17 04:01:34 +00:00
Tanya Lattner
d454a973a5 Numerous bug fixes and the completed modschedSB algorithm (minor bugs still exist for course).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22239 91177308-0d34-0410-b5e6-96231b3b80d8
2005-06-17 04:00:57 +00:00
Tanya Lattner
770e991bc4 Added SMS for superblocks as an option (experimental)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22238 91177308-0d34-0410-b5e6-96231b3b80d8
2005-06-17 04:00:22 +00:00
Chris Lattner
e88b7533be This is not true: (X != 13 | X < 15) -> X < 15
It is actually always true.  This fixes PR586 and
Transforms/InstCombine/2005-06-16-SetCCOrSetCCMiscompile.ll


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22236 91177308-0d34-0410-b5e6-96231b3b80d8
2005-06-17 03:59:17 +00:00
Chris Lattner
5662503afd Don't crash when dealing with INTMIN. This fixes PR585 and
Transforms/InstCombine/2005-06-16-RangeCrash.ll


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22234 91177308-0d34-0410-b5e6-96231b3b80d8
2005-06-17 02:05:55 +00:00
Chris Lattner
0289929c62 Don't crash on: X = phi (X, X).
This fixes PR584 and Transforms/SimplifyCFG/2005-06-16-PHICrash.ll


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22232 91177308-0d34-0410-b5e6-96231b3b80d8
2005-06-17 01:45:53 +00:00
Chris Lattner
d7e31cfaae avoid constructing out of range shift amounts.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22230 91177308-0d34-0410-b5e6-96231b3b80d8
2005-06-17 01:29:28 +00:00
Nate Begeman
41aaf7016e Fix bug 537 test 2, which checks to make sure that we fold A+(B-A) -> B for
integer types.  Add a couple checks to not perform these kinds of transform
on floating point values.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22228 91177308-0d34-0410-b5e6-96231b3b80d8
2005-06-16 07:06:03 +00:00