Chris Lattner
aba58bd49b
Fix PR618 and Regression/CodeGen/CBackend/2005-08-23-Fmod.ll by not emitting
...
x%y for 'rem' on fp values.
llvm-svn: 22984
2005-08-23 20:22:50 +00:00
Jim Laskey
61e3d7bca5
Culling out use of unions for converting FP to bits and vice versa.
...
llvm-svn: 22838
2005-08-17 19:34:49 +00:00
John Criswell
64f658a2f7
Fixed PR#596:
...
Add parenthesis around the value being negated; that way, if the value
begins with a minus sign (e.g. negative integer), we won't generate a
C predecrement operator by mistake.
llvm-svn: 22437
2005-07-14 19:41:16 +00:00
Chris Lattner
06282f51cf
Refactor the addPassesToEmitAssembly interface into a addPassesToEmitFile
...
interface.
llvm-svn: 22282
2005-06-25 02:48:37 +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
a9214fec08
core changes for varargs
...
llvm-svn: 22254
2005-06-18 18:34:52 +00:00
Chris Lattner
1bc2753d69
clean up the CBE output a bit
...
llvm-svn: 21740
2005-05-06 06:58:42 +00:00
Chris Lattner
f70b2785b7
add tail marker as a comment
...
llvm-svn: 21739
2005-05-06 06:53:07 +00:00
Misha Brukman
e096a50cb7
Remove trailing whitespace, patch by Markus Oberhumer.
...
llvm-svn: 21379
2005-04-20 16:05:03 +00:00
Chris Lattner
f53c9e2578
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
35084f46a3
remove use of getPrev() and getNext() on ilist nodes.
...
llvm-svn: 20673
2005-03-18 16:12:37 +00:00
Chris Lattner
7a9186cb47
stop using arg_front
...
llvm-svn: 20599
2005-03-15 05:03:36 +00:00
Chris Lattner
33f53a1f4f
stop using arg_back
...
llvm-svn: 20598
2005-03-15 04:59:17 +00:00
Chris Lattner
4b688a1c70
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
667186f10f
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
e29de97ab7
Single characters should be printed out as chars, not strings.
...
llvm-svn: 20515
2005-03-08 00:26:08 +00:00
Chris Lattner
a518cf568a
simplify some code.
...
llvm-svn: 20471
2005-03-06 02:28:23 +00:00
Chris Lattner
4439f1686f
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
8074739aa2
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
9d57998cda
Remove tabs from file.
...
llvm-svn: 20380
2005-02-28 19:36:15 +00:00
Chris Lattner
b2720f5b57
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
bf72146607
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
7b6a863954
Write out single characters as chars, not strings.
...
llvm-svn: 20179
2005-02-14 18:52:35 +00:00
Chris Lattner
ef836a918e
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
1e8e58b829
Fix hyphenation in output comment
...
llvm-svn: 19954
2005-01-31 06:19:57 +00:00
Reid Spencer
e48557f583
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
146e5504e5
Fix CBE code so that it compiles with VC++.
...
llvm-svn: 19303
2005-01-06 04:21:49 +00:00
Chris Lattner
37b9eef884
Fix PR490
...
Fix testcase CodeGen/CBackend/2004-12-28-LogicalConstantExprs.ll
llvm-svn: 19176
2004-12-29 04:00:09 +00:00
Chris Lattner
cf5cd542d4
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
0e9a9d2098
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
1da3720799
Emit correct prototype for __builtin_alloca on V8.
...
llvm-svn: 18745
2004-12-10 05:44:45 +00:00
Chris Lattner
bf9258ba8b
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
40e7175e44
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
faf1e07531
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
0abd8109fa
Do not let GCC emit a warning for INT64_MIN
...
llvm-svn: 18398
2004-11-30 21:33:58 +00:00
Brian Gaeke
48f8e8b05a
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
3684294c71
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
Reid Spencer
d3f7233495
Change Library Names Not To Conflict With Others When Installed
...
llvm-svn: 17286
2004-10-27 23:18:45 +00:00
John Criswell
3c14d0815c
Removed dead method, printPHICopiesForSuccessors().
...
llvm-svn: 17216
2004-10-25 18:41:50 +00:00
John Criswell
259f362897
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
Reid Spencer
e48ba34fd4
We won't use automake
...
llvm-svn: 17155
2004-10-22 03:35:04 +00:00
John Criswell
0ba9295e3c
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
Reid Spencer
ce514b1c2c
Initial automake generated Makefile template
...
llvm-svn: 17136
2004-10-18 23:55:41 +00:00
Chris Lattner
5ae94ef614
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
caf0d76a8a
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
08ad95ec1f
Add support for unreachable and undef
...
llvm-svn: 17048
2004-10-16 18:12:13 +00:00
Reid Spencer
e6418ec30f
Update to reflect changes in Makefile rules.
...
llvm-svn: 16950
2004-10-13 11:46:52 +00:00
Chris Lattner
2bc979427d
Fix a warning that is emitted on the suns
...
llvm-svn: 16917
2004-10-11 15:50:40 +00:00
Reid Spencer
1b7459b29d
Initial version of automake Makefile.am file.
...
llvm-svn: 16893
2004-10-10 22:20:40 +00:00
Chris Lattner
c959314701
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