summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CWriter/Writer.cpp
Commit message (Collapse)AuthorAgeFilesLines
* CBackend now lives hereChris Lattner2004-02-131-1383/+0
| | | | llvm-svn: 11415
* Convert the C backend into a target, for use with LLC. This allows us to useChris Lattner2004-02-131-30/+12
| | | | | | the lowerallocations pass to eliminate malloc/free warnings and hackish code llvm-svn: 11409
* Make the cwriter use the lowerinvoke pass so that it can either use ↵Chris Lattner2004-02-131-123/+48
| | | | | | | | | | | "disabled exceptions" or "expensive exceptions" controlled by an option. Also refactor and eliminate a bunch of cruft. This is a temporary solution and causes millions of warnings to pour out of programs that use exceptions, but it should fix the problem with sparc and the 'write' declaration (PR190). Subsequent changes will make this stink much less llvm-svn: 11405
* Fine grainify namespacification, prune #includesChris Lattner2004-02-131-9/+4
| | | | llvm-svn: 11369
* Add support for memcpy and memmove intrinsics. Why isn't the cwriter usingChris Lattner2004-02-121-0/+18
| | | | | | the intrinsiclowering code?? :( llvm-svn: 11362
* Adjust to the changed StructType interface. In particular, ↵Chris Lattner2004-02-091-6/+4
| | | | | | getElementTypes() is gone. llvm-svn: 11228
* Start using the new and improve interface to FunctionType argumentsChris Lattner2004-02-091-13/+11
| | | | llvm-svn: 11224
* rename the "exceptional" destination of an invoke instruction to the ↵Chris Lattner2004-02-081-1/+1
| | | | | | 'unwind' dest llvm-svn: 11202
* Turn off "attribute weak" to pacify Mac OS X's system compiler, which prints aBrian Gaeke2003-12-111-4/+25
| | | | | | warning whenever it sees it. llvm-svn: 10391
* Upon Chris's suggestion, moved the #ifdef's to the generated C code.John Criswell2003-12-101-8/+5
| | | | | | This makes LLVM and the generated C code more portable. llvm-svn: 10377
* Fixed the CBE on Solaris/Sparc. We need to define the return value ofJohn Criswell2003-12-101-1/+8
| | | | | | | | 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
* output foo(void) as appropriateChris Lattner2003-11-261-0/+2
| | | | llvm-svn: 10232
* Fix bug in previous checkinChris Lattner2003-11-251-1/+1
| | | | llvm-svn: 10231
* Do not depend on the gep index types to determine what flavor of index it isChris Lattner2003-11-251-18/+22
| | | | llvm-svn: 10225
* Fix PR149 - support constant shift expressions.Brian Gaeke2003-11-221-0/+4
| | | | llvm-svn: 10167
* ISO 9899 7.13.2.1 (3) says that "[...] the values of objects of automaticChris Lattner2003-11-161-4/+39
| | | | | | | | | | | | | 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
* Put all LLVM code into the llvm namespace, as per bug 109.Brian Gaeke2003-11-111-12/+16
| | | | llvm-svn: 9903
* Work around a bug in GCC where it can't handle common variables marked weak.Chris Lattner2003-11-031-1/+8
| | | | llvm-svn: 9679
* Fix bugs with attribute weak emissionChris Lattner2003-11-031-3/+6
| | | | llvm-svn: 9678
* This simplifies the CWriter code, makes the generated code easier to read,Chris Lattner2003-11-031-11/+2
| | | | | | and makes the output work with the intel compiler. Overall, a win. llvm-svn: 9671
* Eliminate the silly namedContext member of printTypeChris Lattner2003-11-031-8/+7
| | | | llvm-svn: 9666
* The "correct" fix for CBackend/2003-10-23-UnusedType.ll is to not even tryChris Lattner2003-11-021-15/+24
| | | | | | to emit types which are not used. llvm-svn: 9647
* Fail gracefully if we have a zero arg varargs functionChris Lattner2003-10-231-0/+6
| | | | llvm-svn: 9436
* Added LLVM project notice to the top of every C++ source file.John Criswell2003-10-201-0/+7
| | | | | | Header files will be on the way. llvm-svn: 9298
* Add support for the new varargs intrinsics and instructionsChris Lattner2003-10-181-14/+23
| | | | llvm-svn: 9226
* Add support for 'weak' linkage.Chris Lattner2003-10-161-0/+4
| | | | llvm-svn: 9171
* Decrease usage of use_size()Chris Lattner2003-10-151-1/+1
| | | | llvm-svn: 9135
* Do not allow fallthroughs in switch statements. This fixes PR37,Chris Lattner2003-10-131-1/+3
| | | | | | 253.perlbmk, and test/Programs/SingleSource/UnitTests/2003-10-13-SwitchTest.c! llvm-svn: 9101
* Use the autoconf macro John wroteChris Lattner2003-10-131-6/+3
| | | | llvm-svn: 9095
* * Spell "necessary" correctlyChris Lattner2003-10-121-3/+24
| | | | | | | | | | | * 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
* * Be TBAA safeChris Lattner2003-10-121-32/+59
| | | | | | | | | | * 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
* A couple of minor code cleanups.Chris Lattner2003-10-051-21/+16
| | | | | | Print literal doubles using ftostr instead of <<, because it yields higher precision numbers. llvm-svn: 8855
* Rename Function::getEntryNode -> getEntryBlockChris Lattner2003-09-201-1/+1
| | | | llvm-svn: 8625
* Fix problems with programs that prototype printf to something unusualChris Lattner2003-09-151-2/+4
| | | | llvm-svn: 8538
* Fixed spelling and grammar.Misha Brukman2003-09-111-4/+4
| | | | llvm-svn: 8489
* Remove a bunch of warnings from the CBE generated C codeChris Lattner2003-09-101-2/+2
| | | | llvm-svn: 8455
* "the one true solution for compatibility with GCC 3.3+"Chris Lattner2003-09-101-3/+3
| | | | | | ... or so I hope llvm-svn: 8454
* Eliminate support for the llvm.unwind intrinisic, using the Unwind ↵Chris Lattner2003-09-081-13/+0
| | | | | | instruction instead llvm-svn: 8411
* Add support for the unwind instructionChris Lattner2003-09-081-0/+14
| | | | llvm-svn: 8408
* Fix really nasty bugs in the CWriter, handling invoke instructions. TrackingChris Lattner2003-08-281-2/+5
| | | | | | these down was NOT phun. llvm-svn: 8181
* Simplify codeChris Lattner2003-08-241-3/+1
| | | | llvm-svn: 8139
* Implement support for the unwind intrinsic in the CBEChris Lattner2003-08-241-0/+13
| | | | llvm-svn: 8116
* Add support for the sig(set|long)jmp intrinsicsChris Lattner2003-08-181-1/+4
| | | | llvm-svn: 7951
* Spell `necessary' correctly.Misha Brukman2003-08-181-2/+2
| | | | llvm-svn: 7944
* Stop annoying warnings about mismatched types with the argument of a freeChris Lattner2003-08-141-8/+24
| | | | | | implement more constant expressions so that 176.gcc compiles with the CBE llvm-svn: 7847
* The HAVE_JUMP code is dead, these intrinsics should _never_ be expandedChris Lattner2003-08-061-23/+6
| | | | llvm-svn: 7642
* Unbreak the CBE outputChris Lattner2003-07-311-2/+0
| | | | llvm-svn: 7453
* Modified the code so that it generates (0) for setjmp() and abort() forJohn Criswell2003-07-311-0/+18
| | | | | | | | 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
* Don't include llvm/SlotCalculator.h, or <set>.Brian Gaeke2003-07-251-3/+1
| | | | | | Move up the inclusion of llvm/Support/Mangler.h. llvm-svn: 7320
* Use unified CWriter-X86/Printer name mangler. Do not bother usingBrian Gaeke2003-07-241-71/+21
| | | | | | | 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
OpenPOWER on IntegriCloud