Commit Graph

3895 Commits

Author SHA1 Message Date
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
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
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
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
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
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
Nate Begeman
439009c81e Commit fix for generating conditional branch pseudo instructions that
avoids dereferencing the end() iterator when selecting the fallthrough
block.  This requires an ilist change.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22212 91177308-0d34-0410-b5e6-96231b3b80d8
2005-06-15 18:22:43 +00:00
Nate Begeman
a43b176f51 Commit a small improvement that is already in the x86 and ia64 backends to
not generate unnecessary register copies.  This improves compile time by
2-5% depending on the test.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22210 91177308-0d34-0410-b5e6-96231b3b80d8
2005-06-14 03:55:23 +00:00
Nate Begeman
244e92eaab When compiled with GCC 4.0, a latent bug was exposed where both SparcV9
and the target independant register allocator were both using a class named
'LiveRange'.  This lead to the target independant code calling code in the
SparcV9 backend, which crashed.  Fixed by renaming SparcV9's LiveRange to
V9LiveRange.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22208 91177308-0d34-0410-b5e6-96231b3b80d8
2005-06-12 23:52:58 +00:00
Nate Begeman
ac609ddf82 Fix a memory smasher caught by Mac OS X's debug malloc library. We were
incorrectly using an iterator after it was invalid.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22207 91177308-0d34-0410-b5e6-96231b3b80d8
2005-06-12 23:50:33 +00:00
Andrew Lenharth
09552bff8d fix BranchCC with a setCC with an arg of 0
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22203 91177308-0d34-0410-b5e6-96231b3b80d8
2005-06-08 18:02:21 +00:00
Reid Spencer
eae435de83 For PR572:
Undefine the PPC symbol which is defined by Linux/PPC (erroneously) so it
doesn't pollute the user namespace and clash with our namespace declarations.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22202 91177308-0d34-0410-b5e6-96231b3b80d8
2005-06-08 17:44:48 +00:00
Nate Begeman
b2c4bf3ff6 Handle some more real world cases of rlwimi. These don't come up that
regularly in "normal" code, but for things like software graphics, they
make a big difference.

For the following code:
unsigned short Trans16Bit(unsigned srcA,unsigned srcB,unsigned alpha)
{
	unsigned tmpA,tmpB,mixed;
	tmpA = ((srcA & 0x03E0) << 15) | (srcA & 0x7C1F);
	tmpB = ((srcB & 0x03E0) << 15) | (srcB & 0x7C1F);
	mixed = (tmpA * alpha) + (tmpB * (32 - alpha));
	return ((mixed >> 5) & 0x7C1F) | ((mixed >> 20) & 0x03E0);
}

We now generate:
_Trans16Bit:
.LBB_Trans16Bit_0:      ; entry
        andi. r2, r4, 31775
        rlwimi r2, r4, 15, 7, 11
        subfic r4, r5, 32
        mullw r2, r2, r4
        andi. r4, r3, 31775
        rlwimi r4, r3, 15, 7, 11
        mullw r3, r4, r5
        add r2, r2, r3
        srwi r3, r2, 5
        andi. r3, r3, 31775
        rlwimi r3, r2, 12, 22, 26
        blr

Instead of:
_Trans16Bit:
.LBB_Trans16Bit_0:      ; entry
        slwi r2, r4, 15
        rlwinm r2, r2, 0, 7, 11
        andi. r4, r4, 31775
        or r2, r2, r4
        subfic r4, r5, 32
        mullw r2, r2, r4
        slwi r4, r3, 15
        rlwinm r4, r4, 0, 7, 11
        andi. r3, r3, 31775
        or r3, r4, r3
        mullw r3, r3, r5
        add r2, r2, r3
        srwi r3, r2, 5
        andi. r3, r3, 31775
        srwi r2, r2, 20
        rlwimi r3, r2, 0, 22, 26
        blr


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22201 91177308-0d34-0410-b5e6-96231b3b80d8
2005-06-08 04:14:27 +00:00
Nate Begeman
6dae3308f5 Fix lli linking on Mac OS X 10.4.1 for Intel.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22200 91177308-0d34-0410-b5e6-96231b3b80d8
2005-06-08 01:02:38 +00:00
Misha Brukman
5e96a3a49f Fix spelling of `correlate'
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22196 91177308-0d34-0410-b5e6-96231b3b80d8
2005-06-06 19:08:04 +00:00
Andrew Lenharth
cd7f8cf70b allow marking of loads and stores in the instruction stream with enough information to reconstruct the Value* if it existed
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22195 91177308-0d34-0410-b5e6-96231b3b80d8
2005-06-06 19:03:55 +00:00
Andrew Lenharth
eee2a881cf hide basic block labels. The utility of these for debuging is long since passed
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22194 91177308-0d34-0410-b5e6-96231b3b80d8
2005-06-06 19:03:09 +00:00
Misha Brukman
b8ee91a80f * Replace block of commented-out lines with #if 0
* Remove warning "control reaches end of non-void function"


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22193 91177308-0d34-0410-b5e6-96231b3b80d8
2005-06-06 17:39:46 +00:00
Reid Spencer
628214eb74 Make sure that Cygwin assembly includes _ as part of function names.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22190 91177308-0d34-0410-b5e6-96231b3b80d8
2005-06-02 21:33:19 +00:00
Andrew Lenharth
e3c8c0a49d try custom expanders, doesn't seem to expand yet, so disabled
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22188 91177308-0d34-0410-b5e6-96231b3b80d8
2005-05-31 19:49:34 +00:00
Andrew Lenharth
591ec57c09 switch to the new live in thing. Really, this time it works
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22187 91177308-0d34-0410-b5e6-96231b3b80d8
2005-05-31 18:42:18 +00:00
Andrew Lenharth
14f30c927d switch to the new live in thing
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22186 91177308-0d34-0410-b5e6-96231b3b80d8
2005-05-31 18:37:16 +00:00
Andrew Lenharth
fd5e4b778f switch to the new live in thing
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22185 91177308-0d34-0410-b5e6-96231b3b80d8
2005-05-31 18:35:43 +00:00
Andrew Lenharth
044f31ffb1 match gcc, makes diff easier
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22179 91177308-0d34-0410-b5e6-96231b3b80d8
2005-05-27 03:39:30 +00:00
Andrew Lenharth
69520ed67a Fix 2005-05-12-Int64ToFP
The issue is there is no unsigned -> double conversion, only signed.  So I
need to test the sign and do a different thing depending on it.  Ideally
this should be in a different BB, but in the mean time, I use a branch
free method.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22177 91177308-0d34-0410-b5e6-96231b3b80d8
2005-05-26 18:18:34 +00:00
Nate Begeman
be13634907 C'mon everybody, let's modify X86JITInfo.cpp. This time, we add <iostream>
so that the shiny new use of std::cerr is defined.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22156 91177308-0d34-0410-b5e6-96231b3b80d8
2005-05-20 21:29:24 +00:00
Misha Brukman
57ebf3d6a8 Since everyone else has "fixed" this file, might as well join in the fun.
* Change assert() to std::cerr printout, as it will not appear in opt builds
* Add comments to clarify what #ifdef/#else/#endif match what condition(s)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22154 91177308-0d34-0410-b5e6-96231b3b80d8
2005-05-20 19:46:50 +00:00
Chris Lattner
170fbcbc63 Fix this a 3rd time :)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22151 91177308-0d34-0410-b5e6-96231b3b80d8
2005-05-20 17:00:21 +00:00
Andrew Lenharth
75a51277d2 fix compilation error due to no abort being defined. There is probably a better way to do this
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22150 91177308-0d34-0410-b5e6-96231b3b80d8
2005-05-20 16:34:44 +00:00
Duraid Madina
04aa46d647 re-enable direct calls, this should just be a performance boost
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22148 91177308-0d34-0410-b5e6-96231b3b80d8
2005-05-20 11:39:17 +00:00
Duraid Madina
732c843f0e this seems dead (and broke the ia64 build, so..)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22147 91177308-0d34-0410-b5e6-96231b3b80d8
2005-05-20 06:21:59 +00:00
Jeff Cohen
8bc6f934e8 Fix tail call support in VC++ builds
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22143 91177308-0d34-0410-b5e6-96231b3b80d8
2005-05-20 01:35:39 +00:00
Chris Lattner
1030f72f8a Fastcc passes arguments in EAX and EDX, make sure the JIT doesn't clobber them
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22137 91177308-0d34-0410-b5e6-96231b3b80d8
2005-05-19 06:49:17 +00:00