summaryrefslogtreecommitdiffstats
path: root/llvm/lib/VMCore/Verifier.cpp
Commit message (Collapse)AuthorAgeFilesLines
* 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
* Implement changes from Chris's feedback.Torok Edwin2009-07-081-1/+3
| | | | | | Finish converting lib/Target. llvm-svn: 75043
* Start converting to new error handling API.Torok Edwin2009-07-081-3/+3
| | | | | | | cerr+abort -> llvm_report_error assert(0)+abort -> LLVM_UNREACHABLE (assert(0)+llvm_unreachable-> abort() included) llvm-svn: 75018
* Support vector casts in more places, fixing a variety of assertionDan Gohman2009-06-151-10/+10
| | | | | | | | | | | | | | | failures. To support this, add some utility functions to Type to help support vector/scalar-independent code. Change ConstantInt::get and ConstantFP::get to support vector types, and add an overload to ConstantInt::get that uses a static IntegerType type, for convenience. Introduce a new getConstant method for ScalarEvolution, to simplify common use cases. llvm-svn: 73431
* Cosmetic changes to parameter attribute verification.Duncan Sands2009-06-111-17/+18
| | | | llvm-svn: 73188
* Remove cyclic MDNode detection. Any attempt to create a cyclic MDNode willNick Lewycky2009-06-071-57/+16
| | | | | | crash LLVM first. llvm-svn: 73011
* Fix a copy+pasto in an assertion string that Jay Foad noticed.Dan Gohman2009-06-051-1/+1
| | | | llvm-svn: 72953
* Update the Verifier to be aware of the difference between Add and FAdd, etc.Dan Gohman2009-06-051-15/+33
| | | | llvm-svn: 72946
* Give embedded metadata its own type instead of relying on EmptyStructTy.Nick Lewycky2009-05-301-53/+103
| | | | llvm-svn: 72610
* Untabification.Bill Wendling2009-05-301-1/+1
| | | | llvm-svn: 72604
* Dan noticed that the verifier wasn't thoroughly checking uses ofDuncan Sands2009-05-291-50/+49
| | | | | | invoke results (see the testcases). Tighten up the checking. llvm-svn: 72586
* Revert this. There's no way to verifiy indirect calls, and an optimizer can turnTorok Edwin2009-05-221-25/+0
| | | | | | | indirect call into direct call, thus the verifier would reject something it previously accepted. llvm-svn: 72249
* Verify that calling conventions match function prototype.Torok Edwin2009-05-221-0/+25
| | | | | | | | | This only rejects mismatches between target specific calling convention and C/LLVM specific calling convention. There are too many fastcc/C, coldcc/cc42 mismatches in the testsuite, these are not reject by the verifier. llvm-svn: 72248
* Needed #includes. Thanks Fritz van Bommel!Bill Wendling2009-05-101-0/+1
| | | | llvm-svn: 71413
* Allow aliasee to be a GEP or bitcast instead of just a bitcast.Chris Lattner2009-04-251-1/+3
| | | | | | | | | | | The real fix for this whole mess is to require the operand of the alias to be a *GlobalValue* (not a general constant, including constant exprs) but allow the operand and the alias type to be unrelated. This fixes PR4066 llvm-svn: 70079
* Add support for embedded metadata to LLVM. This introduces two new types ofNick Lewycky2009-04-041-1/+50
| | | | | | | | Constant, MDString and MDNode which can only be used by globals with a name that starts with "llvm." or as arguments to a function with the same naming restriction. llvm-svn: 68420
* typoGabor Greif2009-03-171-1/+1
| | | | llvm-svn: 67080
* Simplify. "Broken" is always true here.Nick Lewycky2009-03-151-1/+1
| | | | llvm-svn: 67025
* Revert r66920. It was causing failures in the self-hosting buildbot (in releaseBill Wendling2009-03-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | mode). Running /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/test/BugPoint/dg.exp ... FAIL: /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/test/BugPoint/crash-narrowfunctiontest.ll Failed with signal(SIGBUS) at line 1 while running: bugpoint /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/test/BugPoint/crash-narrowfunctiontest.ll -bugpoint-crashcalls -silence-passes > /dev/null 0 bugpoint 0x0035dd25 llvm::sys::SetInterruptFunction(void (*)()) + 85 1 bugpoint 0x0035e382 llvm::sys::RemoveFileOnSignal(llvm::sys::Path const&, std::string*) + 706 2 libSystem.B.dylib 0x92f112bb _sigtramp + 43 3 libSystem.B.dylib 0xffffffff _sigtramp + 1829694831 4 bugpoint 0x00021d1c main + 92 5 bugpoint 0x00002106 start + 54 6 bugpoint 0x00000004 start + 18446744073709543220 Stack dump: 0. Program arguments: bugpoint /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/test/BugPoint/crash-narrowfunctiontest.ll -bugpoint-crashcalls -silence-passes FAIL: /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/test/BugPoint/misopt-basictest.ll Failed with signal(SIGBUS) at line 1 while running: bugpoint /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/test/BugPoint/misopt-basictest.ll -dce -bugpoint-deletecalls -simplifycfg -silence-passes 0 bugpoint 0x0035dd25 llvm::sys::SetInterruptFunction(void (*)()) + 85 1 bugpoint 0x0035e382 llvm::sys::RemoveFileOnSignal(llvm::sys::Path const&, std::string*) + 706 2 libSystem.B.dylib 0x92f112bb _sigtramp + 43 3 libSystem.B.dylib 0xffffffff _sigtramp + 1829694831 4 bugpoint 0x00021d1c main + 92 5 bugpoint 0x00002106 start + 54 6 bugpoint 0x00000006 start + 18446744073709543222 Stack dump: 0. Program arguments: bugpoint /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/test/BugPoint/misopt-basictest.ll -dce -bugpoint-deletecalls -simplifycfg -silence-passes FAIL: /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/test/BugPoint/remove_arguments_test.ll Failed with signal(SIGBUS) at line 1 while running: bugpoint /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/test/BugPoint/remove_arguments_test.ll -bugpoint-crashcalls -silence-passes 0 bugpoint 0x0035dd25 llvm::sys::SetInterruptFunction(void (*)()) + 85 1 bugpoint 0x0035e382 llvm::sys::RemoveFileOnSignal(llvm::sys::Path const&, std::string*) + 706 2 libSystem.B.dylib 0x92f112bb _sigtramp + 43 3 libSystem.B.dylib 0xffffffff _sigtramp + 1829694831 4 bugpoint 0x00021d1c main + 92 5 bugpoint 0x00002106 start + 54 Stack dump: 0. Program arguments: bugpoint /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/test/BugPoint/remove_arguments_test.ll -bugpoint-crashcalls -silence-passes --- Reverse-merging (from foreign repository) r66920 into '.': U include/llvm/Support/CallSite.h U include/llvm/Instructions.h U lib/Analysis/IPA/GlobalsModRef.cpp U lib/Analysis/IPA/Andersens.cpp U lib/Bitcode/Writer/BitcodeWriter.cpp U lib/VMCore/Instructions.cpp U lib/VMCore/Verifier.cpp U lib/VMCore/AsmWriter.cpp U lib/Transforms/Utils/LowerInvoke.cpp U lib/Transforms/Scalar/SimplifyCFGPass.cpp U lib/Transforms/IPO/PruneEH.cpp U lib/Transforms/IPO/DeadArgumentElimination.cpp llvm-svn: 66953
OpenPOWER on IntegriCloud