Misha Brukman
ea548c0cb1
Remove trailing whitespace, patch by Markus Oberhumer.
...
llvm-svn: 21379
2005-04-20 16:05:03 +00:00
Chris Lattner
484bfc4d26
Fix the 3 regressions last night, due to my buggy patch from yesterday.
...
llvm-svn: 20689
2005-03-19 17:35:11 +00:00
Chris Lattner
bed9657ff6
remove use of getPrev() and getNext() on ilist nodes.
...
llvm-svn: 20673
2005-03-18 16:12:37 +00:00
Chris Lattner
fb972add4f
stop using arg_front
...
llvm-svn: 20599
2005-03-15 05:03:36 +00:00
Chris Lattner
31c8a9d41a
stop using arg_back
...
llvm-svn: 20598
2005-03-15 04:59:17 +00:00
Chris Lattner
531f9e92d4
This mega patch converts us from using Function::a{iterator|begin|end} to
...
using Function::arg_{iterator|begin|end}. Likewise Module::g* -> Module::global_*.
This patch is contributed by Gabor Greif, thanks!
llvm-svn: 20597
2005-03-15 04:54:21 +00:00
Chris Lattner
ea50620eec
Make sure to remove all dead type names from the symbol table, not just
...
struct types. This fixes Regression/CodeGen/CBackend/2005-03-08-RecursiveTypeCrash.ll,
a crash on Java output that Alkis reported.
llvm-svn: 20519
2005-03-08 16:19:59 +00:00
Misha Brukman
20238eb963
Single characters should be printed out as chars, not strings.
...
llvm-svn: 20515
2005-03-08 00:26:08 +00:00
Chris Lattner
c9b0984666
simplify some code.
...
llvm-svn: 20471
2005-03-06 02:28:23 +00:00
Chris Lattner
00ee68c612
Print -X like this:
...
double test(double l1_X) {
return (-l1_X);
}
instead of like this:
double test(double l1_X) {
return (-0x0p+0 - l1_X);
}
llvm-svn: 20423
2005-03-03 21:12:04 +00:00
Chris Lattner
1a678c67c9
Do not lower malloc's to pass "sizeof" expressions like this:
...
ltmp_0_7 = malloc(((unsigned )(&(((signed char (*)[784])/*NULL*/0)[1u]))));
Instead, just emit the literal constant, like this:
ltmp_0_7 = malloc(784u);
This works around a bug in ICC 8.1 compiling the CBE generated code. :-(
llvm-svn: 20415
2005-03-03 01:04:50 +00:00
Chris Lattner
12328e9378
Remove tabs from file.
...
llvm-svn: 20380
2005-02-28 19:36:15 +00:00
Chris Lattner
811107350a
Add support to the C backend for llvm.prefetch. Patch contributed by
...
Justin Wick!
llvm-svn: 20378
2005-02-28 19:29:46 +00:00
Chris Lattner
3bef66fcf3
Fix volatile load/store of pointers. Consider this testcase:
...
void %test(int** %P) {
%A = volatile load int** %P
ret void
}
void %test2(int*** %Q) {
%P = load int*** %Q
volatile store int** %P, int*** %Q
ret void
}
instead of emitting:
void test(int **l1_P) {
int *l2_A;
l2_A = (int **((volatile int **)l1_P));
return;
}
void test2(int ***l2_Q) {
int **l1_P;
l1_P = *l2_Q;
*((volatile int ***)l2_Q) = l1_P;
return;
}
... which is loading/storing volatile pointers, not through volatile pointers,
emit this (which is right):
void test(int **l1_P) {
int *l3_A;
l3_A = *((int * volatile*)l1_P);
return;
}
void test2(int ***l2_Q) {
int **l1_P;
l1_P = *l2_Q;
*((int ** volatile*)l2_Q) = l1_P;
return;
}
llvm-svn: 20191
2005-02-15 05:52:14 +00:00
Misha Brukman
2b1e10031f
Write out single characters as chars, not strings.
...
llvm-svn: 20179
2005-02-14 18:52:35 +00:00
Chris Lattner
7afbdcad15
Implement CodeGen/CBackend/2005-02-14-VolatileOperations.ll
...
Volatile loads and stores need to emit volatile pointer operations in C.
llvm-svn: 20177
2005-02-14 16:47:52 +00:00
Misha Brukman
8dfa2e4465
Fix hyphenation in output comment
...
llvm-svn: 19954
2005-01-31 06:19:57 +00:00
Reid Spencer
d5d45b8d1a
Fix alloca support for Cygwin. On cygwin its __alloca not __builtin_alloca
...
llvm-svn: 19776
2005-01-23 04:32:47 +00:00
Jeff Cohen
b56965be08
Fix CBE code so that it compiles with VC++.
...
llvm-svn: 19303
2005-01-06 04:21:49 +00:00
Chris Lattner
93feeb18f1
Fix PR490
...
Fix testcase CodeGen/CBackend/2004-12-28-LogicalConstantExprs.ll
llvm-svn: 19176
2004-12-29 04:00:09 +00:00
Chris Lattner
298a7f8d8b
Fix PR485, instead of emitting zero sized arrays, emit arrays of size 1.
...
llvm-svn: 18974
2004-12-15 23:13:15 +00:00
Chris Lattner
b3b1c279a2
When generating code for X86 targets, make sure the fp control word is set
...
to 64-bit precision, not 80 bits.
llvm-svn: 18915
2004-12-13 21:52:52 +00:00
Brian Gaeke
81c7fd2fce
Emit correct prototype for __builtin_alloca on V8.
...
llvm-svn: 18745
2004-12-10 05:44:45 +00:00
Chris Lattner
f878f75d46
Move lower intrinsics before FP constant emission, in case
...
intrinsic lowering ever introduces constants.
Rename local symbols before printing function bodies, fixing 255.vortex
with the CBE!!!
llvm-svn: 18534
2004-12-05 06:49:44 +00:00
Chris Lattner
26d9c22832
Fix test/Regression/CodeGen/CBackend/2004-12-03-ExternStatics.ll and
...
PR472
llvm-svn: 18459
2004-12-03 17:19:10 +00:00
John Criswell
335c342440
Reverting revision 1.209.
...
Including alloca.h on Solaris brings in the prototype of strftime(), which
breaks compilation of CBE generated code.
llvm-svn: 18435
2004-12-02 19:02:49 +00:00
Chris Lattner
798e0349c0
Do not let GCC emit a warning for INT64_MIN
...
llvm-svn: 18398
2004-11-30 21:33:58 +00:00
Brian Gaeke
86deaf2211
Sparcs behave better if we use <alloca.h> and avoid messing with __builtin_alloca.
...
llvm-svn: 18397
2004-11-30 21:27:01 +00:00
Chris Lattner
073f6ca344
Hack around stupidity in GCC, fixing Burg with the CBE and
...
CBackend/2004-11-13-FunctionPointerCast.llx
llvm-svn: 17710
2004-11-13 22:21:56 +00:00
John Criswell
7eeed938bf
Removed dead method, printPHICopiesForSuccessors().
...
llvm-svn: 17216
2004-10-25 18:41:50 +00:00
John Criswell
a564e9e0ba
Modified switch generation so that only the phi values associated with the
...
destination basic block are copied.
llvm-svn: 17212
2004-10-25 18:30:09 +00:00
John Criswell
85b380582e
Small performance improvement in generated C code:
...
Instead of unconditionally copying all phi node values into temporaries for
all successor blocks, generate code that will determine what successor
block will be called and then copy only those phi node values needed by
the successor block.
This seems to cut down namd execution time from being 8% higher than GCC to
4% higher than GCC.
llvm-svn: 17144
2004-10-20 14:38:39 +00:00
Chris Lattner
53058663aa
Print a semicolon for the unreacahble instruction. This fixes problems
...
where C requires semicolons in some cases to indicate null statements.
llvm-svn: 17107
2004-10-17 23:49:11 +00:00
Chris Lattner
621c413a1b
The first hunk corrects a bug when printing undef null values. We would print
...
0->field, which is illegal. Now we print ((foo*)0)->field.
The second hunk is an optimization to not print undefined phi values.
llvm-svn: 17094
2004-10-17 17:48:59 +00:00
Chris Lattner
583dfdcf86
Add support for unreachable and undef
...
llvm-svn: 17048
2004-10-16 18:12:13 +00:00
Chris Lattner
58043a1473
Fix a warning that is emitted on the suns
...
llvm-svn: 16917
2004-10-11 15:50:40 +00:00
Chris Lattner
e4c60eb704
Really fix FreeBSD, which apparently doesn't tolerate the extern.
...
Thanks to Jeff Cohen for pointing out my goof.
llvm-svn: 16762
2004-10-06 04:21:52 +00:00
Chris Lattner
32ed828f46
FreeBSD uses GCC. Patch contributed by Jeff Cohen!
...
llvm-svn: 16756
2004-10-06 03:15:44 +00:00
Alkis Evlogimenos
3ce42ec7ee
Pull assignment out of for loop conditional in order for this to
...
compile under windows. Patch contributed by Paolo Invernizzi!
llvm-svn: 16534
2004-09-28 02:40:37 +00:00
Chris Lattner
4f2cf030e8
'Pass' should now not be derived from by clients. Instead, they should derive
...
from ModulePass. Instead of implementing Pass::run, then should implement
ModulePass::runOnModule.
llvm-svn: 16436
2004-09-20 04:48:05 +00:00
Reid Spencer
7c16caa336
Changes For Bug 352
...
Move include/Config and include/Support into include/llvm/Config,
include/llvm/ADT and include/llvm/Support. From here on out, all LLVM
public header files must be under include/llvm/.
llvm-svn: 16137
2004-09-01 22:55:40 +00:00
Brian Gaeke
7f00753f70
Previous checkin broke printf(%a) support for fp constants-- re-fix it.
...
llvm-svn: 16051
2004-08-25 19:37:26 +00:00
Brian Gaeke
35eb7aeae3
New version of Bill Wendling's PR33 patch.
...
llvm-svn: 16050
2004-08-25 19:00:42 +00:00
Chris Lattner
1d787355e7
Paper over CBackend/2004-08-09-va-end-null.ll
...
Note that this indicates a serious problem with the way we are emitting varargs,
but this should not be properly fixed until after 1.3.
This patch SHOULD go into 1.3.
llvm-svn: 15602
2004-08-10 00:19:16 +00:00
Chris Lattner
21a015c12f
Temporarily disable this code, as it is emitting LLVM_NAN("nan") which results in a call to the
...
glibc 'nan' function because the initializer is not a string. This breaks when used in a global
initializer. Try compiling this testcase for example:
%X = global float <some nan value>
llvm-svn: 15223
2004-07-25 22:36:35 +00:00
Brian Gaeke
1dde3fa94f
Emit NaNs and INFs bit-identically to the bytecode file, if the system has
...
printf("%a") support.
Patch contributed by Bill Wendling.
llvm-svn: 15056
2004-07-21 03:15:26 +00:00
Reid Spencer
cb3fb5d4f5
bug 122:
...
- Replace ConstantPointerRef usage with GlobalValue usage
llvm-svn: 14953
2004-07-18 00:44:37 +00:00
Chris Lattner
7dc9de5f43
Patches towards fixing PR341
...
llvm-svn: 14841
2004-07-15 02:14:30 +00:00
Misha Brukman
9dacda651f
Apple's MacOS X is another OS which does not provide alloca() via <alloca.h>
...
llvm-svn: 14781
2004-07-12 23:37:18 +00:00
Chris Lattner
2beb4392cf
Delete the allocate*TargetMachine function, which is now dead .
...
llvm-svn: 14755
2004-07-11 04:16:31 +00:00