Andrew Lenharth
9dc5d846ee
depend more on legalize putting constants on the RHS
...
llvm-svn: 22289
2005-06-26 23:01:11 +00:00
Andrew Lenharth
91bc570aac
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.
llvm-svn: 22288
2005-06-26 22:23:06 +00:00
Chris Lattner
06282f51cf
Refactor the addPassesToEmitAssembly interface into a addPassesToEmitFile
...
interface.
llvm-svn: 22282
2005-06-25 02:48:37 +00:00
Chris Lattner
6f3c7b46ee
Fix grammar
...
llvm-svn: 22279
2005-06-24 18:00:40 +00:00
Chris Lattner
eb08628106
add a debug type
...
llvm-svn: 22277
2005-06-24 16:00:46 +00:00
Andrew Lenharth
17f46306d6
remove a pseudo instruction, make ret always right, and fix vararg chains
...
llvm-svn: 22276
2005-06-23 23:42:05 +00:00
Andrew Lenharth
51d9d1b763
finally, Working varargs
...
llvm-svn: 22275
2005-06-23 16:48:51 +00:00
Andrew Lenharth
eda77c60a0
more complete Lowering for vacopy and vaarg
...
llvm-svn: 22274
2005-06-22 23:04:28 +00:00
Andrew Lenharth
4fd2bde906
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.
llvm-svn: 22273
2005-06-22 21:04:42 +00:00
Andrew Lenharth
e54b651806
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.
llvm-svn: 22271
2005-06-22 17:19:45 +00:00
John Criswell
00c8485c77
Fixed indentation.
...
llvm-svn: 22270
2005-06-20 19:59:22 +00:00
Andrew Lenharth
ce6f907ffe
because some functions just use va_start and pass things to vfprintf
...
llvm-svn: 22269
2005-06-20 15:41:37 +00:00
Andrew Lenharth
4e1c8055ea
the correct fix was to fix AliasAnalysis.getModRefInfo
...
llvm-svn: 22268
2005-06-20 15:25:22 +00:00
Andrew Lenharth
262b657737
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.
...
llvm-svn: 22266
2005-06-20 15:02:05 +00:00
Andrew Lenharth
08ff634c2b
prevent va_arg from being hoisted from a loop
...
llvm-svn: 22265
2005-06-20 13:36:33 +00:00
Andrew Lenharth
cdaaa66e7d
prevent DCE of vaarg intrinsics. This should take care of most regressions
...
llvm-svn: 22263
2005-06-19 14:41:20 +00:00
Andrew Lenharth
231216b573
va_end fix
...
llvm-svn: 22262
2005-06-19 14:04:55 +00:00
Andrew Lenharth
4a1dc74471
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
...
llvm-svn: 22261
2005-06-19 05:45:00 +00:00
Andrew Lenharth
6bbe9d92c6
add a check for the mixing of vaarg and vanext with va_arg
...
llvm-svn: 22260
2005-06-19 03:53:56 +00:00
Andrew Lenharth
5750531305
OK, at least get rid of old stuff, and mark what needs to be fixed for V9
...
llvm-svn: 22255
2005-06-18 18:46:40 +00:00
Andrew Lenharth
a9214fec08
core changes for varargs
...
llvm-svn: 22254
2005-06-18 18:34:52 +00:00
Reid Spencer
a6012f9023
Fix a problem with the strcmp optimization checking the wrong string and
...
not casting to the correct type.
llvm-svn: 22250
2005-06-18 17:46:28 +00:00
Reid Spencer
678c9a3b00
Clean up some uninitialized variables and missing return statements that
...
GCC 4.0.0 compiler (sometimes incorrectly) warns about under release build.
llvm-svn: 22249
2005-06-18 17:37:34 +00:00
Andrew Lenharth
0bb2dab54a
A start at a Sparc V8 Pattern ISel. Anyone want to implement the calling
...
convention? ;)
llvm-svn: 22247
2005-06-17 16:52:12 +00:00
Chris Lattner
70914ca850
silence incredibly braindead GCC 4 warning
...
llvm-svn: 22246
2005-06-17 13:44:07 +00:00
Chris Lattner
dce633f2dd
silence a bogus warning
...
llvm-svn: 22245
2005-06-17 13:23:32 +00:00
Tanya Lattner
2114488760
Removed IIIi specific changes. This should be fixed to add floating point deps for the IIi.
...
llvm-svn: 22243
2005-06-17 04:21:09 +00:00
Tanya Lattner
c6760c1661
Special dep graph for SMS for superblocks.
...
llvm-svn: 22242
2005-06-17 04:16:14 +00:00
Tanya Lattner
7b1d09e9b2
Special versions of the dep graph and scheduled for SMS for superblocks.
...
llvm-svn: 22241
2005-06-17 04:15:43 +00:00
Tanya Lattner
6d38454b14
Added statistic to count number of spills.
...
llvm-svn: 22240
2005-06-17 04:01:34 +00:00
Tanya Lattner
3d6e51fdac
Numerous bug fixes and the completed modschedSB algorithm (minor bugs still exist for course).
...
llvm-svn: 22239
2005-06-17 04:00:57 +00:00
Tanya Lattner
df10cee694
Added SMS for superblocks as an option (experimental)
...
llvm-svn: 22238
2005-06-17 04:00:22 +00:00
Chris Lattner
11bbeace0c
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
llvm-svn: 22236
2005-06-17 03:59:17 +00:00
Chris Lattner
01a5794292
Don't crash when dealing with INTMIN. This fixes PR585 and
...
Transforms/InstCombine/2005-06-16-RangeCrash.ll
llvm-svn: 22234
2005-06-17 02:05:55 +00:00
Chris Lattner
8c76d5c957
Don't crash on: X = phi (X, X).
...
This fixes PR584 and Transforms/SimplifyCFG/2005-06-16-PHICrash.ll
llvm-svn: 22232
2005-06-17 01:45:53 +00:00
Chris Lattner
226f919ead
avoid constructing out of range shift amounts.
...
llvm-svn: 22230
2005-06-17 01:29:28 +00:00
Nate Begeman
ed49a51836
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.
llvm-svn: 22228
2005-06-16 07:06:03 +00:00
Chris Lattner
f95b989825
Fix PR583 and testcase Transforms/InstCombine/2005-06-15-DivSelectCrash.ll
...
llvm-svn: 22227
2005-06-16 04:55:52 +00:00
Chris Lattner
4af04a8d54
Fix PR571, removing code that does just the WRONG thing :)
...
llvm-svn: 22225
2005-06-16 03:00:08 +00:00
Chris Lattner
b99bf21182
Fix a bug in my previous patch. Do not get the shift amount type (which
...
is always ubyte, get the type being shifted). This unbreaks espresso
llvm-svn: 22224
2005-06-16 01:52:07 +00:00
Chris Lattner
4cff3f786f
Fix PR575, patch provided by John Mellor-Crummey. Thanks!
...
llvm-svn: 22223
2005-06-15 22:49:30 +00:00
Chris Lattner
f1369e9532
Fix PR582. The rewriter can move casts around, which invalidated the
...
BB iterator. This fixes Transforms/IndVarsSimplify/2005-06-15-InstMoveCrash.ll
llvm-svn: 22221
2005-06-15 21:29:31 +00:00
Chris Lattner
369ba5da69
Do not promote globals only used by main to locals if there are constantexprs
...
or other uses hanging off of them.
llvm-svn: 22219
2005-06-15 21:11:48 +00:00
Chris Lattner
d553048155
Fix PR577 and testcase InstCombine/2005-06-15-ShiftSetCCCrash.ll.
...
Do not perform undefined out of range shifts.
llvm-svn: 22217
2005-06-15 20:53:31 +00:00
Reid Spencer
3a30fa7ec0
Put the hack back in that removes features, causes regressions to fail, but
...
allows test programs to succeed. Actual fix for this is forthcoming.
llvm-svn: 22213
2005-06-15 18:25:30 +00:00
Nate Begeman
12cd2d8d99
Commit fix for generating conditional branch pseudo instructions that
...
avoids dereferencing the end() iterator when selecting the fallthrough
block. This requires an ilist change.
llvm-svn: 22212
2005-06-15 18:22:43 +00:00
Nate Begeman
9bb1be2eec
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.
llvm-svn: 22210
2005-06-14 03:55:23 +00:00
Reid Spencer
202eb6ff93
Unbreak several InstCombine regression checks introduced by a hack to
...
fix the bzip2 test. A better hack is needed.
llvm-svn: 22209
2005-06-13 06:41:26 +00:00
Nate Begeman
a2f68cf0f9
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.
llvm-svn: 22208
2005-06-12 23:52:58 +00:00
Nate Begeman
f516b866e5
Fix a memory smasher caught by Mac OS X's debug malloc library. We were
...
incorrectly using an iterator after it was invalid.
llvm-svn: 22207
2005-06-12 23:50:33 +00:00
Chris Lattner
9d3c2260d0
Fix a 64-bit problem, passing (int)0 through ... instead of (void*)0
...
llvm-svn: 22206
2005-06-09 03:32:54 +00:00
Chris Lattner
092a738e18
Fix a problem on 64-bit targets where we passed (int)0 through ... instead of
...
(void*)0.
llvm-svn: 22205
2005-06-09 02:59:00 +00:00
Andrew Lenharth
ec1d1444bd
fix BranchCC with a setCC with an arg of 0
...
llvm-svn: 22203
2005-06-08 18:02:21 +00:00
Reid Spencer
a88b91d681
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.
llvm-svn: 22202
2005-06-08 17:44:48 +00:00
Nate Begeman
47cd13d42a
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
llvm-svn: 22201
2005-06-08 04:14:27 +00:00
Nate Begeman
023a21ea32
Fix lli linking on Mac OS X 10.4.1 for Intel.
...
llvm-svn: 22200
2005-06-08 01:02:38 +00:00
Andrew Lenharth
e6b85af482
Remove code for conversion from old style va_args. Preparing the way for
...
returning to the old style :)
llvm-svn: 22199
2005-06-08 00:49:08 +00:00
Misha Brukman
49f75fc763
Fix spelling of `correlate'
...
llvm-svn: 22196
2005-06-06 19:08:04 +00:00
Andrew Lenharth
03f6e6dbb6
allow marking of loads and stores in the instruction stream with enough information to reconstruct the Value* if it existed
...
llvm-svn: 22195
2005-06-06 19:03:55 +00:00
Andrew Lenharth
7ae4989a1f
hide basic block labels. The utility of these for debuging is long since passed
...
llvm-svn: 22194
2005-06-06 19:03:09 +00:00
Misha Brukman
c1841dd82f
* Replace block of commented-out lines with #if 0
...
* Remove warning "control reaches end of non-void function"
llvm-svn: 22193
2005-06-06 17:39:46 +00:00
Andrew Lenharth
e68b566084
hack to fix bzip2 (bug 571)
...
llvm-svn: 22192
2005-06-04 12:43:56 +00:00
Reid Spencer
966f750ad2
Make sure that Cygwin assembly includes _ as part of function names.
...
llvm-svn: 22190
2005-06-02 21:33:19 +00:00
Reid Spencer
2d5d7084ba
Put in a hack for Cygwin that prevents mkdtemp from being used since
...
configure seems to find it on Cygwin but linking against it fails.
llvm-svn: 22189
2005-06-02 05:38:20 +00:00
Andrew Lenharth
d8c567af19
try custom expanders, doesn't seem to expand yet, so disabled
...
llvm-svn: 22188
2005-05-31 19:49:34 +00:00
Andrew Lenharth
ca6fa6fac6
switch to the new live in thing. Really, this time it works
...
llvm-svn: 22187
2005-05-31 18:42:18 +00:00
Andrew Lenharth
0cac09ef6c
switch to the new live in thing
...
llvm-svn: 22186
2005-05-31 18:37:16 +00:00
Andrew Lenharth
083ba1ead1
switch to the new live in thing
...
llvm-svn: 22185
2005-05-31 18:35:43 +00:00
Andrew Lenharth
8fec24bb7d
match gcc, makes diff easier
...
llvm-svn: 22179
2005-05-27 03:39:30 +00:00
Andrew Lenharth
4062a79a81
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.
llvm-svn: 22177
2005-05-26 18:18:34 +00:00
Reid Spencer
59580db70f
Make the registration hash_map static. No other module needs it. Also,
...
document what its for a little better.
llvm-svn: 22164
2005-05-21 01:27:04 +00:00
Reid Spencer
6c0f6b6458
Adjust the file comment to read a little easier.
...
llvm-svn: 22163
2005-05-21 00:57:44 +00:00
Reid Spencer
5161c39bfe
Make sure ... arguments are casted to sbyte* where needed.
...
llvm-svn: 22162
2005-05-21 00:39:30 +00:00
Reid Spencer
0a43070283
Add a "brief" comment for CastToCStr
...
llvm-svn: 22161
2005-05-21 00:23:23 +00:00
Chris Lattner
d7d4a57a4f
Fix mismatched type problem that crashed on cases like this:
...
sprintf(P, "%s", X);
Where X is not an sbyte*. This fixes the bug JohnMC reported on llvm-bugs.
llvm-svn: 22159
2005-05-20 22:22:25 +00:00
Chris Lattner
b13335fff2
Fix Transforms/SimplifyCFG/switch-simplify-crash.ll
...
llvm-svn: 22158
2005-05-20 22:19:54 +00:00
Nate Begeman
f6e0f54d70
C'mon everybody, let's modify X86JITInfo.cpp. This time, we add <iostream>
...
so that the shiny new use of std::cerr is defined.
llvm-svn: 22156
2005-05-20 21:29:24 +00:00
Misha Brukman
48ca8224da
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)
llvm-svn: 22154
2005-05-20 19:46:50 +00:00
Chris Lattner
f1479ae390
Fix this a 3rd time :)
...
llvm-svn: 22151
2005-05-20 17:00:21 +00:00
Andrew Lenharth
46b9d601f5
fix compilation error due to no abort being defined. There is probably a better way to do this
...
llvm-svn: 22150
2005-05-20 16:34:44 +00:00
Duraid Madina
44ac7502fd
re-enable direct calls, this should just be a performance boost
...
llvm-svn: 22148
2005-05-20 11:39:17 +00:00
Duraid Madina
c043395fe8
this seems dead (and broke the ia64 build, so..)
...
llvm-svn: 22147
2005-05-20 06:21:59 +00:00
Chris Lattner
993038773b
Give the asmparser the ability to parse strings. Patch contributed by
...
Alexander Friedman
llvm-svn: 22146
2005-05-20 03:25:47 +00:00
Jeff Cohen
a0f463a25c
Fix tail call support in VC++ builds
...
llvm-svn: 22143
2005-05-20 01:35:39 +00:00
Chris Lattner
c1d9b43fc1
Fastcc passes arguments in EAX and EDX, make sure the JIT doesn't clobber them
...
llvm-svn: 22137
2005-05-19 06:49:17 +00:00
Chris Lattner
6dcae1c96e
Tailcalls require stubs to be emitted. Otherwise, the compilation callback
...
doesn't know who 'called' it.
llvm-svn: 22136
2005-05-19 05:54:33 +00:00
Misha Brukman
49fe7aa1d6
Wrap long lines
...
llvm-svn: 22125
2005-05-18 20:37:33 +00:00
Chris Lattner
df9c75fb12
teach the inliner about coldcc and noreturn functions
...
llvm-svn: 22113
2005-05-18 04:30:33 +00:00
Duraid Madina
0cc90e2e4a
comment the hpux bit
...
llvm-svn: 22081
2005-05-16 06:59:53 +00:00
Duraid Madina
7391051c20
HP-UX system headers make a mess of isinf(), so much so that gcc fixincludes
...
can't patch it up for c++ (works in C though)
llvm-svn: 22079
2005-05-16 06:45:57 +00:00
Reid Spencer
720fbd937a
Don't look for __builtin_ffs, we'll never see it from llvm-gcc and there's
...
not reason to include it for other front ends.
llvm-svn: 22070
2005-05-15 21:27:34 +00:00
Reid Spencer
58ad53e9d3
Provide this optimization as well:
...
ffs(x) -> (x == 0 ? 0 : 1+llvm.cttz(x))
llvm-svn: 22068
2005-05-15 21:19:45 +00:00
Chris Lattner
0366a913ad
PPC "branch and link" instructions are branches in the PPC sense, but not
...
in the LLVM code generator sense (they are calls). Don't mark them as such,
which fixes the regressions on the ppc tester last night
llvm-svn: 22065
2005-05-15 20:11:44 +00:00
Chris Lattner
9fc81f1162
Fix andrews changes to fit in 80 columns
...
llvm-svn: 22064
2005-05-15 19:54:37 +00:00
Reid Spencer
24104523b5
Duh .. you actually have to #include Config/config.h before you can test
...
for one of the values that it defines!
llvm-svn: 22058
2005-05-15 17:20:47 +00:00
Reid Spencer
ba222e3e99
Some cleanups for compilation with GCC 4.0.0 to remove warnings:
...
* Use C++ style casts, not C style casts
* Abstract base classes should have virtual destructor.
llvm-svn: 22057
2005-05-15 16:13:11 +00:00
Duraid Madina
03a7327d63
make angry compilers happy again
...
llvm-svn: 22054
2005-05-15 14:44:13 +00:00
Duraid Madina
f4ca48c89e
aCC and STLport complained about this, because they're like that
...
llvm-svn: 22053
2005-05-15 13:05:48 +00:00
Chris Lattner
95650a26b2
don't reserve space for tailcall arg areas. It explicitly managed.
...
llvm-svn: 22050
2005-05-15 06:07:10 +00:00
Chris Lattner
2fd2e53f6a
Teach reginfo how to deal with ADJSTACKPTRri, allowing us to generate:
...
add %ESP, 20
jmp %EDX # TAIL CALL
instead of:
add %ESP, -8
add %ESP, 28
jmp %EDX # TAIL CALL
llvm-svn: 22047
2005-05-15 05:49:58 +00:00