summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm2cpp/CppWriter.cpp
Commit message (Collapse)AuthorAgeFilesLines
* remove attributions from tools.Chris Lattner2007-12-291-2/+2
| | | | llvm-svn: 45421
* Fixing several transforms which would drop the collector attributeGordon Henriksen2007-12-251-0/+5
| | | | | | when copying functions. llvm-svn: 45356
* Change the PointerType api for creating pointer types. The old functionality ↵Christopher Lamb2007-12-171-1/+2
| | | | | | of PointerType::get() has become PointerType::getUnqual(), which returns a pointer in the generic address space. The new prototype of PointerType::get() requires both a type and an address space. llvm-svn: 45082
* Fix PR1146: parameter attributes are longer part ofDuncan Sands2007-11-271-37/+79
| | | | | | | | | | | | the function type, instead they belong to functions and function calls. This is an updated and slightly corrected version of Reid Spencer's original patch. The only known problem is that auto-upgrading of bitcode files doesn't seem to work properly (see test/Bitcode/AutoUpgradeIntrinsics.ll). Hopefully a bitcode guru (who might that be? :) ) will fix it. llvm-svn: 44359
* Make llvm2cpp better, patch for PR1794, contributed by Zack Rusin.Chris Lattner2007-11-131-8/+30
| | | | llvm-svn: 44051
* Revise previous patch per review comments.Dale Johannesen2007-09-121-2/+2
| | | | | | | Next round of x87 long double stuff. Getting close now, basically works. llvm-svn: 41875
* Add APInt interfaces to APFloat (allows directlyDale Johannesen2007-09-111-2/+2
| | | | | | | | | access to bits). Use them in place of float and double interfaces where appropriate. First bits of x86 long double constants handling (untested, probably does not work). llvm-svn: 41858
* Next round of APFloat changes.Dale Johannesen2007-09-061-9/+18
| | | | | | | | | | | | | | Use APFloat in UpgradeParser and AsmParser. Change all references to ConstantFP to use the APFloat interface rather than double. Remove the ConstantFP double interfaces. Use APFloat functions for constant folding arithmetic and comparisons. (There are still way too many places APFloat is just a wrapper around host float/double, but we're getting there.) llvm-svn: 41747
* Revert this because the interface hasn't been updated yet.David Greene2007-09-041-2/+2
| | | | llvm-svn: 41703
* Fix typo.David Greene2007-09-041-1/+1
| | | | llvm-svn: 41702
* Update GEP constructors to use an iterator interface to fixDavid Greene2007-09-041-3/+4
| | | | | | GLIBCXX_DEBUG issues. llvm-svn: 41697
* Update InvokeInst to work like CallInstDavid Greene2007-08-271-2/+1
| | | | llvm-svn: 41506
* Adjust for new CallInst constructor interface.Reid Spencer2007-08-021-6/+3
| | | | | | This fixes test/Feature/llvm2cpp.ll llvm-svn: 40714
* Emit correct linkage. Patch by Roman Samoilov.Anton Korobeynikov2007-07-111-2/+2
| | | | llvm-svn: 39751
* Fix PR1525:Reid Spencer2007-06-251-4/+10
| | | | | | | Use a better determinator for identifying constant array initializers that are or are not zero terminated and generate code appropriately. llvm-svn: 37720
* Fix PR1517:Reid Spencer2007-06-161-9/+10
| | | | | | | | Use SmallPtrSet instead of std::vector to eliminate duplicate uses in a function generated with -gen-function. This prevents the output from having multiple duplicate declarations of constants and gvals. llvm-svn: 37616
* Fix PR1516:Reid Spencer2007-06-161-2/+7
| | | | | | | When printing the uses of a function (-gen-function only), make sure to include the constants referenced by intializers of global variables. llvm-svn: 37615
* Call the correct function name. Patch from Stephane Letz.Nick Lewycky2007-06-161-1/+1
| | | | llvm-svn: 37614
* Commit first round work of PR1373. "noalias" is now fully supported inZhou Sheng2007-06-051-0/+2
| | | | | | | VMCore, BitCode, and Assembly. Documentation and test case paramattrs.ll updated also. llvm-svn: 37432
* For PR1146:Reid Spencer2007-04-221-5/+12
| | | | | | | | Make ParamAttrsList objects unique. You can no longer directly create or destroy them but instead must go through the ParamAttrsList::get() interface. llvm-svn: 36327
* Make the generated code for ConstantInt nicer.Reid Spencer2007-04-111-2/+2
| | | | llvm-svn: 35902
* Teach llvm2cpp about packed structure types.Reid Spencer2007-04-111-1/+2
| | | | llvm-svn: 35899
* Fix several bugs relating to changes in the LLVM IR API or just outrightReid Spencer2007-04-111-32/+27
| | | | | | | typos in the output. This is sufficient to get most of the llvm2cpp tests working again. llvm-svn: 35898
* Fix some issues with param attrs.Reid Spencer2007-04-111-1/+4
| | | | llvm-svn: 35894
* Add support for parameter attributes.Reid Spencer2007-04-111-1/+26
| | | | llvm-svn: 35893
* Make output for ConstantInt construction correct for any bitwidth.Reid Spencer2007-03-011-1/+2
| | | | llvm-svn: 34809
* Add missing break statements!Reid Spencer2007-02-161-12/+12
| | | | llvm-svn: 34341
* For PR1195:Reid Spencer2007-02-151-1/+1
| | | | | | | Change use of "packed" term to "vector" in comments, strings, variable names, etc. llvm-svn: 34300
* For PR1195:Reid Spencer2007-02-151-8/+8
| | | | | | | Rename PackedType -> VectorType, ConstantPacked -> ConstantVector, and PackedTyID -> VectorTyID. No functional changes. llvm-svn: 34293
* For PR411:Reid Spencer2007-02-051-2/+2
| | | | | | | | Adjust to changes in Module interface: getMainFunction() -> getFunction("main") getNamedFunction(X) -> getFunction(X) llvm-svn: 33922
* For PR411:Reid Spencer2007-02-051-1/+0
| | | | | | | | | | This patch replaces the SymbolTable class with ValueSymbolTable which does not support types planes. This means that all symbol names in LLVM must now be unique. The patch addresses the necessary changes to deal with this and removes code no longer needed as a result. This completes the bulk of the changes for this PR. Some cleanup patches will follow. llvm-svn: 33918
* For PR1136: Rename GlobalVariable::isExternal as isDeclaration to avoidReid Spencer2007-01-301-4/+4
| | | | | | confusion with external linkage types. llvm-svn: 33663
* Drop CSRET from here too.Nick Lewycky2007-01-281-1/+0
| | | | llvm-svn: 33604
* rename Type::isIntegral to Type::isInteger, eliminating the old Type::isInteger.Chris Lattner2007-01-151-3/+3
| | | | | | | | | rename Type::getIntegralTypeMask to Type::getIntegerTypeMask. This makes naming much more consistent. For example, there are now no longer any instances of IntegerType that are not considered isInteger! :) llvm-svn: 33225
* unbreak i1 constants with the cpp writer, eliminate special case.Chris Lattner2007-01-121-6/+2
| | | | llvm-svn: 33133
* For PR1064:Reid Spencer2007-01-121-27/+24
| | | | | | | | | | | | | | | | | | | | | | | Implement the arbitrary bit-width integer feature. The feature allows integers of any bitwidth (up to 64) to be defined instead of just 1, 8, 16, 32, and 64 bit integers. This change does several things: 1. Introduces a new Derived Type, IntegerType, to represent the number of bits in an integer. The Type classes SubclassData field is used to store the number of bits. This allows 2^23 bits in an integer type. 2. Removes the five integer Type::TypeID values for the 1, 8, 16, 32 and 64-bit integers. These are replaced with just IntegerType which is not a primitive any more. 3. Adjust the rest of LLVM to account for this change. Note that while this incremental change lays the foundation for arbitrary bit-width integers, LLVM has not yet been converted to actually deal with them in any significant way. Most optimization passes, for example, will still only deal with the byte-width integer types. Future increments will rectify this situation. llvm-svn: 33113
* Implement review feedback for the ConstantBool->ConstantInt merge. ChrisReid Spencer2007-01-121-1/+1
| | | | | | | | recommended that getBoolValue be replaced with getZExtValue and that get(bool) be replaced by get(const Type*, uint64_t). This implements those changes. llvm-svn: 33110
* Rename BoolTy as Int1Ty. Patch by Sheng Zhou.Reid Spencer2007-01-111-3/+3
| | | | llvm-svn: 33076
* For PR1043:Zhou Sheng2007-01-111-6/+7
| | | | | | | Merge ConstantIntegral and ConstantBool into ConstantInt. Remove ConstantIntegral and ConstantBool from LLVM. llvm-svn: 33073
* For PR411:Reid Spencer2007-01-061-8/+9
| | | | | | | | | Take an incremental step towards type plane elimination. This change separates types from values in the symbol tables by finally making use of the TypeSymbolTable class. This yields more natural interfaces for dealing with types and unclutters the SymbolTable class. llvm-svn: 32956
* For PR950:Reid Spencer2006-12-311-22/+14
| | | | | | Convert signed integer types to signless. llvm-svn: 32790
* For PR950:Reid Spencer2006-12-231-40/+97
| | | | | | | | This patch removes the SetCC instructions and replaces them with the ICmp and FCmp instructions. The SetCondInst instruction has been removed and been replaced with ICmpInst and FCmpInst. llvm-svn: 32751
* Remove a call to Type::isSigned().Reid Spencer2006-12-181-3/+1
| | | | llvm-svn: 32651
* Generate the correct cast opcode for constant expressions.Reid Spencer2006-12-121-2/+17
| | | | llvm-svn: 32461
* make all llvm tools call llvm_shutdown when they exit, static'ify some stuff.Chris Lattner2006-12-061-2/+3
| | | | | | With this change, I can now move -stats to print when llvm_shutdown is called. llvm-svn: 32250
* For PR950:Reid Spencer2006-11-271-4/+30
| | | | | | | | | | The long awaited CAST patch. This introduces 12 new instructions into LLVM to replace the cast instruction. Corresponding changes throughout LLVM are provided. This passes llvm-test, llvm/test, and SPEC CPUINT2000 with the exception of 175.vpr which fails only on a slight floating point output difference. llvm-svn: 31931
* For PR950:Reid Spencer2006-11-081-3/+6
| | | | | | | | This patch converts the old SHR instruction into two instructions, AShr (Arithmetic) and LShr (Logical). The Shr instructions now are not dependent on the sign of their operands. llvm-svn: 31542
* For PR786:Reid Spencer2006-11-021-2/+1
| | | | | | | | | | Turn on -Wunused and -Wno-unused-parameter. Clean up most of the resulting fall out by removing unused variables. Remaining warnings have to do with unused functions (I didn't want to delete code without review) and unused variables in generated code. Maintainers should clean up the remaining issues when they see them. All changes pass DejaGnu tests and Olden. llvm-svn: 31380
* For PR950:Reid Spencer2006-11-021-3/+9
| | | | | | Replace the REM instruction with UREM, SREM and FREM. llvm-svn: 31369
* For PR950:Reid Spencer2006-10-261-3/+9
| | | | | | | | Make necessary changes to support DIV -> [SUF]Div. This changes llvm to have three division instructions: signed, unsigned, floating point. The bytecode and assembler are bacwards compatible, however. llvm-svn: 31195
OpenPOWER on IntegriCloud