Chris Lattner
ba9c6434b9
do not allow '.' in symbol names
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24292 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-10 21:39:29 +00:00
Chris Lattner
36c975c023
Call this method with the object we have
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24279 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-10 18:53:25 +00:00
Chris Lattner
ce8eb0c16b
Add a new option to indicate we want the code generator to emit code quickly,not spending tons of time microoptimizing it. This is useful for an -O0style of build.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24233 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-08 02:11:51 +00:00
Chris Lattner
bad13eb189
Fix a QOI issue noticed by Markus F.X.J. Oberhumer.
...
This fixes PR641
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24154 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-02 17:42:58 +00:00
Chris Lattner
b94388a76a
fix CBackend/2005-09-27-VolatileFuncPtr.ll
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23475 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-27 20:52:44 +00:00
Jim Laskey
b1e1180ca0
1. Use SubtargetFeatures in llc/lli.
...
2. Propagate feature "string" to all targets.
3. Implement use of SubtargetFeatures in PowerPCTargetSubtarget.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23192 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-01 21:38:21 +00:00
Chris Lattner
57da25231a
Fix PR618 and Regression/CodeGen/CBackend/2005-08-23-Fmod.ll by not emitting
...
x%y for 'rem' on fp values.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22984 91177308-0d34-0410-b5e6-96231b3b80d8
2005-08-23 20:22:50 +00:00
Jim Laskey
cb6682fa44
Culling out use of unions for converting FP to bits and vice versa.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22838 91177308-0d34-0410-b5e6-96231b3b80d8
2005-08-17 19:34:49 +00:00
John Criswell
ce4e1e419e
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22437 91177308-0d34-0410-b5e6-96231b3b80d8
2005-07-14 19:41:16 +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
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
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
Chris Lattner
50a8a17e65
clean up the CBE output a bit
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21740 91177308-0d34-0410-b5e6-96231b3b80d8
2005-05-06 06:58:42 +00:00
Chris Lattner
fe673d9351
add tail marker as a comment
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21739 91177308-0d34-0410-b5e6-96231b3b80d8
2005-05-06 06:53:07 +00:00
Misha Brukman
d6a29a5304
Remove trailing whitespace, patch by Markus Oberhumer.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21379 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-20 16:05:03 +00:00
Chris Lattner
efd02c750f
Fix the 3 regressions last night, due to my buggy patch from yesterday.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20689 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-19 17:35:11 +00:00
Chris Lattner
67c2d18166
remove use of getPrev() and getNext() on ilist nodes.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20673 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-18 16:12:37 +00:00
Chris Lattner
39220ded94
stop using arg_front
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20599 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-15 05:03:36 +00:00
Chris Lattner
c5e7df1d60
stop using arg_back
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20598 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-15 04:59:17 +00:00
Chris Lattner
e4d5c441e0
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!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20597 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-15 04:54:21 +00:00
Chris Lattner
dbf69f1992
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20519 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-08 16:19:59 +00:00
Misha Brukman
23ba0c5cf3
Single characters should be printed out as chars, not strings.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20515 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-08 00:26:08 +00:00
Chris Lattner
b15fde2b78
simplify some code.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20471 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-06 02:28:23 +00:00
Chris Lattner
6d9b69fd5f
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);
}
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20423 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-03 21:12:04 +00:00
Chris Lattner
f7fe494c19
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. :-(
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20415 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-03 01:04:50 +00:00
Chris Lattner
ca76f357b9
Remove tabs from file.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20380 91177308-0d34-0410-b5e6-96231b3b80d8
2005-02-28 19:36:15 +00:00
Chris Lattner
33e9d29b3b
Add support to the C backend for llvm.prefetch. Patch contributed by
...
Justin Wick!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20378 91177308-0d34-0410-b5e6-96231b3b80d8
2005-02-28 19:29:46 +00:00
Chris Lattner
8399e02a2c
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;
}
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20191 91177308-0d34-0410-b5e6-96231b3b80d8
2005-02-15 05:52:14 +00:00
Misha Brukman
b70aaa62b6
Write out single characters as chars, not strings.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20179 91177308-0d34-0410-b5e6-96231b3b80d8
2005-02-14 18:52:35 +00:00
Chris Lattner
9d30e22da0
Implement CodeGen/CBackend/2005-02-14-VolatileOperations.ll
...
Volatile loads and stores need to emit volatile pointer operations in C.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20177 91177308-0d34-0410-b5e6-96231b3b80d8
2005-02-14 16:47:52 +00:00
Misha Brukman
41ce39cbd7
Fix hyphenation in output comment
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19954 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-31 06:19:57 +00:00
Reid Spencer
a8411a698e
Fix alloca support for Cygwin. On cygwin its __alloca not __builtin_alloca
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19776 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-23 04:32:47 +00:00
Jeff Cohen
d01f65aea1
Fix CBE code so that it compiles with VC++.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19303 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-06 04:21:49 +00:00
Chris Lattner
f376e5e5f6
Fix PR490
...
Fix testcase CodeGen/CBackend/2004-12-28-LogicalConstantExprs.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19176 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-29 04:00:09 +00:00
Chris Lattner
3e3b6f7a46
Fix PR485, instead of emitting zero sized arrays, emit arrays of size 1.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18974 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-15 23:13:15 +00:00
Chris Lattner
395fd5949b
When generating code for X86 targets, make sure the fp control word is set
...
to 64-bit precision, not 80 bits.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18915 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-13 21:52:52 +00:00
Brian Gaeke
ce63005ac1
Emit correct prototype for __builtin_alloca on V8.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18745 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-10 05:44:45 +00:00
Chris Lattner
3150e2de93
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!!!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18534 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-05 06:49:44 +00:00
Chris Lattner
cc16a8e73b
Fix test/Regression/CodeGen/CBackend/2004-12-03-ExternStatics.ll and
...
PR472
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18459 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-03 17:19:10 +00:00
John Criswell
ced06b73ec
Reverting revision 1.209.
...
Including alloca.h on Solaris brings in the prototype of strftime(), which
breaks compilation of CBE generated code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18435 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-02 19:02:49 +00:00
Chris Lattner
40e7c35a2f
Do not let GCC emit a warning for INT64_MIN
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18398 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-30 21:33:58 +00:00
Brian Gaeke
33ce43e8a8
Sparcs behave better if we use <alloca.h> and avoid messing with __builtin_alloca.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18397 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-30 21:27:01 +00:00
Chris Lattner
4394d51467
Hack around stupidity in GCC, fixing Burg with the CBE and
...
CBackend/2004-11-13-FunctionPointerCast.llx
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17710 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-13 22:21:56 +00:00
Reid Spencer
6cb21d443e
Change Library Names Not To Conflict With Others When Installed
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17286 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-27 23:18:45 +00:00
John Criswell
408f9995a1
Removed dead method, printPHICopiesForSuccessors().
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17216 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-25 18:41:50 +00:00
John Criswell
30cc227fa7
Modified switch generation so that only the phi values associated with the
...
destination basic block are copied.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17212 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-25 18:30:09 +00:00
Reid Spencer
cac731ecbe
We won't use automake
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17155 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-22 03:35:04 +00:00
John Criswell
57bbfcec91
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17144 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-20 14:38:39 +00:00
Reid Spencer
86d341b204
Initial automake generated Makefile template
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17136 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-18 23:55:41 +00:00
Chris Lattner
963869e41a
Print a semicolon for the unreacahble instruction. This fixes problems
...
where C requires semicolons in some cases to indicate null statements.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17107 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-17 23:49:11 +00:00