summaryrefslogtreecommitdiffstats
path: root/llvm/lib/VMCore/Verifier.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix minor doxygen nits.Reid Spencer2007-08-051-0/+10
| | | | llvm-svn: 40854
* This is the patch to provide clean intrinsic function overloading support in ↵Chandler Carruth2007-08-041-66/+67
| | | | | | | | 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
* After a discussion with Anton, it turns out that the InReg attribute is notReid Spencer2007-07-311-1/+2
| | | | | | permitted on function results. So, revert the last patch to make it illegal. llvm-svn: 40632
* The InReg parameter attribute is valid on function results. The llvm-gcc-4.0Reid Spencer2007-07-311-2/+1
| | | | | | | front end converts regparm attribute on the gcc function into InReg attribute on the llvm function. This fixes test/CFrontend/2002-07-30-SubrefSetAssertion.c llvm-svn: 40618
* It seems logical that InReg should be incompatibleDuncan Sands2007-07-271-3/+2
| | | | | | with StructReturn and ByVal, so make it so. llvm-svn: 40554
* As the number of parameter attributes increases,Duncan Sands2007-07-271-39/+55
| | | | | | | | | | | | | | | | | | | | Verifier::visitFunction is suffering a combinatorial explosion due to the number of mutually incompatible attributes. This patch tidies the whole thing up using attribute masks. While there I fixed some small bugs: (1) the ByVal attribute tests cast a type to a pointer type, which can fail. Yes, the fact it is of a pointer type is checked before, but a failing check does not cause the program to exit, it continues on outputting further errors; (2) Nothing was checking that an sret attribute is on the first parameter; (3) nothing was checking that a function for which isStructReturn() is true has a parameter with the sret attribute and vice-versa (I don't think it is possible for this to go wrong, but it seems right to check it). llvm-svn: 40553
* Support for trampolines, except for X86 codegen which isDuncan Sands2007-07-271-0/+17
| | | | | | still under discussion. llvm-svn: 40549
* Make output match actual condition tested. Thanks, Duncan.Reid Spencer2007-07-241-1/+1
| | | | llvm-svn: 40464
* 1. Make sure we print the Function Value for parameter attribute errorsReid Spencer2007-07-231-10/+10
| | | | | | 2. Fold an if statement into the Assert1 macro call. llvm-svn: 40455
* Add better verification of attributes on function types. It is not permittedReid Spencer2007-07-231-0/+9
| | | | | | | | to use sret or inreg on the function. It is equally illegal to use noreturn or nounwind on a parameter; they only go with the function. This patch enforces these rules. llvm-svn: 40453
* detect invalid combination of sret and byvalRafael Espindola2007-07-171-0/+4
| | | | llvm-svn: 39971
* Fix comments about vectors to use the current wording.Dan Gohman2007-07-161-1/+1
| | | | llvm-svn: 39921
* check for correct usage of the byval attributeRafael Espindola2007-07-101-2/+11
| | | | llvm-svn: 38506
* Add the byval attributeRafael Espindola2007-07-061-0/+3
| | | | llvm-svn: 37940
* Use DominatorTree instead of ETForest.Devang Patel2007-06-111-16/+16
| | | | llvm-svn: 37538
* Add assert to check if the attributes ZExt/SExt, NoAlias are apply to theZhou Sheng2007-06-071-0/+15
| | | | | | correct type of parameters. llvm-svn: 37486
* Drop 'const'Devang Patel2007-05-031-2/+2
| | | | llvm-svn: 36662
* Use 'static const char' instead of 'static const int'.Devang Patel2007-05-021-2/+2
| | | | | | | Due to darwin gcc bug, one version of darwin linker coalesces static const int, which defauts PassID based pass identification. llvm-svn: 36652
* Do not use typeinfo to identify pass in pass manager.Devang Patel2007-05-011-9/+15
| | | | llvm-svn: 36632
* Implement review feedbackAnton Korobeynikov2007-04-291-1/+2
| | | | llvm-svn: 36564
* Let Verifier check aliaseesAnton Korobeynikov2007-04-281-0/+7
| | | | llvm-svn: 36540
* Implement review feedback. Aliasees can be either GlobalValue's orAnton Korobeynikov2007-04-281-1/+3
| | | | | | bitcasts of them. llvm-svn: 36537
* Implement aliases. This fixes PR1017 and it's dependent bugs. CFE partAnton Korobeynikov2007-04-251-1/+18
| | | | | | will follow. llvm-svn: 36435
* Fix regressions introduced by my previous patch: opt calls verifier in aChris Lattner2007-04-201-1/+3
| | | | | | way that the "Mod" ivar was not getting set. llvm-svn: 36291
* catch a case that was biting jeffcChris Lattner2007-04-201-1/+7
| | | | llvm-svn: 36284
* eliminate a use of Instruction::getPrev(), patch by Gabor Greif in 2005.Chris Lattner2007-04-171-1/+2
| | | | llvm-svn: 36197
* For PR1284:Reid Spencer2007-04-121-2/+3
| | | | | | Implement the "part_set" intrinsic. llvm-svn: 35938
* unbreak the build :(Chris Lattner2007-04-101-1/+1
| | | | llvm-svn: 35857
* Fix build problem.Jeff Cohen2007-04-101-1/+1
| | | | llvm-svn: 35856
* Implement the llvm.bit.part_select.iN.iN.iN overloaded intrinsic.Reid Spencer2007-04-041-0/+2
| | | | llvm-svn: 35678
* For PR1297:Reid Spencer2007-04-011-7/+42
| | | | | | | | | | | | 1. Clear up confusion between "GotBits" and "ExpectBits". GotBits is the type actually provided. ExpectedBits is the type expected for the intrinsics. Before this patch, it was reversed! 2. Implement checks for overloaded intrinsics. This involves computing the suffix expected and making sure the suffix matches the function name. It also includes some intrinsic-specific checks such as ensuring that the bswap parameter and result are the same width and an even number of bytes. llvm-svn: 35540
* 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-6/+6
| | | | | | | Rename PackedType -> VectorType, ConstantPacked -> ConstantVector, and PackedTyID -> VectorTyID. No functional changes. llvm-svn: 34293
* Switch ValueSymbolTable to use StringMap<Value*> instead of ↵Chris Lattner2007-02-121-21/+0
| | | | | | | | | std::map<std::string, Value*> as its main datastructure. There are many improvements yet to be made, but this speeds up opt --std-compile-opts on 447.dealII by 7.3%. llvm-svn: 34193
* convert some vectors to smallvector.Chris Lattner2007-02-101-2/+3
| | | | llvm-svn: 34145
* speed up the verifier 8.5% by using a smallvector instead of vector.Chris Lattner2007-02-101-2/+5
| | | | llvm-svn: 34144
* Change an std::set to a SmallPtrSet. This speeds up the verifier onChris Lattner2007-02-101-1/+2
| | | | | | 447.dealII from 1.27s to 0.86s. llvm-svn: 34143
* Support var arg intrinsics.Jim Laskey2007-02-061-0/+4
| | | | llvm-svn: 33962
* For PR411:Reid Spencer2007-02-051-16/+14
| | | | | | | | | | 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
* Changes to support making the shift instructions be true BinaryOperators.Reid Spencer2007-02-021-14/+15
| | | | | | | | | | | | 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-6/+6
| | | | | | confusion with external linkage types. llvm-svn: 33663
* Propagate changes from my local tree. This patch includes:Anton Korobeynikov2007-01-281-5/+5
| | | | | | | | | | | | | | | | | | | | | | 1. New parameter attribute called 'inreg'. It has meaning "place this parameter in registers, if possible". This is some generalization of gcc's regparm(n) attribute. It's currently used only in X86-32 backend. 2. Completely rewritten CC handling/lowering code inside X86 backend. Merged stdcall + c CCs and fastcall + fast CC. 3. Dropped CSRET CC. We cannot add struct return variant for each target-specific CC (e.g. stdcall + csretcc and so on). 4. Instead of CSRET CC introduced 'sret' parameter attribute. Setting in on first attribute has meaning 'This is hidden pointer to structure return. Handle it gently'. 5. Fixed small bug in llvm-extract + add new feature to FunctionExtraction pass, which relinks all internal-linkaged callees from deleted function to external linkage. This will allow further linking everything together. NOTEs: 1. Documentation will be updated soon. 2. llvm-upgrade should be improved to translate csret => sret. Before this, there will be some unexpected test fails. llvm-svn: 33597
* rename Type::isIntegral to Type::isInteger, eliminating the old Type::isInteger.Chris Lattner2007-01-151-17/+17
| | | | | | | | | 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
* teach VMCore to accept i1 add's and shiftsChris Lattner2007-01-151-7/+7
| | | | llvm-svn: 33223
* For PR1064:Reid Spencer2007-01-121-8/+33
| | | | | | | | | | | | | | | | | | | | | | | 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
* Rename BoolTy as Int1Ty. Patch by Sheng Zhou.Reid Spencer2007-01-111-1/+1
| | | | llvm-svn: 33076
* For PR411:Reid Spencer2007-01-061-4/+8
| | | | | | | | | 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
* Do not allow packed types for icmp and fcmp instructions.Reid Spencer2007-01-041-5/+2
| | | | llvm-svn: 32865
* For PR950:Reid Spencer2006-12-311-1/+1
| | | | | | Change signed integer type names to unsigned equivalents. llvm-svn: 32780
* For PR950:Reid Spencer2006-12-231-4/+0
| | | | | | | | 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
OpenPOWER on IntegriCloud