Chris Lattner
ac6db755c3
Adjust to the changed StructType interface. In particular, getElementTypes() is gone.
...
llvm-svn: 11228
2004-02-09 04:37:31 +00:00
Chris Lattner
fa829be4d3
Start using the new and improve interface to FunctionType arguments
...
llvm-svn: 11224
2004-02-09 04:14:01 +00:00
Chris Lattner
fae8ab3088
rename the "exceptional" destination of an invoke instruction to the 'unwind' dest
...
llvm-svn: 11202
2004-02-08 21:44:31 +00:00
Brian Gaeke
e869e0cfa8
Turn off "attribute weak" to pacify Mac OS X's system compiler, which prints a
...
warning whenever it sees it.
llvm-svn: 10391
2003-12-11 00:24:36 +00:00
John Criswell
65b3acdd5b
Upon Chris's suggestion, moved the #ifdef's to the generated C code.
...
This makes LLVM and the generated C code more portable.
llvm-svn: 10377
2003-12-10 18:17:57 +00:00
John Criswell
83fb097ed0
Fixed the CBE on Solaris/Sparc. We need to define the return value of
...
the write() system call because it returns 64 bits on Solaris 64 bit,
and an implicit return value of int says it returns 32 bits.
Admittedly, this is a bit of a hack.
llvm-svn: 10375
2003-12-10 18:06:34 +00:00
Chris Lattner
eb64b6a922
output foo(void) as appropriate
...
llvm-svn: 10232
2003-11-26 00:09:17 +00:00
Chris Lattner
883b73f0a8
Fix bug in previous checkin
...
llvm-svn: 10231
2003-11-25 23:44:40 +00:00
Chris Lattner
637ee39933
Do not depend on the gep index types to determine what flavor of index it is
...
llvm-svn: 10225
2003-11-25 20:49:55 +00:00
Brian Gaeke
03f3611633
Fix PR149 - support constant shift expressions.
...
llvm-svn: 10167
2003-11-22 05:02:56 +00:00
Chris Lattner
9005b8000c
ISO 9899 7.13.2.1 (3) says that "[...] the values of objects of automatic
...
storage duration that are local to the function containing the invocation of the
[...] setjmp macro that do not have volatile-qualified type and have been
changed between the setjmp invocation and longjmp call are indeterminate."
As such, we have to mark all variables in a function that uses 'invoke' as
volatile.
This fixes PR77
llvm-svn: 10035
2003-11-16 22:06:14 +00:00
Brian Gaeke
960707c335
Put all LLVM code into the llvm namespace, as per bug 109.
...
llvm-svn: 9903
2003-11-11 22:41:34 +00:00
Chris Lattner
39c0a19894
Work around a bug in GCC where it can't handle common variables marked weak.
...
llvm-svn: 9679
2003-11-03 17:35:00 +00:00
Chris Lattner
e4e2595f71
Fix bugs with attribute weak emission
...
llvm-svn: 9678
2003-11-03 17:32:38 +00:00
Chris Lattner
7be3ab2fb7
This simplifies the CWriter code, makes the generated code easier to read,
...
and makes the output work with the intel compiler. Overall, a win.
llvm-svn: 9671
2003-11-03 04:31:54 +00:00
Chris Lattner
7af7d94df2
Eliminate the silly namedContext member of printType
...
llvm-svn: 9666
2003-11-03 01:01:59 +00:00
Chris Lattner
4fa54568a3
The "correct" fix for CBackend/2003-10-23-UnusedType.ll is to not even try
...
to emit types which are not used.
llvm-svn: 9647
2003-11-02 01:29:27 +00:00
Chris Lattner
bf9584b041
Fail gracefully if we have a zero arg varargs function
...
llvm-svn: 9436
2003-10-23 18:39:22 +00:00
John Criswell
4436c49787
Added LLVM copyright notice to Makefiles.
...
llvm-svn: 9312
2003-10-20 22:26:57 +00:00
John Criswell
482202a601
Added LLVM project notice to the top of every C++ source file.
...
Header files will be on the way.
llvm-svn: 9298
2003-10-20 19:43:21 +00:00
Chris Lattner
5b33748497
Add support for the new varargs intrinsics and instructions
...
llvm-svn: 9226
2003-10-18 05:57:43 +00:00
Chris Lattner
068ad84038
Add support for 'weak' linkage.
...
llvm-svn: 9171
2003-10-16 18:29:00 +00:00
Chris Lattner
f95d9b99b3
Decrease usage of use_size()
...
llvm-svn: 9135
2003-10-15 16:48:29 +00:00
Chris Lattner
08ca35b6d6
Do not allow fallthroughs in switch statements. This fixes PR37,
...
253.perlbmk, and test/Programs/SingleSource/UnitTests/2003-10-13-SwitchTest.c!
llvm-svn: 9101
2003-10-13 20:32:04 +00:00
Chris Lattner
8260db9a69
Use the autoconf macro John wrote
...
llvm-svn: 9095
2003-10-13 17:13:53 +00:00
Chris Lattner
1d243169d9
* Spell "necessary" correctly
...
* Print floating point values using C99 hexadecimal style FP if possible.
This increases the number of floating point constants that may be emitted
inline, and improves precision for global variable initializers which
can not be emitted in integer form.
This fixes the Olden/Power benchmark with the CBE!!!!
llvm-svn: 9052
2003-10-12 08:12:58 +00:00
Chris Lattner
5d841b2de5
* Be TBAA safe
...
* Fix isFPCSafeToPrint to find more constants safe to print, which it was
failing because ftostr was padding with leading space characters.
* Scan the entire module for global constants instead of each function at a
time. This has the advantage of allowing us to emit constants at global
scope instead of function scope. This speeds FP programs quite a bit.
llvm-svn: 9048
2003-10-12 04:36:29 +00:00
Chris Lattner
6e7ae58260
A couple of minor code cleanups.
...
Print literal doubles using ftostr instead of <<, because it yields higher precision numbers.
llvm-svn: 8855
2003-10-05 00:40:51 +00:00
Chris Lattner
5dac64f629
Rename Function::getEntryNode -> getEntryBlock
...
llvm-svn: 8625
2003-09-20 14:39:18 +00:00
Chris Lattner
b421aebcc0
Fix problems with programs that prototype printf to something unusual
...
llvm-svn: 8538
2003-09-15 16:47:12 +00:00
Misha Brukman
acda7df68b
Fixed spelling and grammar.
...
llvm-svn: 8489
2003-09-11 22:34:13 +00:00
Chris Lattner
e7980ae2ee
Remove a bunch of warnings from the CBE generated C code
...
llvm-svn: 8455
2003-09-10 20:12:09 +00:00
Chris Lattner
ad3f079976
"the one true solution for compatibility with GCC 3.3+"
...
... or so I hope
llvm-svn: 8454
2003-09-10 20:08:00 +00:00
Chris Lattner
04ecefe232
Eliminate support for the llvm.unwind intrinisic, using the Unwind instruction instead
...
llvm-svn: 8411
2003-09-08 19:44:26 +00:00
Chris Lattner
9c58cf6d03
Add support for the unwind instruction
...
llvm-svn: 8408
2003-09-08 18:54:55 +00:00
Chris Lattner
cbd234f26b
Fix really nasty bugs in the CWriter, handling invoke instructions. Tracking
...
these down was NOT phun.
llvm-svn: 8181
2003-08-28 19:56:10 +00:00
Chris Lattner
c434e138ac
Simplify code
...
llvm-svn: 8139
2003-08-24 21:00:22 +00:00
Chris Lattner
35829a154d
Implement support for the unwind intrinsic in the CBE
...
llvm-svn: 8116
2003-08-24 13:06:10 +00:00
Chris Lattner
a592cac43c
Add support for the sig(set|long)jmp intrinsics
...
llvm-svn: 7951
2003-08-18 16:06:09 +00:00
Misha Brukman
7eb05a170a
Spell `necessary' correctly.
...
llvm-svn: 7944
2003-08-18 14:43:39 +00:00
Chris Lattner
47be951787
Stop annoying warnings about mismatched types with the argument of a free
...
implement more constant expressions so that 176.gcc compiles with the CBE
llvm-svn: 7847
2003-08-14 19:19:53 +00:00
Chris Lattner
584058220a
The HAVE_JUMP code is dead, these intrinsics should _never_ be expanded
...
llvm-svn: 7642
2003-08-06 18:04:40 +00:00
Chris Lattner
9fabe8dddf
Unbreak the CBE output
...
llvm-svn: 7453
2003-07-31 17:47:24 +00:00
John Criswell
6e264f078a
Modified the code so that it generates (0) for setjmp() and abort() for
...
longjmp() (and does not include setjmp.h).
This is to fix some problems on Sparc while non-local jumps are still
unimplemented.
llvm-svn: 7449
2003-07-31 15:11:08 +00:00
Brian Gaeke
3d35fad525
Don't include llvm/SlotCalculator.h, or <set>.
...
Move up the inclusion of llvm/Support/Mangler.h.
llvm-svn: 7320
2003-07-25 20:21:06 +00:00
Brian Gaeke
46f8b71376
Use unified CWriter-X86/Printer name mangler. Do not bother using
...
SlotCalculator in CWriter. (Unfortunately, all this means a lot of
X86/Printer's methods have to be de-constified again. Oh well.)
llvm-svn: 7299
2003-07-24 20:20:44 +00:00
Chris Lattner
bbc2bc1790
Fix program: SingleSource/UnitTests/2003-07-09-SignedArgs with the CBE
...
llvm-svn: 7276
2003-07-23 20:45:31 +00:00
Chris Lattner
6077c3195f
Simplify code by using ConstantInt::getRawValue instead of checking to see
...
whether the constant is signed or unsigned, then casting
llvm-svn: 7252
2003-07-23 15:22:26 +00:00
Misha Brukman
96c8d59c9c
Eliminated dead code.
...
llvm-svn: 7209
2003-07-21 16:34:35 +00:00
Misha Brukman
1194d54975
Some beautification changes (tabs to spaces, removed extra blank lines);
...
no functionality changed.
llvm-svn: 7138
2003-07-09 17:33:50 +00:00