summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/CppBackend/CPPBackend.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Update for GlobalVariables ctor change.Owen Anderson2009-07-101-3/+2
| | | | llvm-svn: 75251
* Missed an exit during the conversion.Torok Edwin2009-07-081-2/+2
| | | | | | | Will convert assert(0) that don't have abort() to LLVM_UNREACHABLE in a later commit. llvm-svn: 75045
* Escape the name of the module since it comes from the file name and may includeNick Lewycky2009-06-261-2/+6
| | | | | | invalid characters like backslashes on Windows. Patch by James Abbatiello! llvm-svn: 74265
* 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
* 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
* Split the Add, Sub, and Mul instruction opcodes into separateDan Gohman2009-06-041-0/+9
| | | | | | | | | | | | | | | 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
* This patch brings the list of attributes in CPPBackend.cpp up to date with theJeffrey Yasskin2009-05-281-3/+8
| | | | | | | list in Attributes.h. It also reorders the CPPBackend list to match so that it's easier to see that it's complete. llvm-svn: 72510
* Fix code emission for conditional branches.Anton Korobeynikov2009-05-041-2/+2
| | | | | | Patch by Collin Winter! llvm-svn: 70898
* 'The attached patch fixes an issue where llc -march=cpp fails withChris Lattner2009-05-011-3/+4
| | | | | | | "Invalid primitive type" on input containing the x86_fp80 type.' Patch by Collin Winter! llvm-svn: 70610
* remove progname which is never set. PR4085Chris Lattner2009-04-301-2/+1
| | | | llvm-svn: 70453
* Instead of passing in an unsigned value for the optimization level, use an enum,Bill Wendling2009-04-291-1/+1
| | | | | | | which better identifies what the optimization is doing. And is more flexible for future uses. llvm-svn: 70440
* Second attempt:Bill Wendling2009-04-291-1/+1
| | | | | | | | | | | | 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-281-1/+1
| | | | llvm-svn: 70275
* Massive check in. This changes the "-fast" flag to "-O#" in llc. If you want toBill Wendling2009-04-281-1/+1
| | | | | | | | | | | 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
* Add a new "available_externally" linkage type. This is intendedChris Lattner2009-04-131-0/+2
| | | | | | | | to support C99 inline, GNU extern inline, etc. Related bugzilla's include PR3517, PR3100, & PR2933. Nothing uses this yet, but it appears to work. llvm-svn: 68940
* do not rely on callee being operand 0Gabor Greif2009-03-251-1/+1
| | | | llvm-svn: 67681
* Now that errs() is properly non-buffered, there's no need toDan Gohman2009-03-231-1/+0
| | | | | | explicitly flush it. llvm-svn: 67526
* It makes no sense to have a ODR version of commonDuncan Sands2009-03-111-4/+2
| | | | | | linkage, so remove it. llvm-svn: 66690
* Remove the one-definition-rule version of extern_weakDuncan Sands2009-03-111-4/+2
| | | | | | | linkage: this linkage type only applies to declarations, but ODR is only relevant to globals with definitions. llvm-svn: 66650
* Introduce new linkage types linkonce_odr, weak_odr, common_odrDuncan Sands2009-03-071-8/+16
| | | | | | | | | | | | | | | | | | | | | and extern_weak_odr. These are the same as the non-odr versions, except that they indicate that the global will only be overridden by an *equivalent* global. In C, a function with weak linkage can be overridden by a function which behaves completely differently. This means that IP passes have to skip weak functions, since any deductions made from the function definition might be wrong, since the definition could be replaced by something completely different at link time. This is not allowed in C++, thanks to the ODR (One-Definition-Rule): if a function is replaced by another at link-time, then the new function must be the same as the original function. If a language knows that a function or other global can only be overridden by an equivalent global, it can give it the weak_odr linkage type, and the optimizers will understand that it is alright to make deductions based on the function body. The code generators on the other hand map weak and weak_odr linkage to the same thing. llvm-svn: 66339
* Add the private linkage.Rafael Espindola2009-01-151-0/+2
| | | | llvm-svn: 62279
* make -march=cpp handle the nocapture attribute, make it assert if itChris Lattner2009-01-131-22/+19
| | | | | | sees attributes it doesn't know. llvm-svn: 62155
* Update CPP backend for PrintModulePass API changes.Dan Gohman2008-12-081-4/+4
| | | | llvm-svn: 60690
* 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
* Typo fixAnton Korobeynikov2008-11-091-1/+1
| | | | llvm-svn: 58928
* The Index field of an AttributeWithIndex is of type unsigned, not uint16_t.Nicolas Geoffray2008-11-081-2/+2
| | | | llvm-svn: 58908
* StoreInst does not produce any result thus it's useless to create newAnton Korobeynikov2008-11-081-1/+1
| | | | | | | variable for it. This greatly reduces amount of unused variables in llvm2cpp-generated code llvm-svn: 58905
* 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-2/+3
| | | | | | | make it clearer what the function does. No functional change. llvm-svn: 57325
* Emit type-correct constant null. Also fix a typo.Anton Korobeynikov2008-10-051-7/+3
| | | | | | Patch by Robert G. Jakabosky! llvm-svn: 57110
* Large mechanical patch.Devang Patel2008-09-251-34/+34
| | | | | | | | | | | | | | | 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
* s/ParamAttrsWithIndex/FnAttributeWithIndex/gDevang Patel2008-09-241-2/+2
| | | | llvm-svn: 56535
* s/ParameterAttributes/Attributes/gDevang Patel2008-09-231-1/+1
| | | | llvm-svn: 56513
* Tidy up several unbeseeming casts from pointer to intptr_t.Dan Gohman2008-09-041-1/+1
| | | | llvm-svn: 55779
* Use raw_ostream throughout the AsmPrinter.Owen Anderson2008-08-211-10/+11
| | | | llvm-svn: 55092
* Unbreak cpp backend: upgrade output due to change in APInt APIAnton Korobeynikov2008-08-181-1/+2
| | | | llvm-svn: 54942
* Rename some GC classes so that their roll will hopefully be clearer.Gordon Henriksen2008-08-171-2/+2
| | | | | | | | | | | | | | | | | | 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
* Rework the routines that convert AP[S]Int into a string. Now, instead ofChris Lattner2008-08-171-2/+2
| | | | | | | | | | | | | | | | | returning an std::string by value, it fills in a SmallString/SmallVector passed in. This significantly reduces string thrashing in some cases. More specifically, this: - Adds an operator<< and a print method for APInt that allows you to directly send them to an ostream. - Reimplements APInt::toString to be much simpler and more efficient algorithmically in addition to not thrashing strings quite as much. This speeds up llvm-dis on kc++ by 7%, and may also slightly speed up the asmprinter. This also fixes a bug I introduced into the asmwriter in a previous patch w.r.t. alias printing. llvm-svn: 54873
* Remove <iostream> include.Bill Wendling2008-07-271-2/+2
| | | | llvm-svn: 54131
* CPPBackend support for extractvalue and insertvalue.Dan Gohman2008-06-091-0/+34
| | | | llvm-svn: 52147
* Abort on an unrecognized opcode.Dan Gohman2008-06-091-0/+4
| | | | llvm-svn: 52146
* Update the CPP backend for the ConstantFP::get API change.Dan Gohman2008-06-091-4/+0
| | | | llvm-svn: 52144
* API change for {BinaryOperator|CmpInst|CastInst}::create*() --> Create. ↵Gabor Greif2008-05-161-1/+1
| | | | | | Legacy interfaces will be in place for some time. (Merge from use-diet branch.) llvm-svn: 51200
* Add CommonLinkage; currently tentative definitionsDale Johannesen2008-05-141-0/+2
| | | | | | | | | | are represented as "weak", but there are subtle differences in some cases on Darwin, so we need both. The intent is that "common" will behave identically to "weak" unless somebody changes their target to do something else. No functional change as yet. llvm-svn: 51118
* Fix typo in ParameterAttribute fields usage. Add an includeNicolas Geoffray2008-05-141-2/+3
| | | | | | to make the Cpp backend output compilable. llvm-svn: 51095
* Clean up the use of static and anonymous namespaces. This turned upDan Gohman2008-05-131-3/+3
| | | | | | | several things that were neither in an anonymous namespace nor static but not intended to be global. llvm-svn: 51017
* Don't do stupid things: doInitialization(Module&) is not applicable to ↵Anton Korobeynikov2008-04-291-17/+2
| | | | | | ModulePass :) llvm-svn: 50433
* Drop dead includesAnton Korobeynikov2008-04-231-3/+0
| | | | llvm-svn: 50192
* Adjust option names for C++ backendAnton Korobeynikov2008-04-231-11/+11
| | | | llvm-svn: 50190
OpenPOWER on IntegriCloud