aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Target/CBackend
Commit message (Collapse)AuthorAgeFilesLines
...
* TargetCacheInfo has been removed; its only uses were to propagate a constantBrian Gaeke2004-03-011-1/+0
| | | | | | | | | | (16) into certain areas of the SPARC V9 back-end. I'm fairly sure the US IIIi's dcache has 32-byte lines, so I'm not sure where the 16 came from. However, in the interest of not breaking things any more than they already are, I'm going to leave the constant alone. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12043 91177308-0d34-0410-b5e6-96231b3b80d8
* Fixes for PR258 and PR259.John Criswell2004-02-262-6/+6
| | | | | | | | | | Functions with linkonce linkage are declared with weak linkage. Global floating point constants used to represent unprintable values (such as NaN and infinity) are declared static so that they don't interfere with other CBE generated translation units. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11884 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix some unexpected fallout from the config.h changes. Because the CBE noChris Lattner2004-02-242-0/+2
| | | | | | | | longer was getting this #include, it always fell back on the less precise floating point initializer values, causing some testsuite failures. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11803 91177308-0d34-0410-b5e6-96231b3b80d8
* It is totally unacceptable to print out (literally) millions of zeros whenChris Lattner2004-02-202-4/+26
| | | | | | | compiling 129.compress... so don't! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11649 91177308-0d34-0410-b5e6-96231b3b80d8
* Now that the lowerinvoke pass inserts calls to llvm.setjmp/llvm.longjmp, someChris Lattner2004-02-152-4/+30
| | | | | | | | | hacks can be banished. Also, this gives us the opportunity to emit special code for the setjmp/longjmps which alows the elimination of one GCC warning for every setjmp/longjmp site (which is often THOUSANDS in C++ programs). Yaay! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11484 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for the new ConstantAggregateZero classChris Lattner2004-02-152-22/+78
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11473 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for the returnaddress and frameaddress intrinsicsChris Lattner2004-02-142-0/+24
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11433 91177308-0d34-0410-b5e6-96231b3b80d8
* Use intrinsic lowering like the rest of the backends. Get rid of crufty hackyChris Lattner2004-02-142-126/+80
| | | | | | | code that worked around problems in the mangler git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11426 91177308-0d34-0410-b5e6-96231b3b80d8
* Moved directory, update makefileChris Lattner2004-02-131-4/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11417 91177308-0d34-0410-b5e6-96231b3b80d8
* Convert the C backend into a target, for use with LLC. This allows us to useChris Lattner2004-02-133-60/+63
| | | | | | | the lowerallocations pass to eliminate malloc/free warnings and hackish code git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11409 91177308-0d34-0410-b5e6-96231b3b80d8
* Make the cwriter use the lowerinvoke pass so that it can either use ↵Chris Lattner2004-02-132-246/+96
| | | | | | | | | | | | "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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11405 91177308-0d34-0410-b5e6-96231b3b80d8
* Fine grainify namespacification, prune #includesChris Lattner2004-02-132-18/+8
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11369 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for memcpy and memmove intrinsics. Why isn't the cwriter usingChris Lattner2004-02-122-0/+36
| | | | | | | the intrinsiclowering code?? :( git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11362 91177308-0d34-0410-b5e6-96231b3b80d8
* Adjust to the changed StructType interface. In particular, ↵Chris Lattner2004-02-092-12/+8
| | | | | | getElementTypes() is gone. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11228 91177308-0d34-0410-b5e6-96231b3b80d8
* Start using the new and improve interface to FunctionType argumentsChris Lattner2004-02-092-26/+22
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11224 91177308-0d34-0410-b5e6-96231b3b80d8
* rename the "exceptional" destination of an invoke instruction to the ↵Chris Lattner2004-02-082-2/+2
| | | | | | 'unwind' dest git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11202 91177308-0d34-0410-b5e6-96231b3b80d8
* Turn off "attribute weak" to pacify Mac OS X's system compiler, which prints aBrian Gaeke2003-12-112-8/+50
| | | | | | | warning whenever it sees it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10391 91177308-0d34-0410-b5e6-96231b3b80d8
* Upon Chris's suggestion, moved the #ifdef's to the generated C code.John Criswell2003-12-102-16/+10
| | | | | | | This makes LLVM and the generated C code more portable. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10377 91177308-0d34-0410-b5e6-96231b3b80d8
* Fixed the CBE on Solaris/Sparc. We need to define the return value ofJohn Criswell2003-12-102-2/+16
| | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10375 91177308-0d34-0410-b5e6-96231b3b80d8
* output foo(void) as appropriateChris Lattner2003-11-262-0/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10232 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix bug in previous checkinChris Lattner2003-11-252-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10231 91177308-0d34-0410-b5e6-96231b3b80d8
* Do not depend on the gep index types to determine what flavor of index it isChris Lattner2003-11-252-36/+44
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10225 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix PR149 - support constant shift expressions.Brian Gaeke2003-11-222-0/+8
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10167 91177308-0d34-0410-b5e6-96231b3b80d8
* ISO 9899 7.13.2.1 (3) says that "[...] the values of objects of automaticChris Lattner2003-11-162-8/+78
| | | | | | | | | | | | | | 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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10035 91177308-0d34-0410-b5e6-96231b3b80d8
* Put all LLVM code into the llvm namespace, as per bug 109.Brian Gaeke2003-11-112-24/+32
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9903 91177308-0d34-0410-b5e6-96231b3b80d8
* Work around a bug in GCC where it can't handle common variables marked weak.Chris Lattner2003-11-032-2/+16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9679 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix bugs with attribute weak emissionChris Lattner2003-11-032-6/+12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9678 91177308-0d34-0410-b5e6-96231b3b80d8
* This simplifies the CWriter code, makes the generated code easier to read,Chris Lattner2003-11-032-22/+4
| | | | | | | and makes the output work with the intel compiler. Overall, a win. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9671 91177308-0d34-0410-b5e6-96231b3b80d8
* Eliminate the silly namedContext member of printTypeChris Lattner2003-11-032-16/+14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9666 91177308-0d34-0410-b5e6-96231b3b80d8
* The "correct" fix for CBackend/2003-10-23-UnusedType.ll is to not even tryChris Lattner2003-11-022-30/+48
| | | | | | | to emit types which are not used. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9647 91177308-0d34-0410-b5e6-96231b3b80d8
* Fail gracefully if we have a zero arg varargs functionChris Lattner2003-10-232-0/+12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9436 91177308-0d34-0410-b5e6-96231b3b80d8
* Added LLVM copyright notice to Makefiles.John Criswell2003-10-201-0/+8
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9312 91177308-0d34-0410-b5e6-96231b3b80d8
* Added LLVM project notice to the top of every C++ source file.John Criswell2003-10-202-0/+14
| | | | | | | Header files will be on the way. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9298 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for the new varargs intrinsics and instructionsChris Lattner2003-10-182-28/+46
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9226 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for 'weak' linkage.Chris Lattner2003-10-162-0/+8
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9171 91177308-0d34-0410-b5e6-96231b3b80d8
* Decrease usage of use_size()Chris Lattner2003-10-152-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9135 91177308-0d34-0410-b5e6-96231b3b80d8
* Do not allow fallthroughs in switch statements. This fixes PR37,Chris Lattner2003-10-132-2/+6
| | | | | | | 253.perlbmk, and test/Programs/SingleSource/UnitTests/2003-10-13-SwitchTest.c! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9101 91177308-0d34-0410-b5e6-96231b3b80d8
* Use the autoconf macro John wroteChris Lattner2003-10-132-12/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9095 91177308-0d34-0410-b5e6-96231b3b80d8
* * Spell "necessary" correctlyChris Lattner2003-10-122-6/+48
| | | | | | | | | | | | * 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!!!! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9052 91177308-0d34-0410-b5e6-96231b3b80d8
* * Be TBAA safeChris Lattner2003-10-122-64/+118
| | | | | | | | | | | * 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9048 91177308-0d34-0410-b5e6-96231b3b80d8
* A couple of minor code cleanups.Chris Lattner2003-10-052-42/+32
| | | | | | | Print literal doubles using ftostr instead of <<, because it yields higher precision numbers. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8855 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename Function::getEntryNode -> getEntryBlockChris Lattner2003-09-202-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8625 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix problems with programs that prototype printf to something unusualChris Lattner2003-09-152-4/+8
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8538 91177308-0d34-0410-b5e6-96231b3b80d8
* Fixed spelling and grammar.Misha Brukman2003-09-112-8/+8
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8489 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove a bunch of warnings from the CBE generated C codeChris Lattner2003-09-102-4/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8455 91177308-0d34-0410-b5e6-96231b3b80d8
* "the one true solution for compatibility with GCC 3.3+"Chris Lattner2003-09-102-6/+6
| | | | | | | ... or so I hope git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8454 91177308-0d34-0410-b5e6-96231b3b80d8
* Eliminate support for the llvm.unwind intrinisic, using the Unwind ↵Chris Lattner2003-09-082-26/+0
| | | | | | instruction instead git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8411 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for the unwind instructionChris Lattner2003-09-082-0/+28
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8408 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix really nasty bugs in the CWriter, handling invoke instructions. TrackingChris Lattner2003-08-282-4/+10
| | | | | | | these down was NOT phun. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8181 91177308-0d34-0410-b5e6-96231b3b80d8
* Simplify codeChris Lattner2003-08-242-6/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8139 91177308-0d34-0410-b5e6-96231b3b80d8