summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/CBackend
Commit message (Collapse)AuthorAgeFilesLines
...
* Reapply my previous asmprinter changes now with more testing and two Chris Lattner2009-07-141-1/+1
| | | | | | | | | | | | | | | | | | | | additional bug fixes: 1. The bug that everyone hit was a problem in the asmprinter where it would remove $stub but keep the L prefix on a name when emitting the indirect symbol. This is easy to fix by keeping the name of the stub and the name of the symbol in a StringMap instead of just keeping a StringSet and trying to reconstruct it late. 2. There was a problem printing the personality function. The current logic to print out the personality function from the DWARF information is a bit of a cesspool right now that duplicates a bunch of other logic in the asm printer. The short version of it is that it depends on emitting both the L and _ prefix for symbols (at least on darwin) and until I can untangle it, it is best to switch the mangler back to emitting both prefixes. llvm-svn: 75646
* llvm_unreachable->llvm_unreachable(0), LLVM_UNREACHABLE->llvm_unreachable.Torok Edwin2009-07-141-22/+22
| | | | | | | | | This adds location info for all llvm_unreachable calls (which is a macro now) in !NDEBUG builds. In NDEBUG builds location info and the message is off (it only prints "UREACHABLE executed"). llvm-svn: 75640
* Revert r7561{9,8,7,6}, which depend on r75610. Daniel Dunbar2009-07-141-1/+1
| | | | | | | | | | | | | | | | | | --- Reverse-merging r75619 into '.': U lib/Target/DarwinTargetAsmInfo.cpp U lib/CodeGen/AsmPrinter/AsmPrinter.cpp --- Reverse-merging r75618 into '.': U lib/CodeGen/ELFWriter.cpp U lib/CodeGen/MachOCodeEmitter.cpp U lib/CodeGen/MachOWriter.cpp --- Reverse-merging r75617 into '.': U lib/Target/CBackend/CBackend.cpp --- Reverse-merging r75616 into '.': U tools/bugpoint/Miscompilation.cpp U tools/lto/LTOCodeGenerator.cpp U tools/lto/LTOModule.cpp llvm-svn: 75638
* rename getValueName -> getMangledNameChris Lattner2009-07-141-1/+1
| | | | llvm-svn: 75617
* fix CBE & MSIL backends to not use the mangler for non-global symbols.Chris Lattner2009-07-131-24/+29
| | | | llvm-svn: 75556
* These don't really need contexts either.Owen Anderson2009-07-131-2/+2
| | | | llvm-svn: 75528
* Begin the painful process of tearing apart the rat'ss nest that is ↵Owen Anderson2009-07-131-6/+6
| | | | | | | | | Constants.cpp and ConstantFold.cpp. This involves temporarily hard wiring some parts to use the global context. This isn't ideal, but it's the only way I could figure out to make this process vaguely incremental. llvm-svn: 75445
* assert(0) -> LLVM_UNREACHABLE.Torok Edwin2009-07-111-13/+13
| | | | | | | | | Make llvm_unreachable take an optional string, thus moving the cerr<< out of line. LLVM_UNREACHABLE is now a simple wrapper that makes the message go away for NDEBUG builds. llvm-svn: 75379
* Implement changes from Chris's feedback.Torok Edwin2009-07-081-18/+36
| | | | | | Finish converting lib/Target. llvm-svn: 75043
* Privatize some variables.Owen Anderson2009-06-261-5/+4
| | | | llvm-svn: 74315
* Provide InitializeAllTargets and InitializeNativeTarget functions in theBob Wilson2009-06-231-4/+2
| | | | | | | | C bindings. Change all the backend "Initialize" functions to have C linkage. Change the "llvm/Config/Targets.def" header to use C-style comments to avoid compile warnings. llvm-svn: 74026
* It looks like nobody is working on PR 4158, so I'mDale Johannesen2009-06-181-0/+11
| | | | | | | | | adding a check to catch this case at compile time instead of quietly generating incorrect code. That will at least let us identify CBE failures that are not due to this problem. llvm-svn: 73668
* Introduce new headers whose inclusion forces linking andDouglas Gregor2009-06-161-0/+5
| | | | | | | | | initialization of all targets (InitializeAllTargets.h) or assembler printers (InitializeAllAsmPrinters.h). This is a step toward the elimination of relinked object files, so that we can build normal archives. llvm-svn: 73543
* Fix an erroneous check for isFNeg; the FNeg case is handledDan Gohman2009-06-041-1/+1
| | | | | | a few lines later on. llvm-svn: 72904
* Split the Add, Sub, and Mul instruction opcodes into separateDan Gohman2009-06-041-15/+20
| | | | | | | | | | | | | | | integer and floating-point opcodes, introducing FAdd, FSub, and FMul. For now, the AsmParser, BitcodeReader, and IRBuilder all preserve backwards compatability, and the Core LLVM APIs preserve backwards compatibility for IR producers. Most front-ends won't need to change immediately. This implements the first step of the plan outlined here: http://nondot.org/sabre/LLVMNotes/IntegerOverflow.txt llvm-svn: 72897
* Spacing fix.Dale Johannesen2009-05-191-1/+1
| | | | llvm-svn: 72083
* Rename PaddedSize to AllocSize, in the hope that thisDuncan Sands2009-05-091-2/+2
| | | | | | | will make it more obvious what it represents, and stop it being confused with the StoreSize. llvm-svn: 71349
* Instead of passing in an unsigned value for the optimization level, use an enum,Bill Wendling2009-04-292-2/+2
| | | | | | | which better identifies what the optimization is doing. And is more flexible for future uses. llvm-svn: 70440
* Second attempt:Bill Wendling2009-04-292-2/+3
| | | | | | | | | | | | Massive check in. This changes the "-fast" flag to "-O#" in llc. If you want to use the old behavior, the flag is -O0. This change allows for finer-grained control over which optimizations are run at different -O levels. Most of this work was pretty mechanical. The majority of the fixes came from verifying that a "fast" variable wasn't used anymore. The JIT still uses a "Fast" flag. I'll change the JIT with a follow-up patch. llvm-svn: 70343
* r70270 isn't ready yet. Back this out. Sorry for the noise.Bill Wendling2009-04-282-3/+2
| | | | llvm-svn: 70275
* Massive check in. This changes the "-fast" flag to "-O#" in llc. If you want toBill Wendling2009-04-282-2/+3
| | | | | | | | | | | use the old behavior, the flag is -O0. This change allows for finer-grained control over which optimizations are run at different -O levels. Most of this work was pretty mechanical. The majority of the fixes came from verifying that a "fast" variable wasn't used anymore. The JIT still uses a "Fast" flag. I'm not 100% sure if it's necessary to change it there... llvm-svn: 70270
* Match C backend only if it explicitly requested.Devang Patel2009-04-201-2/+3
| | | | llvm-svn: 69613
* Fix some failures in targets on available_externally functions,Chris Lattner2009-04-171-0/+5
| | | | | | | this fixes a crash on CodeGen/Generic/externally_available.ll on ppc hosts. Thanks to Nicholas L for pointing this out. llvm-svn: 69333
* Fix internal representation of fp80 to be theDale Johannesen2009-03-231-3/+2
| | | | | | | | | | same as a normal i80 {low64, high16} rather than its own {high64, low16}. A depressing number of places know about this; I think I got them all. Bitcode readers and writers convert back to the old form to avoid breaking compatibility. llvm-svn: 67562
* Add the private linkage.Rafael Espindola2009-01-151-3/+3
| | | | llvm-svn: 62279
* fix memleaksNuno Lopes2009-01-131-0/+2
| | | | llvm-svn: 62198
* Rename getABITypeSize to getTypePaddedSize, asDuncan Sands2009-01-121-2/+2
| | | | | | suggested by Chris. llvm-svn: 62099
* Removed trailing whitespace from Makefiles.Misha Brukman2009-01-091-2/+2
| | | | llvm-svn: 61991
* __fastcall and __stdcall are mingw extensions to gcc for windows. Use theNick Lewycky2008-11-261-2/+2
| | | | | | __attribute__ notation which is supported on more platforms. llvm-svn: 60083
* Adds extern "C" ints to the .cpp files that use RegisterTarget, asOscar Fuentes2008-11-151-0/+8
| | | | | | | | | | | well as 2 files that use "Registrator"s. These are to be used by the MSVC builds, as the Win32 linker does not include libs that are otherwise unreferenced, even if global constructors in the lib have side-effects. Patch by Scott Graham! llvm-svn: 59378
* Fix PR2907 by digging through constant expressions to find FP constants thatChris Lattner2008-10-221-42/+63
| | | | | | are their operands. llvm-svn: 57956
* add some simple hacky long double support for the CBE. ThisChris Lattner2008-10-171-5/+15
| | | | | | | should work for intel long double, but ppc long double aborts in convert. llvm-svn: 57672
* Fix command-line option printing to print two spaces where needed,Dan Gohman2008-10-141-1/+1
| | | | | | | | | instead of requiring all "short description" strings to begin with two spaces. This makes these strings less mysterious, and it fixes some cases where short description strings mistakenly did not begin with two spaces. llvm-svn: 57521
* Add a "loses information" return value to APFloat::convertDale Johannesen2008-10-091-1/+2
| | | | | | | and APFloat::convertToInteger. Restore return value to IEEE754. Adjust all users accordingly. llvm-svn: 57329
* Rename APFloat::convertToAPInt to bitcastToAPInt toDale Johannesen2008-10-091-4/+4
| | | | | | | make it clearer what the function does. No functional change. llvm-svn: 57325
* CMake: Builds all examples. Corrected name of CBackend target.Oscar Fuentes2008-09-261-1/+1
| | | | llvm-svn: 56682
* CMake: Builds all targets.Oscar Fuentes2008-09-261-0/+3
| | | | llvm-svn: 56641
* Large mechanical patch.Devang Patel2008-09-251-24/+24
| | | | | | | | | | | | | | | s/ParamAttr/Attribute/g s/PAList/AttrList/g s/FnAttributeWithIndex/AttributeWithIndex/g s/FnAttr/Attribute/g This sets the stage - to implement function notes as function attributes and - to distinguish between function attributes and return value attributes. This requires corresponding changes in llvm-gcc and clang. llvm-svn: 56622
* Tidy up several unbeseeming casts from pointer to intptr_t.Dan Gohman2008-09-041-2/+2
| | | | llvm-svn: 55779
* unbreak the CBE on treeadd an many others.Chris Lattner2008-08-211-2/+2
| | | | llvm-svn: 55112
* Use raw_ostream throughout the AsmPrinter.Owen Anderson2008-08-212-20/+184
| | | | llvm-svn: 55092
* Rename some GC classes so that their roll will hopefully be clearer.Gordon Henriksen2008-08-171-1/+1
| | | | | | | | | | | | | | | | | | In particular, Collector was confusing to implementors. Several thought that this compile-time class was the place to implement their runtime GC heap. Of course, it doesn't even exist at runtime. Specifically, the renames are: Collector -> GCStrategy CollectorMetadata -> GCFunctionInfo CollectorModuleMetadata -> GCModuleInfo CollectorRegistry -> GCRegistry Function::getCollector -> getGC (setGC, hasGC, clearGC) Several accessors and nested types have also been renamed to be consistent. These changes should be obvious. llvm-svn: 54899
* Avoid emitting casts in static initializer contexts. This fixesDan Gohman2008-07-241-65/+62
| | | | | | large numbers of CBE regressions caused by r53958. llvm-svn: 53990
* Use C99 aggregate literal syntax for first-class struct and array values.Dan Gohman2008-07-231-0/+8
| | | | | | This fixes several recent CBE regressions. llvm-svn: 53958
* Enable first-class aggregates support.Dan Gohman2008-07-231-13/+0
| | | | | | | | | | | | Remove the GetResultInst instruction. It is still accepted in LLVM assembly and bitcode, where it is now auto-upgraded to ExtractValueInst. Also, remove support for return instructions with multiple values. These are auto-upgraded to use InsertValueInst instructions. The IRBuilder still accepts multiple-value returns, and auto-upgrades them to InsertValueInst instructions. llvm-svn: 53941
* In the CBackend, use casts to force integer add, subtract, andDan Gohman2008-07-181-0/+28
| | | | | | | multiply to be done as unsigned, so that they have well defined behavior on overflow. This fixes PR2408. llvm-svn: 53767
* Make LLVM compile on DragonFly BSD (PR2499).Matthijs Kooijman2008-06-261-1/+1
| | | | | | Patch by Hasso Tepper! llvm-svn: 52781
* Switch from generating the int128 typedefs based on targetdata to generatingChris Lattner2008-06-161-6/+4
| | | | | | them based on the end-compiler's capabilities. This fixes PR2453 llvm-svn: 52297
* Revert r52046. It broke cbe on x86 / Mac OS X.Evan Cheng2008-06-071-21/+6
| | | | llvm-svn: 52071
* Handle assembler identifiers specially in CBE. This fixes PR2418.Anton Korobeynikov2008-06-061-6/+21
| | | | llvm-svn: 52046
OpenPOWER on IntegriCloud