summaryrefslogtreecommitdiffstats
path: root/llvm/lib/VMCore/Verifier.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Check that there are not more attributes thanDuncan Sands2007-11-301-0/+4
| | | | | | function parameters. llvm-svn: 44452
* Fix PR1146: parameter attributes are longer part ofDuncan Sands2007-11-271-3/+3
| | | | | | | | | | | | the function type, instead they belong to functions and function calls. This is an updated and slightly corrected version of Reid Spencer's original patch. The only known problem is that auto-upgrading of bitcode files doesn't seem to work properly (see test/Bitcode/AutoUpgradeIntrinsics.ll). Hopefully a bitcode guru (who might that be? :) ) will fix it. llvm-svn: 44359
* Fix PR1816. If a bitcast of a function only exists because of aDuncan Sands2007-11-251-30/+7
| | | | | | | | | trivial difference in function attributes, allow calls to it to be converted to direct calls. Based on a patch by Török Edwin. While there, move the various lists of mutually incompatible parameters etc out of the verifier and into ParameterAttributes.h. llvm-svn: 44315
* Rename the 'const' parameter attribute to 'readnone',Duncan Sands2007-11-221-2/+2
| | | | | | | and the 'pure' parameter attribute to 'readonly'. Names suggested by DannyB. llvm-svn: 44273
* Add support for vectors to int <-> float casts.Nate Begeman2007-11-171-8/+40
| | | | llvm-svn: 44204
* I discover array_lengthof, thanks to gabor on #llvm.Duncan Sands2007-11-141-2/+1
| | | | llvm-svn: 44139
* Simplify the attribute verification code.Duncan Sands2007-11-141-34/+24
| | | | llvm-svn: 44116
* Add pure/const attributes. Documentation will follow.Anton Korobeynikov2007-11-141-4/+13
| | | | llvm-svn: 44109
* Don't barf on empty basic blocks. Do not rely on assertDuncan Sands2007-11-011-9/+21
| | | | | | | | | | doing something - this needs to work for release builds too. I chose to just abort rather than following the fancy logic of abortIfBroken, because (1) it is a pain to do otherwise, and (2) nothing is going to work if the module is this broken. llvm-svn: 43611
* remove verifier command line option: this should be part of the API, notChris Lattner2007-11-011-11/+0
| | | | | | a command line optn. llvm-svn: 43603
* Now with less tabs!Owen Anderson2007-11-011-5/+5
| | | | llvm-svn: 43601
* Add a preverifier pass to check that every basic block ends in a terminator, ↵Owen Anderson2007-10-311-1/+20
| | | | | | so that we don't segfault when verifying invalid code. llvm-svn: 43578
* I am not sure this is a good idea to be an option, but rename the option forChris Lattner2007-10-291-1/+1
| | | | | | now. It conflicts with clang's -pedantic flag. llvm-svn: 43431
* Add 'pedantic' mode to verifier rejecting syntactically valid, but 'bad' due ↵Anton Korobeynikov2007-10-281-3/+14
| | | | | | to other reasons code llvm-svn: 43424
* Check that the second parameter of init_trampolineDuncan Sands2007-09-291-2/+6
| | | | | | | can be resolved to a function. This is required for codegen and used by instcombine. llvm-svn: 42469
* reject things like "declare internal @foo"Chris Lattner2007-09-191-2/+11
| | | | llvm-svn: 42140
* Incorporating review feedback for GC verifier patch.Gordon Henriksen2007-09-181-11/+5
| | | | llvm-svn: 42087
* Fix for PR1633: Verifier doesn't fully verify GC intrinsicsGordon Henriksen2007-09-171-0/+36
| | | | | | | | | | | | | | LLVM now enforces the following prototypes for the write barriers: <ty>* @llvm.gcread(<ty2>*, <ty>**) void @llvm.gcwrite(<ty>*, <ty2>*, <ty>**) And for @llvm.gcroot, the first stack slot is verified to be an alloca or a bitcast of an alloca. Fixes test/CodeGen/Generic/GC/lower_gcroot.ll, which violated these. llvm-svn: 42051
* Update GEP constructors to use an iterator interface to fixDavid Greene2007-09-041-1/+1
| | | | | | GLIBCXX_DEBUG issues. llvm-svn: 41697
* use a nicer accessor.Chris Lattner2007-08-181-1/+1
| | | | llvm-svn: 41165
* Fix the verification for overloaded intrinsic types. Check that they areDan Gohman2007-08-161-6/+19
| | | | | | what they're supposed to be before using them. llvm-svn: 41130
* Add MVT::fAny for overloading intrinsics on floating-point types.Dan Gohman2007-08-161-0/+14
| | | | llvm-svn: 41128
* 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
OpenPOWER on IntegriCloud