summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-upgrade/UpgradeParser.y
Commit message (Collapse)AuthorAgeFilesLines
* Remove llvm-upgrade.Tanya Lattner2008-04-071-3849/+0
| | | | llvm-svn: 49347
* Use Intrinsic::getDeclaration in more places.Duncan Sands2008-04-071-10/+7
| | | | llvm-svn: 49338
* Reimplement the parameter attributes support, phase #1. hilights:Chris Lattner2008-03-121-22/+13
| | | | | | | | | | | | | | | | | | | | | | | 1. There is now a "PAListPtr" class, which is a smart pointer around the underlying uniqued parameter attribute list object, and manages its refcount. It is now impossible to mess up the refcount. 2. PAListPtr is now the main interface to the underlying object, and the underlying object is now completely opaque. 3. Implementation details like SmallVector and FoldingSet are now no longer part of the interface. 4. You can create a PAListPtr with an arbitrary sequence of ParamAttrsWithIndex's, no need to make a SmallVector of a specific size (you can just use an array or scalar or vector if you wish). 5. All the client code that had to check for a null pointer before dereferencing the pointer is simplified to just access the PAListPtr directly. 6. The interfaces for adding attrs to a list and removing them is a bit simpler. Phase #2 will rename some stuff (e.g. PAListPtr) and do other less invasive changes. llvm-svn: 48289
* Split ParameterAttributes.h, putting the complicatedDale Johannesen2008-02-221-1/+1
| | | | | | | stuff into ParamAttrsList.h. Per feedback from ParamAttrs changes. llvm-svn: 47504
* remove attributionsChris Lattner2007-12-291-2/+2
| | | | llvm-svn: 45423
* Change the PointerType api for creating pointer types. The old functionality ↵Christopher Lamb2007-12-171-18/+21
| | | | | | 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
* Add a convenience method for modifying parameterDuncan Sands2007-11-301-1/+1
| | | | | | | | attributes. While there, I noticed that not all attribute methods returned a pointer-to-constant, so I fixed that. llvm-svn: 44457
* Fix PR1146: parameter attributes are longer part ofDuncan Sands2007-11-271-121/+37
| | | | | | | | | | | | 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
* Apply feedback from previous patch.Dale Johannesen2007-09-071-0/+1
| | | | llvm-svn: 41774
* Next round of APFloat changes.Dale Johannesen2007-09-061-5/+13
| | | | | | | | | | | | | | 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
* Update GEP constructors to use an iterator interface to fixDavid Greene2007-09-041-4/+5
| | | | | | GLIBCXX_DEBUG issues. llvm-svn: 41697
* Update InvokeInst to work like CallInstDavid Greene2007-08-271-2/+3
| | | | llvm-svn: 41506
* Make this code more efficientDavid Greene2007-08-071-4/+5
| | | | llvm-svn: 40899
* This is the patch to provide clean intrinsic function overloading support in ↵Chandler Carruth2007-08-041-28/+0
| | | | | | | | LLVM. It cleans up the intrinsic definitions and generally smooths the process for more complicated intrinsic writing. It will be used by the upcoming atomic intrinsics as well as vector and float intrinsics in the future. This also changes the syntax for llvm.bswap, llvm.part.set, llvm.part.select, and llvm.ct* intrinsics. They are automatically upgraded by both the LLVM ASM reader and the bitcode reader. The test cases have been updated, with special tests added to ensure the automatic upgrading is supported. llvm-svn: 40807
* New CallInst interface to address GLIBCXX_DEBUG errors caused byDavid Greene2007-08-011-8/+9
| | | | | | | | indexing an empty std::vector. Updates to all clients. llvm-svn: 40660
* For PR1146:Reid Spencer2007-04-221-34/+56
| | | | | | | | 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
* For PR1336:Reid Spencer2007-04-161-0/+5
| | | | | | | Functions without names deserve to be created too. This fixes: test/CodeGen/Generic/vector-constantexpr.ll llvm-svn: 36105
* For PR1336:Reid Spencer2007-04-161-3/+4
| | | | | | | When upgrading global vars, look for conflicts with functions as well. This fixes test/Transforms/GlobalDCE/2002-08-17-FunctionDGE.ll llvm-svn: 36103
* For PR1336:Reid Spencer2007-04-161-39/+66
| | | | | | | | | Rewrite the upgrade of GEP indices to be a little less obtuse. This fixes test/Assembler/2002-08-19-BytecodeReader.llx test/Assembler/2003-08-21-ConstantExprCast-Fold.llx test/Assembler/2004-01-11-getelementptrfolding.llx llvm-svn: 36095
* Fix a crash-by-unknown-exception caused by attempting to use a null pointerReid Spencer2007-04-111-1/+2
| | | | | | as the key for a map insertion. llvm-svn: 35896
* For PR1146:Reid Spencer2007-04-111-8/+8
| | | | | | | Put the parameter attributes in their own ParamAttr name space. Adjust the rest of llvm as a result. llvm-svn: 35877
* For PR1146:Reid Spencer2007-04-091-25/+41
| | | | | | Adapt handling of parameter attributes to use ParamAttrsList class. llvm-svn: 35812
* For PR1312:Reid Spencer2007-04-071-2/+8
| | | | | | | | For the short CALL/INVOKE syntax, the signedness of the result type is two extractions away from the type argument because its a POINTER to function type, not a function type. llvm-svn: 35735
* Upgrade the bit count intrinsics to have an i32 result.Reid Spencer2007-04-021-0/+19
| | | | llvm-svn: 35578
* Don't upgrade functions that look like a bswap intrinsic but aren't.Reid Spencer2007-04-021-1/+1
| | | | llvm-svn: 35570
* Handle upgrade of llvm.bswap.iXX to llvm.bswap.iXX.iXX per new namingReid Spencer2007-04-021-30/+47
| | | | | | rules for overloaded intrinsic functions. llvm-svn: 35565
* Unbreak non-debug builds.Evan Cheng2007-03-221-0/+2
| | | | llvm-svn: 35264
* For PR1243:Reid Spencer2007-03-211-14/+10
| | | | | | | Okay, really fix it this time. Make sure the CurFun.Linkage is set early and consolidate some duplicate code. llvm-svn: 35236
* For PR1256:Reid Spencer2007-03-211-217/+538
| | | | | | | | | | | | | | | | | | Make Signedness information pervasive throughout all types and values. There is no easy way to get around this. Because the GEP instruction can index through an arbitrarily complex value structure, it is necessary to keep track of signedness information throughout that structure. This change makes Signedness a full class, capable of representing Signedness in arbitrarily shaped types. The class is then used throughout llvm-upgrade to track signedness and differentiate between globals, locals, and functions based on their signedness. For PR1243: This patch also removes bogus warnings about renaming internal globals. It now only emits such warnings when renaming non-internal globals because they may affect linkage. llvm-svn: 35234
* Revert last changes as they introduced other problems.Reid Spencer2007-03-151-101/+49
| | | | llvm-svn: 35115
* The sign information was not propagating into the rename map so only theReid Spencer2007-03-141-49/+101
| | | | | | | | | | | | | last entry stored in the map could be retrieved for a given integer type. Propagating the sign information required an invasive change to ensure that all ValueRef (ValID) instances get the right sign information as well. Also, put in some assertions to ensure the RenameMap always gives us out the type that is expected. This fixes PR1256 and test/Assembler/2007-03-14-UgpradeLocalSignless.ll llvm-svn: 35112
* Make older versions of bison happy.Jeff Cohen2007-03-141-1/+1
| | | | llvm-svn: 35099
* remove use of deprecated apiChris Lattner2007-02-191-1/+1
| | | | llvm-svn: 34416
* For PR1195:Reid Spencer2007-02-151-4/+4
| | | | | | | Change use of "packed" term to "vector" in comments, strings, variable names, etc. llvm-svn: 34300
* For PR1195:Reid Spencer2007-02-151-22/+22
| | | | | | | Rename PackedType -> VectorType, ConstantPacked -> ConstantVector, and PackedTyID -> VectorTyID. No functional changes. llvm-svn: 34293
* remove use of vector-related ctorsChris Lattner2007-02-131-5/+5
| | | | llvm-svn: 34224
* stop using me thods that take a vectorChris Lattner2007-02-121-2/+2
| | | | llvm-svn: 34206
* add #includeChris Lattner2007-02-111-0/+1
| | | | llvm-svn: 34187
* For PR1187:Reid Spencer2007-02-081-11/+20
| | | | | | Rename function scope names that conflict with basic block names. llvm-svn: 34048
* For PR1187:Reid Spencer2007-02-081-4/+18
| | | | | | | | | Always rename, never give a redef error. We could check for collapsed type planes and generate an error if that's not the cause, but the 99.9999 percentile case will be that its the result of collapsed type planes. So, rather than doing an expensive check, just rename. llvm-svn: 34047
* For PR1187:Reid Spencer2007-02-081-252/+276
| | | | | | | | | | | | | Some changes to get the smbd.ll test case working: 1. Move the logic for CSRETCC->sret attribute out of the ResolveDefinitions code and into getExistingValue. This resolves it much earlier and works in function scope as well. 2. Fix handling of CSRETCC->sret for the store instruction. 3. Rewrite the code for handling renaming to factor in linkage types. 4. Rename a structure filed for a PATypeInfo* so it doesn't get confused with a field for a Type*. llvm-svn: 34043
* For PR1187:Reid Spencer2007-02-081-5/+29
| | | | | | | When a naming conflict arises, allow internal linkage functions to be renamed without warning or error. llvm-svn: 34024
* For PR411:Reid Spencer2007-02-051-6/+6
| | | | | | | | Adjust to changes in Module interface: getMainFunction() -> getFunction("main") getNamedFunction(X) -> getFunction(X) llvm-svn: 33922
* For PR411:Reid Spencer2007-02-051-39/+56
| | | | | | | | | | 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 PR1151:Reid Spencer2007-02-041-1/+0
| | | | | | | | | Make llvm-upgrade valgrind clean. Deleting type instances is a really nasty thing to do to LLVM. This was a hold-over from the re-write. This fixes test/Assembler/2007-01-22-UpgradeTypeMapInvalidMemory.ll and potentially many other bugs. llvm-svn: 33858
* Changes to support making the shift instructions be true BinaryOperators.Reid Spencer2007-02-021-22/+28
| | | | | | | | | | | | This feature is needed in order to support shifts of more than 255 bits on large integer types. This changes the syntax for llvm assembly to make shl, ashr and lshr instructions look like a binary operator: shl i32 %X, 1 instead of shl i32 %X, i8 1 Additionally, this should help a few passes perform additional optimizations. llvm-svn: 33776
* For PR1136: Rename GlobalVariable::isExternal as isDeclaration to avoidReid Spencer2007-01-301-2/+2
| | | | | | confusion with external linkage types. llvm-svn: 33663
* For PR1142:Reid Spencer2007-01-291-4/+39
| | | | | | | | | | When an unresolved definition is found, check to see if it is only unresolved because the csretcc was upgraded to the sret param attribute. Such changes change the function type and lead to unresolved definitions. In such cases, just cast the function to the type expected by the CallInst. That is, cast to the version of the function that has the sret param attribute. llvm-svn: 33623
* Upgrade old csret calling convention into sret parameter attribute.Reid Spencer2007-01-291-15/+53
| | | | llvm-svn: 33614
* Merge error at my side. Fixed.Anton Korobeynikov2007-01-281-10/+62
| | | | llvm-svn: 33601
OpenPOWER on IntegriCloud