1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-21 03:53:04 +02:00
Commit Graph

155 Commits

Author SHA1 Message Date
Chris Lattner
16690fad3d Adjust to the changed StructType interface. In particular, getElementTypes() is gone.
llvm-svn: 11228
2004-02-09 04:37:31 +00:00
Chris Lattner
a1757d1d91 Start using the new and improve interface to FunctionType arguments
llvm-svn: 11224
2004-02-09 04:14:01 +00:00
Chris Lattner
68fdb35576 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
89478047a8 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
8ddd42c6c1 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
c299416f67 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
67eb3c7f04 output foo(void) as appropriate
llvm-svn: 10232
2003-11-26 00:09:17 +00:00
Chris Lattner
422381c755 Fix bug in previous checkin
llvm-svn: 10231
2003-11-25 23:44:40 +00:00
Chris Lattner
1ab588745a 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
17db893394 Fix PR149 - support constant shift expressions.
llvm-svn: 10167
2003-11-22 05:02:56 +00:00
Chris Lattner
7164a8a7ea 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
d25f86d683 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
40b6a81c43 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
8e65bbe451 Fix bugs with attribute weak emission
llvm-svn: 9678
2003-11-03 17:32:38 +00:00
Chris Lattner
41e6298462 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
c92cb7905b Eliminate the silly namedContext member of printType
llvm-svn: 9666
2003-11-03 01:01:59 +00:00
Chris Lattner
4db6e0ea7a 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
8ede493de1 Fail gracefully if we have a zero arg varargs function
llvm-svn: 9436
2003-10-23 18:39:22 +00:00
John Criswell
71d2894956 Added LLVM copyright notice to Makefiles.
llvm-svn: 9312
2003-10-20 22:26:57 +00:00
John Criswell
b402729b30 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
29825508f0 Add support for the new varargs intrinsics and instructions
llvm-svn: 9226
2003-10-18 05:57:43 +00:00
Chris Lattner
f46c45682a Add support for 'weak' linkage.
llvm-svn: 9171
2003-10-16 18:29:00 +00:00
Chris Lattner
f2ed60c0b7 Decrease usage of use_size()
llvm-svn: 9135
2003-10-15 16:48:29 +00:00
Chris Lattner
55c1da7877 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
9506b0d6e2 Use the autoconf macro John wrote
llvm-svn: 9095
2003-10-13 17:13:53 +00:00
Chris Lattner
5567441de9 * 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
b81f5e6db8 * 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
dcefc3244a 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
d4de2760aa Rename Function::getEntryNode -> getEntryBlock
llvm-svn: 8625
2003-09-20 14:39:18 +00:00
Chris Lattner
584ade803f Fix problems with programs that prototype printf to something unusual
llvm-svn: 8538
2003-09-15 16:47:12 +00:00
Misha Brukman
629711a7c3 Fixed spelling and grammar.
llvm-svn: 8489
2003-09-11 22:34:13 +00:00
Chris Lattner
f6bd477804 Remove a bunch of warnings from the CBE generated C code
llvm-svn: 8455
2003-09-10 20:12:09 +00:00
Chris Lattner
49d7564882 "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
e8ae7bf114 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
4ad8720f91 Add support for the unwind instruction
llvm-svn: 8408
2003-09-08 18:54:55 +00:00
Chris Lattner
763a88d6bd 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
c444f0ceea Simplify code
llvm-svn: 8139
2003-08-24 21:00:22 +00:00
Chris Lattner
65b451cc4e Implement support for the unwind intrinsic in the CBE
llvm-svn: 8116
2003-08-24 13:06:10 +00:00
Chris Lattner
f54b131a49 Add support for the sig(set|long)jmp intrinsics
llvm-svn: 7951
2003-08-18 16:06:09 +00:00
Misha Brukman
56f7db4178 Spell `necessary' correctly.
llvm-svn: 7944
2003-08-18 14:43:39 +00:00
Chris Lattner
01af3eca82 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
c445413be0 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
93dacfb0bd Unbreak the CBE output
llvm-svn: 7453
2003-07-31 17:47:24 +00:00
John Criswell
9610326d63 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
11e6d7f2de 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
dc07ea6681 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
7e3419a91c Fix program: SingleSource/UnitTests/2003-07-09-SignedArgs with the CBE
llvm-svn: 7276
2003-07-23 20:45:31 +00:00
Chris Lattner
6ad460b336 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
f7ca33f163 Eliminated dead code.
llvm-svn: 7209
2003-07-21 16:34:35 +00:00
Misha Brukman
c170ac78b6 Some beautification changes (tabs to spaces, removed extra blank lines);
no functionality changed.

llvm-svn: 7138
2003-07-09 17:33:50 +00:00