Commit Graph

314 Commits

Author SHA1 Message Date
Chris Lattner
d9477607dc Add mingw support, patch contributed by Anton
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28661 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-02 18:54:01 +00:00
Reid Spencer
2bc320de0c Fix casting so there's no warning on Alpha.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28605 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-31 22:26:11 +00:00
Reid Spencer
19b7e0e0ca For PR786:
Minor tweaks in public headers and a few .cpp files so that LLVM can build
successfully with -pedantic and projects using LLVM with -pedantic don't
get warnings from LLVM. There's still more -pedantic warnings to fix.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28453 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-24 19:21:13 +00:00
Chris Lattner
0c54d8964d Print struct return functions and calls as actually returning the hidden
argument struct pointer, enabling ABI compatibility for the CBE with
platforms with strange struct-return ABIs.  This fixes 252.eon and
CoyoteBench/fftbench on Darwin/X86 among other things.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28442 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-23 23:39:48 +00:00
Jeff Cohen
3c280bf4d1 Add checks for __OpenBSD__.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27761 91177308-0d34-0410-b5e6-96231b3b80d8
2006-04-17 17:55:41 +00:00
Jim Laskey
580418e082 Modify how CBE handles #lines.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26990 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-23 18:08:29 +00:00
Chris Lattner
bc641b9d8b Eliminate IntrinsicLowering from TargetMachine.
Make the CBE and V9 backends create their own, since they're the only ones that use it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26974 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-23 05:43:16 +00:00
Chris Lattner
872421553e Handle builtins that directly correspond to GCC builtins.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26737 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-13 23:09:05 +00:00
Jim Laskey
f4321a3a43 Handle the removal of the debug chain.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26729 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-13 13:07:37 +00:00
Jim Laskey
7075d6f2f2 Add #line support for CBE.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26621 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-08 19:31:15 +00:00
Chris Lattner
9a571ba823 Two things:
1. Don't emit debug info, or other llvm.metadata to the .cbe.c file.
2. Mark static ctors/dtors as such, so that bugpoint works on C++ code
   compiled with the new CFE.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26602 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-07 22:58:23 +00:00
Chris Lattner
f9a05329a1 Another hack due to allowing multiple symbols with the same name.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26150 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-13 22:22:42 +00:00
Robert Bocchino
b78e8382e8 Make the C writer work with packed types. printContainedStructs is
still not quite right and will be fixed later.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25488 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-20 20:43:57 +00:00
Chris Lattner
14d9b20b78 Simplify CWriter::printContainedStructs, also allowing it to work with
PackedTypes as a side-effect.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25485 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-20 18:57:03 +00:00
Duraid Madina
d2dec7d24c yet more C++ standards-compliance stuff.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25028 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-27 10:40:34 +00:00
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
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
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
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
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
Chris Lattner
665825e58e 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17094 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-17 17:48:59 +00:00
Chris Lattner
a9d12c0a56 Add support for unreachable and undef
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17048 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-16 18:12:13 +00:00
Chris Lattner
c71ff4c34b Fix a warning that is emitted on the suns
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16917 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-11 15:50:40 +00:00
Chris Lattner
60e667485e Really fix FreeBSD, which apparently doesn't tolerate the extern.
Thanks to Jeff Cohen for pointing out my goof.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16762 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-06 04:21:52 +00:00
Chris Lattner
523001f1bb FreeBSD uses GCC. Patch contributed by Jeff Cohen!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16756 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-06 03:15:44 +00:00
Alkis Evlogimenos
200a360ec6 Pull assignment out of for loop conditional in order for this to
compile under windows. Patch contributed by Paolo Invernizzi!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16534 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-28 02:40:37 +00:00
Chris Lattner
b12914bfc0 '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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16436 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-20 04:48:05 +00:00
Reid Spencer
551ccae044 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/.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16137 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-01 22:55:40 +00:00
Brian Gaeke
07b52b367f Previous checkin broke printf(%a) support for fp constants-- re-fix it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16051 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-25 19:37:26 +00:00
Brian Gaeke
8a702e8e1b New version of Bill Wendling's PR33 patch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16050 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-25 19:00:42 +00:00
Chris Lattner
f8e6f4f776 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15602 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-10 00:19:16 +00:00
Chris Lattner
a9d790c831 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>


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15223 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-25 22:36:35 +00:00
Brian Gaeke
043c0bb0d9 Emit NaNs and INFs bit-identically to the bytecode file, if the system has
printf("%a") support.
Patch contributed by Bill Wendling.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15056 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-21 03:15:26 +00:00
Reid Spencer
518310cb0d bug 122:
- Replace ConstantPointerRef usage with GlobalValue usage


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14953 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-18 00:44:37 +00:00
Chris Lattner
76e2df2645 Patches towards fixing PR341
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14841 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-15 02:14:30 +00:00
Misha Brukman
f028f82a58 Apple's MacOS X is another OS which does not provide alloca() via <alloca.h>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14781 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-12 23:37:18 +00:00
Chris Lattner
4e547ec8bf Delete the allocate*TargetMachine function, which is now dead .
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14755 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-11 04:16:31 +00:00
Chris Lattner
71d24aab2d Make these format a bit nicer
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14747 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-11 03:27:42 +00:00
Chris Lattner
d36c970a11 Auto-registrate target
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14745 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-11 02:48:49 +00:00
Reid Spencer
954da37bb4 Add #include <iostream> since Value.h does not #include it any more.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14622 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-04 12:19:56 +00:00
Chris Lattner
3048373748 Move the IntrinsicLowering header into the CodeGen directory, as per PR346
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14266 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-20 07:49:54 +00:00
Chris Lattner
f70c22b019 Rename Type::PrimitiveID to TypeId and ::getPrimitiveID() to ::getTypeID()
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14201 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-17 18:19:28 +00:00
Chris Lattner
8fcf797f79 <alloca.h> on cygwin pulls in a ton of stuff (macros and function protos)
that we REALLY don't want in the CBE code.

With this fix, the CBE passes all of the MultiSource tests on cygwin that
it does on linux.  Yaay!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13975 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-02 23:10:26 +00:00
Chris Lattner
9d1af97d02 Fix the big regression that has been killing the nightly tester these last
few days.  Apparently the old symbol table used to auto rename collisions in
the type symbol table and the new one does not.  It doesn't really make sense
for the new one to do so, so we just make the client do it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13877 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-28 05:47:27 +00:00
Chris Lattner
d06a549384 Minor changes. Switch to a SymbolTable remove that does not take linear time
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13874 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-28 05:30:51 +00:00
Chris Lattner
85acba6d58 Fix PR344: the incorrect remove was being used.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13790 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-26 17:20:52 +00:00
Reid Spencer
9231ac8b6f Convert to SymbolTable's new iteration interface.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13754 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-25 08:53:40 +00:00
Chris Lattner
99c59e8e21 Add support for accurate garbage collection to the LLVM code generators
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13696 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-23 21:23:35 +00:00
Chris Lattner
433e25a920 Fix to make the CBE always emit comparisons inline. Hopefully this will
fix the really bad code we're getting on PPC.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13609 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-20 20:25:50 +00:00
Chris Lattner
cb3ad01833 syntactically loopify natural loops so that the GCC loop optimizer can find them. This should *dramatically* improve the performance of CBE compiled code on targets that depend on GCC's loop optimizations (like PPC)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13438 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-09 20:41:32 +00:00
Chris Lattner
4589ed9510 Do not emit prototypes for setjmp/longjmp, as they are handled specially
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13437 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-09 16:03:29 +00:00
Chris Lattner
6875807572 Make the floating point constant pools local to each function, split the
FindUsedTypes manipulation stuff out to be a seperate pass, and make the
main CWriter be a function pass now!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13435 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-09 06:20:51 +00:00
Chris Lattner
c2421439b5 Get this looking more like a function pass.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13433 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-09 04:30:20 +00:00
Chris Lattner
a05e0ec419 Print all PHI copies for successor blocks before the terminator, whether it be a conditional branch or switch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13430 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-09 03:42:48 +00:00
Chris Lattner
6ffe551f65 Changes to fix up the inst_iterator to pass to boost iterator checks. This
patch was graciously contributed by Vladimir Prus.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13185 91177308-0d34-0410-b5e6-96231b3b80d8
2004-04-27 15:13:33 +00:00
Chris Lattner
6683dbf32e Add support for select constant expressions to the CBE, fixing SIOD
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12589 91177308-0d34-0410-b5e6-96231b3b80d8
2004-04-01 05:28:26 +00:00
Chris Lattner
317201d773 Rename the intrinsic enum values for llvm.va_* from Intrinsic::va_* to
Intrinsic::va*.  This avoid conflicting with macros in the stdlib.h file.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12356 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-13 00:24:00 +00:00
Chris Lattner
9f24a077bd ADd support for select instructions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12316 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-12 05:52:14 +00:00
John Criswell
3799eec3cf Fixes for PR258 and PR259.
Functions with linkonce linkage are declared with weak linkage.
Global floating point constants used to represent unprintable values
(such as NaN and infinity) are declared static so that they don't interfere
with other CBE generated translation units.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11884 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-26 22:20:58 +00:00