summaryrefslogtreecommitdiffstats
path: root/llvm/lib/VMCore/Verifier.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Make NamedMDNode not be a subclass of Value, and simplify the interfaceDan Gohman2010-07-211-2/+2
| | | | | | for creating and populating NamedMDNodes. llvm-svn: 109061
* NamedMDNode is never an operand.Dan Gohman2010-07-211-1/+1
| | | | llvm-svn: 109031
* rotate CallInst operandsGabor Greif2010-07-131-2/+3
| | | | | | | | | | | | | | | | | with this commit the callee moves to the end of the operand array (from the start) and the call arguments now start at index 0 (formerly 1) this ordering is now consistent with InvokeInst this commit only flips the switch, functionally it is equivalent to r101465 I intend to commit several cleanups after a few days of soak period llvm-svn: 108240
* fix typoChris Lattner2010-07-111-1/+1
| | | | llvm-svn: 108100
* use ArgOperand accessorsGabor Greif2010-06-231-13/+13
| | | | llvm-svn: 106626
* improve verifier error about unterminated block to includeChris Lattner2010-06-121-1/+2
| | | | | | function name, patch by Yuri llvm-svn: 105887
* Another place where the code wanted to access the argument list and not all ofBill Wendling2010-06-071-2/+2
| | | | | | the operands. llvm-svn: 105545
* Eliminate the restriction that the array size in an alloca must be i32.Dan Gohman2010-05-281-2/+2
| | | | | | This will help reduce the amount of casting required on 64-bit targets. llvm-svn: 104911
* Add support for thiscall calling convention.Anton Korobeynikov2010-05-161-0/+1
| | | | | | Patch by Charles Davis and Steven Watanabe! llvm-svn: 103902
* simplify more.Chris Lattner2010-05-101-1/+1
| | | | llvm-svn: 103431
* Simplify by using startswith instead of substr.Chris Lattner2010-05-101-2/+2
| | | | llvm-svn: 103430
* Verify metadata harder. In particular, check that moduleDuncan Sands2010-04-291-39/+60
| | | | | | | level metadata does not have any function local operands. This would have caught the problem found in PR6112. llvm-svn: 102620
* Revert 101465, it broke internal OpenGL testing.Eric Christopher2010-04-161-16/+15
| | | | | | | Probably the best way to know that all getOperand() calls have been handled is to replace that API instead of updating. llvm-svn: 101579
* reapply r101434Gabor Greif2010-04-161-15/+16
| | | | | | | | | | | | | with a fix for self-hosting rotate CallInst operands, i.e. move callee to the back of the operand array the motivation for this patch are laid out in my mail to llvm-commits: more efficient access to operands and callee, faster callgraph-construction, smaller compiler binary llvm-svn: 101465
* back out r101423 and r101397, they break llvm-gcc self-host on darwin10Gabor Greif2010-04-161-16/+15
| | | | llvm-svn: 101434
* reapply r101364, which has been backed out in r101368Gabor Greif2010-04-151-15/+16
| | | | | | | | | | | | | with a fix rotate CallInst operands, i.e. move callee to the back of the operand array the motivation for this patch are laid out in my mail to llvm-commits: more efficient access to operands and callee, faster callgraph-construction, smaller compiler binary llvm-svn: 101397
* back out r101364, as it trips the linux nightlybot on some clang C++ testsGabor Greif2010-04-151-16/+15
| | | | llvm-svn: 101368
* rotate CallInst operands, i.e. move callee to the backGabor Greif2010-04-151-15/+16
| | | | | | | | | | of the operand array the motivation for this patch are laid out in my mail to llvm-commits: more efficient access to operands and callee, faster callgraph-construction, smaller compiler binary llvm-svn: 101364
* Fix a comment.Dan Gohman2010-04-081-1/+3
| | | | llvm-svn: 100774
* rename llvm::llvm_report_error -> llvm::report_fatal_errorChris Lattner2010-04-071-1/+1
| | | | llvm-svn: 100709
* Finally land the InvokeInst operand reordering.Gabor Greif2010-03-241-8/+4
| | | | | | | | | | | | I have audited all getOperandNo calls now, fixing hidden assumptions. CallSite related uglyness will be eliminated successively. Note this patch has a long and griveous history, for all the back-and-forths have a look at CallSite.h's log. llvm-svn: 99399
* Change intrinsic result type for void to store it as an empty listChris Lattner2010-03-221-34/+41
| | | | | | | instead of as a single element list with VoidTy. Now with a fix for the verifier. llvm-svn: 99206
* backing out r99170 because it still fails on clang-x86_64-darwin10-fntGabor Greif2010-03-221-1/+1
| | | | llvm-svn: 99171
* Now that hopefully all direct accesses to InvokeInst operands are fixedGabor Greif2010-03-221-1/+1
| | | | | | we can reapply the InvokeInst operand reordering patch. (see r98957). llvm-svn: 99170
* call void @llvm.dbg.declare(metadata !{i32* null}, metadata !1)Devang Patel2010-03-191-4/+0
| | | | | | is valid, but not useful, when variable identified by !1 is optimized away by the optimizer. llvm-svn: 98986
* back out r98957, it broke ↵Gabor Greif2010-03-191-1/+1
| | | | | | http://smooshlab.apple.com:8010/builders/clang-x86_64-darwin10-fnt/builds/703 in the nightly test suite llvm-svn: 98958
* Recommit r80858 again (which has been backed out in r80871).Gabor Greif2010-03-191-1/+1
| | | | | | | | | | | This time I did a self-hosted bootstrap on Linux x86-64, with no problems. Let's see how darwin 64-bit self-hosting goes. At the first sign of failure I'll back this out. Maybe the valgrind bots give me a hint of what may be wrong (it at all). llvm-svn: 98957
* Add verification of union types.Nick Lewycky2010-03-061-0/+9
| | | | llvm-svn: 97889
* There are two ways of checking for a given type, for example isa<PointerType>(T)Duncan Sands2010-02-161-24/+24
| | | | | | | and T->isPointerTy(). Convert most instances of the first form to the second form. Requested by Chris. llvm-svn: 96344
* Teach the verifier to check the condition on a branch and ensure that it hasNick Lewycky2010-02-151-0/+9
| | | | | | 'i1' type. llvm-svn: 96282
* Fix crash in VerifyType when checking Contexts. Because there may not be aNick Lewycky2010-02-151-8/+14
| | | | | | | Module (we were called with verifyFunction and an unowned Function) we can't rely on Mod->getContext(). llvm-svn: 96275
* Uniformize the names of type predicates: rather than having isFloatTy andDuncan Sands2010-02-151-29/+30
| | | | | | isInteger, we now have isFloatTy and isIntegerTy. Requested by Chris! llvm-svn: 96223
* Kill ModuleProvider and ghost linkage by inverting the relationship betweenJeffrey Yasskin2010-01-271-7/+6
| | | | | | | | | | | | | | | | | | | | | Modules and ModuleProviders. Because the "ModuleProvider" simply materializes GlobalValues now, and doesn't provide modules, it's renamed to "GVMaterializer". Code that used to need a ModuleProvider to materialize Functions can now materialize the Functions directly. Functions no longer use a magic linkage to record that they're materializable; they simply ask the GVMaterializer. Because the C ABI must never change, we can't remove LLVMModuleProviderRef or the functions that refer to it. Instead, because Module now exposes the same functionality ModuleProvider used to, we store a Module* in any LLVMModuleProviderRef and translate in the wrapper methods. The bindings to other languages still use the ModuleProvider concept. It would probably be worth some time to update them to follow the C++ more closely, but I don't intend to do it. Fixes http://llvm.org/PR5737 and http://llvm.org/PR5735. llvm-svn: 94686
* Fix/strengthen verification of llvm.dbg.declareVictor Hernandez2010-01-221-5/+10
| | | | llvm-svn: 94195
* Backout r93990Victor Hernandez2010-01-201-9/+4
| | | | llvm-svn: 93995
* Fix/strengthen verification of llvm.dbg.declareVictor Hernandez2010-01-201-4/+9
| | | | llvm-svn: 93990
* reject some invalid IR. We already assert and reject this from theChris Lattner2010-01-181-0/+2
| | | | | | .ll parser, but PR6070 wants it in the verifier too. llvm-svn: 93756
* Improve llvm.dbg.declare intrinsic by referring directly to the storage in ↵Victor Hernandez2010-01-151-3/+4
| | | | | | | | | its first argument, via function-local metadata (instead of via a bitcast). This patch also cleans up code that expects there to be a bitcast in the first argument and testcases that call llvm.dbg.declare. It also strips old llvm.dbg.declare intrinsics that did not pass metadata as the first argument. llvm-svn: 93531
* Revert r93504 because older uses of llvm.dbg.declare intrinsics need to be ↵Victor Hernandez2010-01-151-4/+3
| | | | | | auto-upgraded llvm-svn: 93515
* Improve llvm.dbg.declare intrinsic by referring directly to the storage in ↵Victor Hernandez2010-01-151-3/+4
| | | | | | | | its first argument, via function-local metadata (instead of via a bitcast). This patch also cleans up code that expects there to be a bitcast in the first argument and testcases that call llvm.dbg.declare. llvm-svn: 93504
* 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
OpenPOWER on IntegriCloud