1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-25 12:12:47 +01:00
Commit Graph

108 Commits

Author SHA1 Message Date
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
Chris Lattner
435e5592a9 Add support for setjmp/longjmp primitives
Patch checked in for Bill Wendling :)

llvm-svn: 6241
2003-05-17 22:26:33 +00:00
Chris Lattner
0353c32bbe Casts are now unnecessary
llvm-svn: 6199
2003-05-14 17:50:19 +00:00
Chris Lattner
c6eab62a9e Fix bug: CBackend/2003-05-13-VarArgFunction.ll
In C, a prototype with no arguments is varargs.  A prototype that takes void
has zero args.

llvm-svn: 6172
2003-05-13 20:15:37 +00:00
Chris Lattner
4152a8b0f7 Fix bug: CWriter/2003-05-12-IntegerSizeWarning.c
llvm-svn: 6128
2003-05-12 15:39:31 +00:00
Chris Lattner
4cdf86adaf Add support for variable argument functions!
llvm-svn: 6044
2003-05-08 18:41:45 +00:00
Chris Lattner
5636fe923e Fix bug: UnitTests/2003-05-02-DependantPHI.c
Fix testcase MultiSource/Ptrdist-ks

llvm-svn: 6000
2003-05-03 07:11:00 +00:00
Chris Lattner
21b4596a3a * Eliminate using decls
* Fix some styleistic things
* Fix bug: CWriter/2002-05-16-NameCollide.ll

llvm-svn: 5988
2003-05-03 03:14:35 +00:00
Chris Lattner
7054d8f1f1 Fix problem where labels were being incorrectly elided, and fix problem
where PHI copies where not emitted for the default label of switch insts

llvm-svn: 5882
2003-04-23 19:15:13 +00:00
Chris Lattner
1e44b1562a Fix the super obnoxious "cast to pointer from integer of different size" warnings
llvm-svn: 5881
2003-04-23 19:09:22 +00:00
Chris Lattner
3e687b8b65 Remove unneccesary &*
llvm-svn: 5871
2003-04-23 16:36:11 +00:00
Chris Lattner
8ca18dd9fa Add support for the switch instruction to the CWriter
llvm-svn: 5847
2003-04-22 20:19:52 +00:00
Joel Stanley
1b7b1786a5 Fixed alloca declaration problem on sun.
llvm-svn: 5546
2003-02-12 20:45:00 +00:00
Chris Lattner
b5027095e5 - Eliminated the deferred symbol table stuff in Module & Function, it really
wasn't an optimization and it was causing lots of bugs.

llvm-svn: 4779
2002-11-20 18:36:02 +00:00
Nick Hildenbrandt
cd79631bb1 *** empty log message ***
llvm-svn: 4754
2002-11-18 22:21:52 +00:00
Nick Hildenbrandt
d97c216a21 *** empty log message ***
llvm-svn: 4745
2002-11-18 20:55:50 +00:00
Chris Lattner
3de4680d56 _REALLY_ fix the float constant problem
llvm-svn: 4609
2002-11-07 22:12:53 +00:00
Chris Lattner
d57a4ec976 Print out 'float' constants correctly
llvm-svn: 4607
2002-11-07 19:43:59 +00:00
Nick Hildenbrandt
1fddd12bae Fixes escapeing bug in strings. Fixes test case test/Regression/CBackend/2002-11-06-PrintEscaped.c
llvm-svn: 4583
2002-11-06 21:40:23 +00:00
Nick Hildenbrandt
4c3112f3cb Loads and stores can't be inlined. This fixes test/Singlesource/matrixTranspose
llvm-svn: 4579
2002-11-06 20:07:54 +00:00
Nick Hildenbrandt
cb64b4ce99 Fixed bug in Regression/CBackend/2002-10-30-FunctionPointerAlloca.ll
llvm-svn: 4486
2002-11-01 17:37:09 +00:00
Nick Hildenbrandt
f3846a75f1 Casting NULL can cause problems so lets just not cast NULL to anything.
llvm-svn: 4349
2002-10-28 19:54:06 +00:00
Nick Hildenbrandt
57a54cb166 *** empty log message ***
llvm-svn: 4343
2002-10-28 19:05:12 +00:00
Nick Hildenbrandt
d23deb3ebe Malloc prototyping now works even if the original file had its own prototype for malloc
llvm-svn: 4271
2002-10-23 18:59:40 +00:00
Chris Lattner
461fc88db8 Fix bug: CBackend/2002-10-16-External.ll
llvm-svn: 4201
2002-10-16 20:08:47 +00:00
Chris Lattner
8eaebbfd80 Fix bug: test/Regression/CBackend/2002-10-15-OpaqueTypeProblem.ll
llvm-svn: 4190
2002-10-16 00:08:22 +00:00
Nick Hildenbrandt
8dba342c37 Instead of adding stdlib we just prototype malloc correctly.
llvm-svn: 4118
2002-10-11 21:40:44 +00:00
Nick Hildenbrandt
27d9b87ed1 Sun requires you to include stdlib to use malloc
llvm-svn: 4117
2002-10-11 18:41:44 +00:00
Vikram S. Adve
6932399f9b Bug fix: In preventing static global variables from being printed twice,
I also prevented external globals from being printed twice, but they
should (extern declaration and definition).

llvm-svn: 4043
2002-10-05 23:43:10 +00:00
Nick Hildenbrandt
1ccdc12400 Add parens around constant calls to getelemptr to properly associate the reference
llvm-svn: 4032
2002-10-03 20:47:24 +00:00
Nick Hildenbrandt
1477c5282f I was wrong on the removing of those references on the last commit.
llvm-svn: 4023
2002-10-02 21:14:33 +00:00