summaryrefslogtreecommitdiffstats
path: root/llvm/lib/VMCore/Verifier.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Change errs() to dbgs().David Greene2010-01-051-5/+6
| | | | llvm-svn: 92649
* rename "elements" of metadata to "operands". "Elements" areChris Lattner2009-12-311-2/+2
| | | | | | | things that occur in types. "operands" are things that occur in values. llvm-svn: 92322
* Rewrite the function-local validation logic for MDNodes (most of r91708).Chris Lattner2009-12-281-6/+39
| | | | | | | | Among other benefits, this doesn't leak the SmallPtrSet, has the verifier code in the verifier pass, actually does the verification at the end, and is considerably simpler. llvm-svn: 92217
* Formalize MDNode's function-localness:Victor Hernandez2009-12-181-0/+10
| | | | | | | | | | | - an MDNode is designated as function-local when created, and continues to be even if its operands are modified not to refer to function-local IR - function-localness is designated via lowest bit in SubclassData - getLocalFunction() descends MDNode tree to see if it is consistently function-local Add verification of MDNodes to checks that MDNodes are consistently function-local. Update AsmWriter to use isFunctionLocal(). llvm-svn: 91708
* Start catching LLVMContext misuse in the verifier.Nick Lewycky2009-11-231-0/+3
| | | | llvm-svn: 89646
* Reject duplicate case values in a switch, PR5450.Chris Lattner2009-11-111-1/+5
| | | | llvm-svn: 86846
* the verifier shouldn't modify the IR.Chris Lattner2009-11-011-2/+1
| | | | llvm-svn: 85722
* fix an issue where the verifier would reject a function whose entryChris Lattner2009-11-011-2/+7
| | | | | | block had its address taken even if the blockaddress was dead. llvm-svn: 85706
* it isn't valid to take the address of the entry block.Chris Lattner2009-10-301-0/+2
| | | | llvm-svn: 85621
* Remove includes of Support/Compiler.h that are no longer needed after theNick Lewycky2009-10-251-1/+0
| | | | | | VISIBILITY_HIDDEN removal. llvm-svn: 85043
* Remove VISIBILITY_HIDDEN from class/struct found inside anonymous namespaces.Nick Lewycky2009-10-251-1/+1
| | | | | | | Chris claims we should never have visibility_hidden inside any .cpp file but that's still not true even after this commit. llvm-svn: 85042
* Remove AllocationInst. Since MallocInst went away, AllocaInst is the only ↵Victor Hernandez2009-10-231-2/+2
| | | | | | subclass of AllocationInst, so it no longer is necessary. llvm-svn: 84969
* Emit newlines at the end of instructions too.Nick Lewycky2009-10-171-2/+2
| | | | llvm-svn: 84348
* Force memory use markers to have a ConstantInt for the size argument.Nick Lewycky2009-10-131-0/+11
| | | | llvm-svn: 83960
* strength reduce a ton of type equality tests to check the typeid (ThroughChris Lattner2009-10-051-9/+8
| | | | | | | | the new predicates I added) instead of going through a context and doing a pointer comparison. Besides being cheaper, this allows a smart compiler to turn the if sequence into a switch. llvm-svn: 83297
* Remove the "metadata*" type and simplify the code it complicated. This was onlyNick Lewycky2009-09-271-50/+8
| | | | | | | used to support GlobalVariables storing MDNodes, back when they were derived from Constant before the introduction of NamedMDNode, but never removed. llvm-svn: 82943
* No need to verify that malloc's return type is i8*.Victor Hernandez2009-09-221-10/+0
| | | | llvm-svn: 82561
* Update malloc call creation code (AllocType is now the element type of the ↵Victor Hernandez2009-09-181-0/+10
| | | | | | | | | | | | | | | | | | malloc, not the resulting type). In getMallocArraySize(), fix bug in the case that array size is the product of 2 constants. Extend isArrayMalloc() and getMallocArraySize() to handle case where malloc is used as char array. Ensure that ArraySize in LowerAllocations::runOnBasicBlock() is correct type. Extend Instruction::isSafeToSpeculativelyExecute() to handle malloc calls. Add verification for malloc calls. Reviewed by Dan Gohman. llvm-svn: 82257
* Fifth time's a charm! Remove ourselves as abstract type listeners once we'veNick Lewycky2009-09-141-3/+16
| | | | | | been told that the type is no longer abstract. llvm-svn: 81749
* Don't leak! Always remove oneself as a listener after adding oneself.Nick Lewycky2009-09-141-6/+15
| | | | llvm-svn: 81736
* Actually remove old types from the set.Nick Lewycky2009-09-131-12/+30
| | | | | | | Also break the type verification stuff into its own TypeSet to keep the Verifier pass from becoming an AbstractTypeUser. llvm-svn: 81729
* Storing a set of PATypeHolders is a bad idea because their sort order willNick Lewycky2009-09-131-2/+10
| | | | | | | | change as types are refined. Remove abstract types from CheckedTypes when they we're informed that they have been refined. The only way types get refined in the verifier is when later function passes start optimizing. Fixes PR4970. llvm-svn: 81716
* reject attempts to take the address of an intrinsic, PR4949.Chris Lattner2009-09-111-0/+12
| | | | llvm-svn: 81530
* Hoist out the test+insert to CheckedTypes. This doesn't seem to affectNick Lewycky2009-09-081-10/+4
| | | | | | performance. llvm-svn: 81193
* Simplify from my last change. Assert1 is a macro that makes its caller return,Nick Lewycky2009-09-081-38/+30
| | | | | | | | | so "Assert1(isa<>); cast<>" is a valid idiom. Actually check the PHI node's odd-numbered operands for BasicBlock-ness, like the comment said. llvm-svn: 81182
* Verify types. Invalid types can be constructed when assertions are off.Nick Lewycky2009-09-081-36/+132
| | | | | | | Make the verifier more robust by avoiding unprotected cast<> calls. Notably, Assert1(isa<>); cast<> is not safe as Assert1 does not terminate the program. llvm-svn: 81179
* Express this in the canonical way.Nick Lewycky2009-09-071-2/+2
| | | | llvm-svn: 81157
* Homogenize whitespace.Nick Lewycky2009-09-071-20/+16
| | | | llvm-svn: 81156
* Public and private corrections, warned about by icc (#304).Duncan Sands2009-09-061-1/+1
| | | | | | Patch by Erick Tryzelaar. llvm-svn: 81107
* back out my recent commit (r80858), it seems to break self-hosting ↵Gabor Greif2009-09-031-1/+1
| | | | | | buildbot's stage 2 configure llvm-svn: 80871
* re-commit r66920 (which has been backed out in r66953) I may have more luck ↵Gabor Greif2009-09-031-1/+1
| | | | | | this time. I'll back out if needed... llvm-svn: 80858
* Kill off more cerr/cout uses and prune includes a bit.Benjamin Kramer2009-08-231-3/+2
| | | | llvm-svn: 79852
* eliminate the std::ostream form of WriteAsOperand and update clients.Chris Lattner2009-08-231-1/+1
| | | | | | This also updates dominator related stuff. llvm-svn: 79825
* switch a couple things off std::ostreamChris Lattner2009-08-231-23/+21
| | | | llvm-svn: 79816
* Push LLVMContexts through the IntegerType APIs.Owen Anderson2009-08-131-15/+19
| | | | llvm-svn: 78948
* Add contexts to some of the MVT APIs. No functionality change yet, just the ↵Owen Anderson2009-08-121-1/+2
| | | | | | infrastructure work needed to get the contexts to where they need to be first. llvm-svn: 78759
* Split EVT into MVT and EVT, the former representing _just_ a primitive type, ↵Owen Anderson2009-08-111-11/+11
| | | | | | | | while the latter is capable of representing either a primitive or an extended type. llvm-svn: 78713
* Add a new overloaded EVT::vAny type for use in TableGen to allow intrinsicBob Wilson2009-08-111-0/+6
| | | | | | arguments that are vectors of any size and element type. llvm-svn: 78631
* Rename MVT to EVT, in preparation for splitting SimpleValueType out into its ↵Owen Anderson2009-08-101-13/+13
| | | | | | own struct type. llvm-svn: 78610
* common globals may also not be marked constant.Chris Lattner2009-08-051-3/+6
| | | | llvm-svn: 78169
* Clarify common linkage and the requirements on it. EnforceChris Lattner2009-08-051-0/+7
| | | | | | them in the verifier. llvm-svn: 78160
* TypoNate Begeman2009-07-301-1/+1
| | | | llvm-svn: 77568
* Move types back to the 2.5 API.Owen Anderson2009-07-291-2/+1
| | | | llvm-svn: 77516
* Fix an assumption that there is a single return value when verifyingBob Wilson2009-07-291-2/+2
| | | | | | overloaded types for intrinsic parameters. llvm-svn: 77466
* Rename MDNode.h header. It defines MDnode and other metadata classes.Devang Patel2009-07-281-1/+1
| | | | | | New name is Metadata.h. llvm-svn: 77370
* Initial update to VMCore to use Twines for string arguments.Daniel Dunbar2009-07-251-5/+5
| | | | | | | - The only meat here is in Value.{h,cpp} the rest is essential 'const std::string &' -> 'const Twine &'. llvm-svn: 77048
* Get rid of the Pass+Context magic.Owen Anderson2009-07-221-1/+2
| | | | llvm-svn: 76702
* llvm_unreachable->llvm_unreachable(0), LLVM_UNREACHABLE->llvm_unreachable.Torok Edwin2009-07-141-2/+2
| | | | | | | | | 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
* assert(0) -> LLVM_UNREACHABLE.Torok Edwin2009-07-111-2/+2
| | | | | | | | | 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
* Thread LLVMContext through MVT and related parts of SDISel.Owen Anderson2009-07-091-1/+1
| | | | llvm-svn: 75153
OpenPOWER on IntegriCloud