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
Nick Hildenbrandt
d090d15736
Removed unneeded reference and dereferences.
...
llvm-svn: 4016
2002-10-02 18:34:51 +00:00
Nick Hildenbrandt
5d1a2cf4b1
Cleaned up my last check-in.
...
llvm-svn: 4014
2002-10-02 18:32:35 +00:00
Nick Hildenbrandt
f9aa2b4886
No longer include malloc.h. If protoypes are needed for memory functions they will be present in the byte code and the generated c as well.
...
llvm-svn: 4013
2002-10-02 18:20:18 +00:00
Nick Hildenbrandt
1defd8270c
Fixed to properly escape quotes in strings.
...
llvm-svn: 3991
2002-09-30 21:11:55 +00:00
Nick Hildenbrandt
205d6a6b20
Strings now handled correctly.
...
llvm-svn: 3920
2002-09-25 20:29:26 +00:00
Nick Hildenbrandt
cb0b25c6c1
Parenthesis are now added to casts of type array.
...
llvm-svn: 3892
2002-09-23 21:02:50 +00:00
Chris Lattner
b9379750d9
Fix cwriter to not output FP constants in ascii, output them in hex instead.
...
This fixes a number of FP precision problems, making the output of the
power benchmark closer to the right answer.
Unfortunately, this only addresses FP constants used directly in functions.
Constants referred to by global constants (such as an array of FP values)
aren't helped by this. Until this happens power won't work.
llvm-svn: 3871
2002-09-20 23:26:33 +00:00
Chris Lattner
6874ea0917
Fix bug: 2002-09-20-VarArgPrototypes.ll
...
llvm-svn: 3870
2002-09-20 22:32:30 +00:00
Chris Lattner
0752044e03
Fix output of typedefs to avoid syntax errors.
...
* We now can correctly Cify the Olden-power benchmark
llvm-svn: 3860
2002-09-20 15:20:24 +00:00
Chris Lattner
1c1de51dfe
* Add a couple of comments to the output c code
...
* _FIX_ infinite recursion problem, due to typedefs of a structure being
printed before the structure.
llvm-svn: 3859
2002-09-20 15:18:30 +00:00
Chris Lattner
af6a9e8fc4
Another change that doesn't affect functionality. Since we are only looking
...
at types in the symbol table, only traverse the type plane, saving a loop nest.
llvm-svn: 3858
2002-09-20 15:12:13 +00:00
Chris Lattner
a66eef584f
Make the StructPrinted set only take memory when it's being used.
...
rename parseStruct to printContainedStructs
llvm-svn: 3857
2002-09-20 15:05:40 +00:00
Chris Lattner
4f385b19bb
No functionality changes, primarily just changing tab indentation to space
...
indentation
llvm-svn: 3856
2002-09-20 14:56:54 +00:00
Vikram S. Adve
fa9dd5dba9
Don't print global variable definitions twice! Sun's pathetic compiler
...
never complained about this.
llvm-svn: 3774
2002-09-17 11:50:38 +00:00
Vikram S. Adve
012667a925
No longer need to sign-extend array indices to 64 bits since they
...
are now longs and not unsigned ints.
llvm-svn: 3731
2002-09-15 21:51:04 +00:00
Nick Hildenbrandt
da4f9b1cee
Fixed problem with printing struct definitions in the correct order.
...
This allows for the Regression/Transforms/ScalarReplacement/scalarize.c to run correctly.
llvm-svn: 3721
2002-09-14 21:36:24 +00:00
Chris Lattner
5f8c0401a9
Fix a bug introduced by the Getelementptr change
...
llvm-svn: 3695
2002-09-12 20:34:47 +00:00
Chris Lattner
18e3c4ff50
- Change getelementptr instruction to use long indexes instead of uint
...
indexes for sequential types.
llvm-svn: 3681
2002-09-11 01:21:29 +00:00
Chris Lattner
073971b535
- Fix bug: test/Regression/CBackend/2002-08-20-RecursiveTypes.ll
...
- Converted CWriter to be an LLVM pass.
llvm-svn: 3558
2002-08-31 00:29:16 +00:00
Chris Lattner
7a75a8e108
Fix bug: test/Regression/CBackend/2002-08-26-IndirectCallTest.ll
...
llvm-svn: 3511
2002-08-26 20:50:09 +00:00
Vikram S. Adve
9369cfea20
Fix the way parens are printed around "*ptrName" so that
...
no parens are printed around *, **, ... alone, except if
it is a pointer type for which no name should be printed,
as in the result of a cast.
llvm-svn: 3506
2002-08-25 20:00:08 +00:00
Vikram S. Adve
d499981c22
Sign-extend array index expressions to work correctly on non-32 bit machines.
...
llvm-svn: 3496
2002-08-24 14:44:23 +00:00