summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CWriter
Commit message (Collapse)AuthorAgeFilesLines
...
* Add parens around constant calls to getelemptr to properly associate the ↵Nick Hildenbrandt2002-10-031-2/+2
| | | | | | reference llvm-svn: 4032
* I was wrong on the removing of those references on the last commit.Nick Hildenbrandt2002-10-021-0/+3
| | | | llvm-svn: 4023
* Removed unneeded reference and dereferences.Nick Hildenbrandt2002-10-021-3/+0
| | | | llvm-svn: 4016
* Cleaned up my last check-in.Nick Hildenbrandt2002-10-021-61/+1
| | | | llvm-svn: 4014
* No longer include malloc.h. If protoypes are needed for memory functions ↵Nick Hildenbrandt2002-10-021-2/+61
| | | | | | they will be present in the byte code and the generated c as well. llvm-svn: 4013
* Fixed to properly escape quotes in strings.Nick Hildenbrandt2002-09-301-1/+6
| | | | llvm-svn: 3991
* Strings now handled correctly.Nick Hildenbrandt2002-09-251-8/+13
| | | | llvm-svn: 3920
* Parenthesis are now added to casts of type array.Nick Hildenbrandt2002-09-231-1/+2
| | | | llvm-svn: 3892
* Fix cwriter to not output FP constants in ascii, output them in hex instead.Chris Lattner2002-09-201-5/+40
| | | | | | | | | | | 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
* Fix bug: 2002-09-20-VarArgPrototypes.llChris Lattner2002-09-201-2/+4
| | | | llvm-svn: 3870
* Fix output of typedefs to avoid syntax errors.Chris Lattner2002-09-201-1/+1
| | | | | | * We now can correctly Cify the Olden-power benchmark llvm-svn: 3860
* * Add a couple of comments to the output c codeChris Lattner2002-09-201-14/+21
| | | | | | | * _FIX_ infinite recursion problem, due to typedefs of a structure being printed before the structure. llvm-svn: 3859
* Another change that doesn't affect functionality. Since we are only lookingChris Lattner2002-09-201-29/+27
| | | | | | at types in the symbol table, only traverse the type plane, saving a loop nest. llvm-svn: 3858
* Make the StructPrinted set only take memory when it's being used.Chris Lattner2002-09-201-12/+15
| | | | | | rename parseStruct to printContainedStructs llvm-svn: 3857
* No functionality changes, primarily just changing tab indentation to spaceChris Lattner2002-09-201-29/+28
| | | | | | indentation llvm-svn: 3856
* Don't print global variable definitions twice! Sun's pathetic compilerVikram S. Adve2002-09-171-7/+11
| | | | | | never complained about this. llvm-svn: 3774
* No longer need to sign-extend array indices to 64 bits since theyVikram S. Adve2002-09-151-6/+2
| | | | | | are now longs and not unsigned ints. llvm-svn: 3731
* Fixed problem with printing struct definitions in the correct order.Nick Hildenbrandt2002-09-141-15/+50
| | | | | | This allows for the Regression/Transforms/ScalarReplacement/scalarize.c to run correctly. llvm-svn: 3721
* Fix a bug introduced by the Getelementptr changeChris Lattner2002-09-121-1/+1
| | | | llvm-svn: 3695
* - Change getelementptr instruction to use long indexes instead of uintChris Lattner2002-09-111-2/+2
| | | | | | indexes for sequential types. llvm-svn: 3681
* - Fix bug: test/Regression/CBackend/2002-08-20-RecursiveTypes.llChris Lattner2002-08-311-19/+64
| | | | | | - Converted CWriter to be an LLVM pass. llvm-svn: 3558
* Fix bug: test/Regression/CBackend/2002-08-26-IndirectCallTest.llChris Lattner2002-08-261-1/+2
| | | | llvm-svn: 3511
* Fix the way parens are printed around "*ptrName" so thatVikram S. Adve2002-08-251-6/+19
| | | | | | | | 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
* Sign-extend array index expressions to work correctly on non-32 bit machines.Vikram S. Adve2002-08-241-4/+9
| | | | llvm-svn: 3496
* Changed default value of 3rd parameter in function definitionAnand Shukla2002-08-231-1/+1
| | | | llvm-svn: 3492
* Load & StoreInst no longer derive from MemAccessInst, so we don't haveChris Lattner2002-08-221-5/+5
| | | | | | to handle indexing anymore llvm-svn: 3484
* Fix bug: 2002-08-20-UnnamedArgument.cChris Lattner2002-08-201-16/+18
| | | | llvm-svn: 3401
* Implement ConstantExprs in CWriterChris Lattner2002-08-191-39/+77
| | | | llvm-svn: 3394
* Incorporate calcTypeNameVar into CWriter class, fixingChris Lattner2002-08-191-89/+97
| | | | | | test/Regression/CBackend/2002-08-19-FunctionPointer.c in the process llvm-svn: 3392
* Output forward definitions of global vars to handle recursive intializers ↵Chris Lattner2002-08-191-19/+38
| | | | | | correctly. llvm-svn: 3391
* - Change constant printing to be better integrated with the rest of theChris Lattner2002-08-191-95/+126
| | | | | | | | CWriter class. Write directly to stream instead of building a big string, then writing it out. - Implement printing of ConstantPointerRefs llvm-svn: 3389
* Remove support for NOT instructionChris Lattner2002-08-141-6/+0
| | | | llvm-svn: 3320
* Avoid warning messageChris Lattner2002-07-251-0/+1
| | | | llvm-svn: 3085
* Fix anands changesChris Lattner2002-06-301-6/+4
| | | | llvm-svn: 2806
* added include<iostream> for cerrAnand Shukla2002-06-251-0/+1
| | | | llvm-svn: 2796
* changes to make it compatible with 64bit gccAnand Shukla2002-06-251-0/+1
| | | | llvm-svn: 2790
* * Update with MegaPatchChris Lattner2002-06-251-139/+125
| | | | | | * Fix various bugs llvm-svn: 2774
* * Fix typeoChris Lattner2002-05-211-1/+2
| | | | | | | * Provide a #include of <malloc.h> so that the sun C compiler does not miscompile malloc function calls llvm-svn: 2702
* Fix bug: test/Regression/CBackend/2002-05-21-MissingReturn.llChris Lattner2002-05-211-1/+3
| | | | llvm-svn: 2690
* Fix bug: test/Regression/CBackend/2002-05-16-NameCollide.ll by trackingChris Lattner2002-05-171-2/+24
| | | | | | | which global variables would have name collisions if they were not mangled, and use this info to mangle them iff they would collide. llvm-svn: 2639
* Last minor cleanups, this code still does not work for all cases, but itChris Lattner2002-05-091-18/+10
| | | | | | works much better than it used to. llvm-svn: 2588
* Two Cleanups to generated C code:Chris Lattner2002-05-091-35/+65
| | | | | | | | | | | | | | 1. Avoid printing *(&globalvariable), instead print globalvariable alone as a special case. 2. Inline subexpressions into expressions as much as legal that preserves execution characteristics of expressions. Now we get nice (but over-parenthesized, oh well) things like: ltmp_428_7 = spec__putc(((unsigned char )((bsBuff) >> 24)), (bsStream)); instead of five seperate instructions (bsBuff & bsStream are globals). llvm-svn: 2587
* * Remove CInstPrintVisitor class, incorporating it into the CWriter classChris Lattner2002-05-091-344/+300
| | | | | | * Reorder code in the file to make it more logically laid out. llvm-svn: 2586
* Remove CLocalVars data structure entirely, instead of building stuff andChris Lattner2002-05-091-28/+3
| | | | | | then printing it out, just print as we go. llvm-svn: 2585
* Simplify code by removing InstLocalVarsVisitor, replacing it with a simpleChris Lattner2002-05-091-62/+17
| | | | | | inst_iterator. llvm-svn: 2584
* * Clean up how PHI nodes are handledChris Lattner2002-05-091-54/+73
| | | | | | | | | | | | | | * Correct global variable references * Fix loads & stores with zero indices * Do not emit an else part of a branch if there is no code (no phi node and a fallthrough branch), makes code more readable to get: if (l2_cond240) { goto l13_bb10; } with no else{} branch llvm-svn: 2583
* Emit:Chris Lattner2002-05-091-2/+13
| | | | | | | | | | l3_reg109 = l81_this->field0; Instead of: l3_reg109 = l81_this[0u].field0; where possible llvm-svn: 2579
* * Print structures types correctlyChris Lattner2002-05-091-42/+70
| | | | | | | * Clean up generated code to not emit basic block labels and goto instructions if they are unneccesary (for example, fall throughs) llvm-svn: 2578
* * Continue cleanup of type printing codeChris Lattner2002-05-091-58/+45
| | | | | | | | * Print a newline after a malloc instruction * Convert unprintable characters to x_ instead of _x so that we don't generate identifiers that start with underscores llvm-svn: 2577
* Gut the type printing code so there is only one copy of it instead of 3Chris Lattner2002-05-091-296/+92
| | | | llvm-svn: 2576
OpenPOWER on IntegriCloud