1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-24 05:23:45 +02:00
Commit Graph

138 Commits

Author SHA1 Message Date
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
John Criswell
caef76fa72 Removed size_t from the parameter list of the malloc() prototype in generated C
code.  This prevents a compiler warning on Sparc that causes the tests to fail.

llvm-svn: 7125
2003-07-08 14:52:09 +00:00
Chris Lattner
d77130be67 jmp_buf is really a pointer type that is passed around...
llvm-svn: 6935
2003-06-28 19:29:34 +00:00
Chris Lattner
c502341595 Add support for the Invoke instruction!
llvm-svn: 6934
2003-06-28 17:53:05 +00:00
Chris Lattner
0f66e1a23a Preserve compatibility with non-gcc compilers
llvm-svn: 6932
2003-06-28 17:15:12 +00:00
Chris Lattner
769795ef2f Fix bug: CBackend/2003-06-28-LinkOnceGlobalVars.llx
llvm-svn: 6931
2003-06-28 17:08:36 +00:00
Joel Stanley
0a940fa30a - Fixed name mangling conditions to handle 'linkonce' linkage type. In
particular, name mangling for GlobalValues only occurs when the linkage type is
internal or when the name must be mangled to avoid a collision.  See comments in
CWriter::getValueName for more information.

- 'inline' keyword is now emitted for functions with 'linkonce' linkage type.

- Fixed typos.

llvm-svn: 6898
2003-06-25 04:52:09 +00:00
Brian Gaeke
6c5d67b96f It seems likely that floats would need a cast too, because they are
ordinarily promoted to doubles.

llvm-svn: 6894
2003-06-25 03:05:33 +00:00
Brian Gaeke
62947dbf9e Fix 2003-06-23-PromotedExprs.llx -- if we are adding two bytes we better
explicitly cast the result to be a byte, or C will gleefully promote it
to int.

llvm-svn: 6869
2003-06-23 20:00:51 +00:00
Brian Gaeke
d51afb3000 lib/CWriter/Writer.cpp: Copy AsmWriter's ConstantFP checking code here
into a new function FPCSafeToPrint(), and use it in printConstant()
and printFunction() to decide whether we should output ConstantFPs as
floating-point constants or as references to stack-allocated variables.

lib/VMCore/AsmWriter.cpp: Fix an apparent typo in the code mentioned above.

llvm-svn: 6762
2003-06-17 23:55:35 +00:00
Chris Lattner
44689264b2 Fairly major change: emit fixed sized allocas in the entry block as a variable,
instead of a variable pointer and an alloca.  All accesses to the variable then
use the address-of operator to access it.  This plays better with the internal
GCC code generation phases, which bail early on functions which contain allocas.
It also makes the code a bit easier to read.

llvm-svn: 6734
2003-06-17 04:39:14 +00:00
Brian Gaeke
66d086cc1e Don't include alloca.h on FreeBSD.
llvm-svn: 6728
2003-06-16 23:57:13 +00:00
Chris Lattner
098bfd0a32 Fix typeo
llvm-svn: 6704
2003-06-16 12:21:19 +00:00
Chris Lattner
01aacfcea8 Fix bug: CBackend/2003-06-11-HexConstant.ll
Fix bug: CBackend/2003-06-11-LiteralStringProblem.ll

llvm-svn: 6697
2003-06-16 12:09:09 +00:00
Chris Lattner
e9a9d85aee Don't output explicit initializers for globals that are zero initialized
llvm-svn: 6651
2003-06-06 07:10:24 +00:00
Chris Lattner
c8c58138b6 Fix bug: CBackend/2003-06-01-NullPointerType.ll
llvm-svn: 6526
2003-06-02 03:10:53 +00:00
Chris Lattner
010cda7529 Fix a bug with casts to bool. This fixes testcase UnitTests/2003-05-31-CastToBool.c
llvm-svn: 6507
2003-06-01 03:36:51 +00:00
Chris Lattner
01cbfa9317 Eliminate unnecessary ->get calls that are now automatically handled.
llvm-svn: 6397
2003-05-29 15:12:27 +00:00