aboutsummaryrefslogtreecommitdiffstats
path: root/lib/VMCore/Verifier.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Use stripPointerCasts when checking for AllocaInsts for the stackprotector ↵Bill Wendling2008-11-191-1/+1
| | | | | | intrinsic. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59614 91177308-0d34-0410-b5e6-96231b3b80d8
* Use dyn_cast instead of cast.Bill Wendling2008-11-191-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59577 91177308-0d34-0410-b5e6-96231b3b80d8
* Match an element of the return type if it returns a structure.Bill Wendling2008-11-191-2/+12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59576 91177308-0d34-0410-b5e6-96231b3b80d8
* Verify that the second parameter of the stacprotector intrinsic is an allocaBill Wendling2008-11-181-0/+5
| | | | | | | instruction. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59563 91177308-0d34-0410-b5e6-96231b3b80d8
* Correct this error message.Nick Lewycky2008-11-151-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59370 91177308-0d34-0410-b5e6-96231b3b80d8
* Modify the intrinsics pattern to separate out the "return" types from theBill Wendling2008-11-131-12/+27
| | | | | | | | | | | | "parameter" types. An intrinsic can now return a multiple return values like this: def add_with_overflow : Intrinsic<[llvm_i32_ty, llvm_i1_ty], [LLVMMatchType<0>, LLVMMatchType<0>]>; git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59237 91177308-0d34-0410-b5e6-96231b3b80d8
* Refactor the code that does the type checking for intrinsics.Bill Wendling2008-11-131-115/+132
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59228 91177308-0d34-0410-b5e6-96231b3b80d8
* Added support for the following definition of shufflevector Mon P Wang2008-11-101-5/+6
| | | | | | | | <result> = shufflevector <n x <ty>> <v1>, <n x <ty>> <v2>, <m x i32> <mask> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58964 91177308-0d34-0410-b5e6-96231b3b80d8
* Related to PR2911, reject as invalid non-pointer GC roots.Gordon Henriksen2008-10-251-2/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58143 91177308-0d34-0410-b5e6-96231b3b80d8
* Verify prefetch arguments, PR2576.Chris Lattner2008-10-161-0/+8
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57626 91177308-0d34-0410-b5e6-96231b3b80d8
* fix an incorrect and extremely confusing error messageChris Lattner2008-10-051-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57123 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix function attribute verification check.Devang Patel2008-10-031-6/+5
| | | | | | | Thanks Duncan! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57029 91177308-0d34-0410-b5e6-96231b3b80d8
* Verify function attributes.Devang Patel2008-10-031-1/+5
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57020 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove redundant check.Devang Patel2008-10-021-9/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56960 91177308-0d34-0410-b5e6-96231b3b80d8
* Attributes noinline alwaysinline are incompatibleDevang Patel2008-10-011-0/+17
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56939 91177308-0d34-0410-b5e6-96231b3b80d8
* Now Attributes are divided in three groupsDevang Patel2008-09-261-1/+1
| | | | | | | | | | | | | | - return attributes - inreg, zext and sext - parameter attributes - function attributes - nounwind, readonly, readnone, noreturn Return attributes use 0 as the index. Function attributes use ~0U as the index. This patch requires corresponding changes in llvm-gcc and clang. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56704 91177308-0d34-0410-b5e6-96231b3b80d8
* Another file I forgot.Dale Johannesen2008-09-261-1/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56678 91177308-0d34-0410-b5e6-96231b3b80d8
* Large mechanical patch.Devang Patel2008-09-251-25/+25
| | | | | | | | | | | | | | | | | s/ParamAttr/Attribute/g s/PAList/AttrList/g s/FnAttributeWithIndex/AttributeWithIndex/g s/FnAttr/Attribute/g This sets the stage - to implement function notes as function attributes and - to distinguish between function attributes and return value attributes. This requires corresponding changes in llvm-gcc and clang. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56622 91177308-0d34-0410-b5e6-96231b3b80d8
* s/ParamAttrsWithIndex/FnAttributeWithIndex/gDevang Patel2008-09-241-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56535 91177308-0d34-0410-b5e6-96231b3b80d8
* s/ParameterAttributes/Attributes/gDevang Patel2008-09-231-9/+9
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56513 91177308-0d34-0410-b5e6-96231b3b80d8
* Use parameter attribute store (soon to be renamed) forDevang Patel2008-09-231-4/+15
| | | | | | | | Function Notes also. Function notes are stored at index ~0. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56511 91177308-0d34-0410-b5e6-96231b3b80d8
* Make safer variant of alias resolution routine to be defaultAnton Korobeynikov2008-09-091-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56005 91177308-0d34-0410-b5e6-96231b3b80d8
* Extend the vcmp/fcmp LLVM IR instructions to take vectors as argumentsDan Gohman2008-09-091-4/+17
| | | | | | | | | | | | | | | and, if so, to return a vector of boolean as a result; Extend the select LLVM IR instruction to allow you to specify a result type which is a vector of boolean, in which case the result will be an element-wise selection instead of choosing one vector or the other; and Update LangRef.html to describe these changes. This patch was contributed by Preston Gurd! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55969 91177308-0d34-0410-b5e6-96231b3b80d8
* Bitcasting two or from aggregate types is not permitted. UpdateDan Gohman2008-09-081-0/+6
| | | | | | | LangRef.html, and teach the verifier to check bitcast instructions. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55921 91177308-0d34-0410-b5e6-96231b3b80d8
* Tidy up several unbeseeming casts from pointer to intptr_t.Dan Gohman2008-09-041-5/+5
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55779 91177308-0d34-0410-b5e6-96231b3b80d8
* plug a little memleak in verifyFunction()Nuno Lopes2008-09-021-1/+3
| | | | | | # first commit to llvm, so whatch out :) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55631 91177308-0d34-0410-b5e6-96231b3b80d8
* Make the verifier reject instructions which have null pointers Chris Lattner2008-08-281-0/+11
| | | | | | | | for operands: rdar://6179606. no testcase, because I can't write a .ll file that is this broken ;-) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55460 91177308-0d34-0410-b5e6-96231b3b80d8
* Minor cleanup.Chris Lattner2008-08-271-16/+15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55423 91177308-0d34-0410-b5e6-96231b3b80d8
* Diagnose uses of unsized types with the byval attribute in theDan Gohman2008-08-271-0/+11
| | | | | | | verifier. See PR2711 for details. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55414 91177308-0d34-0410-b5e6-96231b3b80d8
* Update wording, as aggregates are now first-class.Dan Gohman2008-08-271-3/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55413 91177308-0d34-0410-b5e6-96231b3b80d8
* remove the type checking logic already done by tblgen, just keep theChris Lattner2008-08-241-36/+10
| | | | | | | | parts tblgen doesn't do (checking for constant, alloca, enclosing function has gc marker). This passes dj! :) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55294 91177308-0d34-0410-b5e6-96231b3b80d8
* Reverting r55227. This was causing the following failures in the regressionBill Wendling2008-08-231-0/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | tests: Running /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.HEAD.src/test/Verifier/dg.exp ... FAIL: /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.HEAD.src/test/Verifier/gcread-ptrptr.ll for PR1633 Failed with exit(1) at line 1 while running: not llvm-as < /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.HEAD.src/test/Verifier/gcread-ptrptr.ll >& /dev/null child process exited abnormally FAIL: /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.HEAD.src/test/Verifier/gcroot-alloca.ll for PR1633 Failed with exit(1) at line 1 while running: not llvm-as < /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.HEAD.src/test/Verifier/gcroot-alloca.ll >& /dev/null child process exited abnormally FAIL: /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.HEAD.src/test/Verifier/gcroot-meta.ll for PR1633 Failed with exit(1) at line 1 while running: not llvm-as < /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.HEAD.src/test/Verifier/gcroot-meta.ll >& /dev/null child process exited abnormally FAIL: ndbox/Buildbot/llvm/full-llvm/build/llvm.HEAD.src/test/Verifier/gcroot-ptrptr.ll for PR1633 Failed with exit(1) at line 1 while running: not llvm-as < /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.HEAD.src/test/Verifier/gcroot-ptrptr.ll >& /dev/null child process exited abnormally FAIL: /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.HEAD.src/test/Verifier/gcwrite-ptrptr.ll for PR1633 Failed with exit(1) at line 1 while running: not llvm-as < /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.HEAD.src/test/Verifier/gcwrite-ptrptr.ll >& /dev/null child process exited abnormally === Summary === # of expected passes 3021 # of unexpected failures 6 # of expected failures 16 make[1]: *** [check-local] Error 1 make: *** [check] Error 2 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55233 91177308-0d34-0410-b5e6-96231b3b80d8
* Verify that the alignment argument to llvm.memcpy is a constantChris Lattner2008-08-231-0/+10
| | | | | | | integer, PR2318. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55228 91177308-0d34-0410-b5e6-96231b3b80d8
* remove verification for gc intrinsic argument types. it was indented wrongChris Lattner2008-08-231-39/+0
| | | | | | | and tblgen now knows intrinsic prototypes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55227 91177308-0d34-0410-b5e6-96231b3b80d8
* whitespace cleanupChris Lattner2008-08-191-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54980 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename some GC classes so that their roll will hopefully be clearer.Gordon Henriksen2008-08-171-2/+2
| | | | | | | | | | | | | | | | | | In particular, Collector was confusing to implementors. Several thought that this compile-time class was the place to implement their runtime GC heap. Of course, it doesn't even exist at runtime. Specifically, the renames are: Collector -> GCStrategy CollectorMetadata -> GCFunctionInfo CollectorModuleMetadata -> GCModuleInfo CollectorRegistry -> GCRegistry Function::getCollector -> getGC (setGC, hasGC, clearGC) Several accessors and nested types have also been renamed to be consistent. These changes should be obvious. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54899 91177308-0d34-0410-b5e6-96231b3b80d8
* Improve support for vector casts in LLVM IR and CodeGen.Dan Gohman2008-08-141-10/+10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54784 91177308-0d34-0410-b5e6-96231b3b80d8
* Add read/write support for X86's sseregparm.Dale Johannesen2008-08-131-0/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54744 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix the AsmWriter to not print extra spaces after parameter attributes.Dan Gohman2008-08-051-4/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54351 91177308-0d34-0410-b5e6-96231b3b80d8
* Added support for overloading intrinsics (atomics) based on pointersMon P Wang2008-07-301-7/+25
| | | | | | | | to different address spaces. This alters the naming scheme for those intrinsics, e.g., atomic.load.add.i32 => atomic.load.add.i32.p0i32 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54195 91177308-0d34-0410-b5e6-96231b3b80d8
* Add vector shifts to the IR, patch by Eli Friedman.Nate Begeman2008-07-291-5/+11
| | | | | | | CodeGen & Clang work coming next. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54161 91177308-0d34-0410-b5e6-96231b3b80d8
* Allow verifier to be run on partially materialized modules.Nate Begeman2008-07-251-1/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54028 91177308-0d34-0410-b5e6-96231b3b80d8
* Enable first-class aggregates support.Dan Gohman2008-07-231-24/+17
| | | | | | | | | | | | | Remove the GetResultInst instruction. It is still accepted in LLVM assembly and bitcode, where it is now auto-upgraded to ExtractValueInst. Also, remove support for return instructions with multiple values. These are auto-upgraded to use InsertValueInst instructions. The IRBuilder still accepts multiple-value returns, and auto-upgrades them to InsertValueInst instructions. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53941 91177308-0d34-0410-b5e6-96231b3b80d8
* verify limits-fndefn.c from the GCC testsuite before theChris Lattner2008-07-181-1/+1
| | | | | | | | heat death of the universe, fixing an O(N^2) problem in the size of a basic block. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53749 91177308-0d34-0410-b5e6-96231b3b80d8
* Use const_cast instead of a C-style cast.Dan Gohman2008-06-241-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52684 91177308-0d34-0410-b5e6-96231b3b80d8
* Re-apply 52002, allowing the verifier to accept non-MRV struct returnDan Gohman2008-06-091-4/+15
| | | | | | | | | types on functions, with adjustments so that it accepts both new-style aggregate returns and old-style MRV returns, including those with only a single member. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52157 91177308-0d34-0410-b5e6-96231b3b80d8
* Wrap MVT::ValueType in a struct to get type safetyDuncan Sands2008-06-061-8/+9
| | | | | | | | | | | | | | | | | and better control the abstraction. Rename the type to MVT. To update out-of-tree patches, the main thing to do is to rename MVT::ValueType to MVT, and rewrite expressions like MVT::getSizeInBits(VT) in the form VT.getSizeInBits(). Use VT.getSimpleVT() to extract a MVT::SimpleValueType for use in switch statements (you will get an assert failure if VT is an extended value type - these shouldn't exist after type legalization). This results in a small speedup of codegen and no new testsuite failures (x86-64 linux). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52044 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert 52002.Dan Gohman2008-06-051-4/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52030 91177308-0d34-0410-b5e6-96231b3b80d8
* Change the Verifier to support returning first class aggregrates.Matthijs Kooijman2008-06-051-1/+4
| | | | | | | Add a testcase for functions returning first class aggregrates. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52002 91177308-0d34-0410-b5e6-96231b3b80d8
* IR support for extractvalue and insertvalue instructions. Also, beginDan Gohman2008-05-151-1/+1
| | | | | | | moving toward making structs and arrays first-class types. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51157 91177308-0d34-0410-b5e6-96231b3b80d8