Alkis Evlogimenos
d0b5d0c7cc
Add the isunordered intrinsic.
...
llvm-svn: 14127
2004-06-11 01:08:18 +00:00
Chris Lattner
71dbebf411
Fix PR361.
...
Dominance properties don't hold in unreachable code
llvm-svn: 14053
2004-06-07 23:07:33 +00:00
Chris Lattner
307e1df0d1
Fix GCC warning
...
llvm-svn: 14045
2004-06-05 17:44:48 +00:00
Chris Lattner
61bd8b3810
Work around VS bug
...
llvm-svn: 14036
2004-06-05 00:22:04 +00:00
Chris Lattner
f75832b015
* Verify function prototypes, not just functions with bodies.
...
* Verify that functions do not take aggregates as arguments.
llvm-svn: 13984
2004-06-03 06:38:43 +00:00
Reid Spencer
4148139dd9
Fix for bug 348.
...
The SymbolTable changes caused this one too.
llvm-svn: 13859
2004-05-27 21:58:13 +00:00
Reid Spencer
47cf71a61e
Convert to SymbolTable's new iteration interface. Remove tabs.
...
llvm-svn: 13753
2004-05-25 08:53:29 +00:00
Chris Lattner
9c251eb0ad
Recognize and verify the new GC intrinsics.
...
llvm-svn: 13687
2004-05-23 21:16:51 +00:00
Chris Lattner
ab5aa14403
Fix for PR340: Verifier misses malformed switch instruction
...
llvm-svn: 13618
2004-05-21 16:47:21 +00:00
Brian Gaeke
e8a6bf3d21
Fold two assertions with backwards error messages into one with a
...
correct error message.
llvm-svn: 13590
2004-05-17 21:15:18 +00:00
John Criswell
987ad1945d
Fixed inconsistent indentation.
...
llvm-svn: 13363
2004-05-04 21:46:05 +00:00
Chris Lattner
0377e4384f
Make sure to check for a very bad class of errors: an instruction
...
that does not dominate all of its users, but is in the same basic block as
its users. This class of error is what caused the mysterious CBE only
failures last night.
llvm-svn: 12979
2004-04-16 05:51:47 +00:00
John Criswell
c4e72c9a0a
Remove the return type check for llvm.readio. This check is done for all
...
functions and is not needed here.
Simplify the pointer type check per Chris's suggestions.
llvm-svn: 12945
2004-04-14 15:06:48 +00:00
John Criswell
0c654c6a4e
Added code to verify that llvm.readio's pointer argument returns something
...
that matches its return type.
llvm-svn: 12944
2004-04-14 14:49:36 +00:00
John Criswell
23c48d63d6
Finish adding the llvm.readio and llvm.writeio intrinsics.
...
Sorry these didn't get in yesterday.
llvm-svn: 12942
2004-04-14 13:46:52 +00:00
John Criswell
2b4c96e758
Reversed the order of the llvm.writeport() operands so that the value
...
is listed first and the address is listed second.
llvm-svn: 12795
2004-04-09 19:09:14 +00:00
John Criswell
5201004ef9
Added the llvm.readport and llvm.writeport intrinsics.
...
The Verifier ensures that their parameters are of integral types and have
the correct sign, but it does not enforce any size restrictions because
such restrictions are platform dependent.
llvm-svn: 12781
2004-04-08 20:27:38 +00:00
Chris Lattner
a45a216ff6
Make the verifier API more complete and useful.
...
Patch contributed by Reid Spencer
llvm-svn: 12609
2004-04-02 15:45:08 +00:00
Chris Lattner
5f126b74d3
Add another check
...
llvm-svn: 12525
2004-03-29 00:29:36 +00:00
Chris Lattner
9ece94b02b
Catch some more cases of broken code. The loop extractor seems to be creating
...
situations where there is a branch that goes to a block in another function.
llvm-svn: 12379
2004-03-14 03:23:54 +00:00
Chris Lattner
b870ca7766
verifyFunction has been broken for a long time now. Fix it.
...
llvm-svn: 12377
2004-03-14 03:16:15 +00:00
Chris Lattner
071a5e5649
Rename the intrinsic enum values for llvm.va_* from Intrinsic::va_* to
...
Intrinsic::va*. This avoid conflicting with macros in the stdlib.h file.
llvm-svn: 12356
2004-03-13 00:24:00 +00:00
Chris Lattner
75648e7ae4
Add support for checking the select instruction
...
llvm-svn: 12325
2004-03-12 05:54:31 +00:00
Misha Brukman
c566ca36a1
Doxygenify comments.
...
llvm-svn: 12071
2004-03-02 00:22:19 +00:00
Chris Lattner
3705370df1
Fix Regression/Assembler/2004-02-27-SelfUseAssertError.ll
...
llvm-svn: 11913
2004-02-27 17:28:25 +00:00
Chris Lattner
d996e543eb
Make the verifier a little more explicit about this problem.
...
llvm-svn: 11811
2004-02-24 22:06:07 +00:00
Chris Lattner
dc632111bf
Add llvm.memset/frameaddress/returnaddress intrinsics.
...
llvm-svn: 11431
2004-02-14 02:47:17 +00:00
Chris Lattner
5ed171e317
Add support for the llvm.memmove intrinsic
...
Patch graciously contributed by Reid Spencer!
llvm-svn: 11355
2004-02-12 18:11:20 +00:00
Chris Lattner
17d028d52b
Implement the llvm.memcpy intrinsic
...
llvm-svn: 11349
2004-02-12 17:01:09 +00:00
Chris Lattner
02062823f7
Fix check. PHI nodes must be handled specially, of course.
...
llvm-svn: 10842
2004-01-14 05:42:52 +00:00
Chris Lattner
ec5089a223
Tighten up verifier checks. The result of an invoke instruction only
...
dominates the normal destination, not the exceptional dest (ie, the result
of a call is undefined on an exception)
llvm-svn: 10841
2004-01-14 04:25:59 +00:00
Chris Lattner
59f1ef40b0
Add support for new intrinsic
...
llvm-svn: 10701
2004-01-06 05:33:02 +00:00
Chris Lattner
3d903f0c0b
Add VMCore and code generator support for debugging intrinsics. By default
...
code generators completely ignore them.
llvm-svn: 10691
2004-01-05 05:36:30 +00:00
Chris Lattner
3ae303cc8c
Check return types of functions
...
llvm-svn: 10146
2003-11-21 22:32:23 +00:00
Chris Lattner
dcdc371522
Fix problem Reid was having with external globals and nonexternal linkage
...
llvm-svn: 10133
2003-11-21 20:33:27 +00:00
Chris Lattner
189d19fb04
Finegrainify namespacification
...
llvm-svn: 10131
2003-11-21 20:23:48 +00:00
Chris Lattner
7e5e456d96
Fix some problems with assertions printing
...
llvm-svn: 10129
2003-11-21 17:35:51 +00:00
Chris Lattner
9d72c2f229
improve error message
...
llvm-svn: 10128
2003-11-21 17:06:29 +00:00
Brian Gaeke
9f47927b28
When failing a Verifier assertion, use WriteAsOperand to print out the
...
offending types and/or values.
llvm-svn: 10041
2003-11-16 23:07:42 +00:00
Chris Lattner
ef901291c6
Expose the verifier to opt
...
llvm-svn: 9984
2003-11-13 19:47:29 +00:00
Chris Lattner
3b93c91836
Detect problems with PHI node operands!
...
llvm-svn: 9916
2003-11-12 07:13:37 +00:00
Brian Gaeke
960707c335
Put all LLVM code into the llvm namespace, as per bug 109.
...
llvm-svn: 9903
2003-11-11 22:41:34 +00:00
John Criswell
482202a601
Added LLVM project notice to the top of every C++ source file.
...
Header files will be on the way.
llvm-svn: 9298
2003-10-20 19:43:21 +00:00
Chris Lattner
5b33748497
Add support for the new varargs intrinsics and instructions
...
llvm-svn: 9226
2003-10-18 05:57:43 +00:00
Misha Brukman
fa100531e1
Fix spelling/grammar.
...
llvm-svn: 9023
2003-10-10 17:54:14 +00:00
Chris Lattner
df9779c5c2
Be more careful handling PHI nodes, which might be of potentially high degree.
...
This reduces the time to verify a function from eon with a large number of
large PHI nodes from 22996s (6.38 hours) to 10.5499s
llvm-svn: 8866
2003-10-05 17:44:18 +00:00
Chris Lattner
5dac64f629
Rename Function::getEntryNode -> getEntryBlock
...
llvm-svn: 8625
2003-09-20 14:39:18 +00:00
Brian Gaeke
ff713ae819
Make createVerifierPass return a FunctionPass *.
...
llvm-svn: 8449
2003-09-10 19:37:04 +00:00
Chris Lattner
04ecefe232
Eliminate support for the llvm.unwind intrinisic, using the Unwind instruction instead
...
llvm-svn: 8411
2003-09-08 19:44:26 +00:00
Chris Lattner
ea9891311a
As it turns out, things will be simpler than I first expected. We no longer
...
need any exception handling intrinsics beyond llvm.unwind. (yaay)
llvm-svn: 8145
2003-08-25 22:35:01 +00:00
Chris Lattner
7da3571af9
rethrow is really the language independent primitive here. "throw" can be written
...
in terms of it and llvm.exc.setcurrent.
Rework the intrinsics.
llvm-svn: 8110
2003-08-24 12:24:08 +00:00
Chris Lattner
ade9410c99
Initial support for recognizing LLVM exception handling intrinsics
...
llvm-svn: 8102
2003-08-24 05:30:29 +00:00
Chris Lattner
748e9e143b
Add intrinsics for the llvm.sig(set|long)jmp functions
...
llvm-svn: 7949
2003-08-18 15:41:24 +00:00
Misha Brukman
7eb05a170a
Spell `necessary' correctly.
...
llvm-svn: 7944
2003-08-18 14:43:39 +00:00
Chris Lattner
4159fdaef2
Add a bunch of new Alpha Intrinsics for Rahul Joshi
...
llvm-svn: 7646
2003-08-06 20:08:25 +00:00
Chris Lattner
60104f00c7
Add support for Alpha intrinsics, contributed by Rahul Joshi
...
llvm-svn: 7373
2003-07-28 21:20:57 +00:00
Chris Lattner
d295d99664
Fix (bogus) possibly uninitialized warning
...
llvm-svn: 6634
2003-06-05 21:01:26 +00:00
Chris Lattner
192623ec93
Add support for setjmp/longjmp primitives
...
Patch checked in for Bill Wendling :)
llvm-svn: 6241
2003-05-17 22:26:33 +00:00
Chris Lattner
bad4b4a52b
llvm.va_start only takes on argument now
...
Verify that va_start doesn't occur in functions with no varargs
llvm-svn: 6038
2003-05-08 15:55:31 +00:00
Chris Lattner
bb346d07b5
Add more support for intrinsic functions and for varargs stuff
...
llvm-svn: 6035
2003-05-08 03:47:33 +00:00
Chris Lattner
f70da10697
Add support for the new va_arg instruction
...
llvm-svn: 6029
2003-05-08 02:44:12 +00:00
Chris Lattner
534952b0d5
Remove arbitrary limitation
...
llvm-svn: 5818
2003-04-19 00:50:37 +00:00
Chris Lattner
3ac483bc89
Add code to verify correctly linkages
...
llvm-svn: 5788
2003-04-16 20:42:40 +00:00
Chris Lattner
6a61d257d6
Fix bug Regression/Verifier/2002-11-05-GetelementptrPointers.ll
...
llvm-svn: 5273
2003-01-14 22:19:44 +00:00
Chris Lattner
903a25d225
User defined operators are not supposed to live beyond the lifetime of the
...
pass. Detect and flag them.
llvm-svn: 4801
2002-11-21 16:54:22 +00:00
Chris Lattner
98cf1f5d64
- Eliminated the deferred symbol table stuff in Module & Function, it really
...
wasn't an optimization and it was causing lots of bugs.
llvm-svn: 4779
2002-11-20 18:36:02 +00:00
Chris Lattner
149376dee5
- Change Function's so that their argument list is populated when they are
...
constructed. Before, external functions would have an empty argument list,
now a Function ALWAYS has a populated argument list.
llvm-svn: 4149
2002-10-13 20:57:00 +00:00
Chris Lattner
78bc0fa29f
Check that we don't have external varaibles with internal linkage
...
llvm-svn: 4051
2002-10-06 22:47:32 +00:00
Chris Lattner
4cd9df88a7
PHI nodes are not allowed to exist with zero incoming values, check that
...
there aren't any like this.
llvm-svn: 4044
2002-10-06 21:00:31 +00:00
Chris Lattner
a450397247
Make sure that we abort if an error happens as early as neccesary. Before
...
it was possible for the passmanager to continue running passes after the
verifier even if the module was not well formed.
llvm-svn: 3820
2002-09-19 16:12:19 +00:00
Chris Lattner
80a2568f9b
Fix typeo in assertion message
...
llvm-svn: 3641
2002-09-10 04:52:59 +00:00
Chris Lattner
1f41925300
Do not allow adds of pointer types, or many other operations on pointer types.
...
llvm-svn: 3638
2002-09-09 20:26:04 +00:00
Chris Lattner
dfb3a2cd07
Eliminated the MemAccessInst class, folding contents into GEP class.
...
llvm-svn: 3487
2002-08-22 23:37:20 +00:00
Chris Lattner
cd709cbf53
Load & StoreInst no longer derive from MemAccessInst, so we don't have
...
to handle indexing anymore
llvm-svn: 3485
2002-08-22 22:49:05 +00:00
Chris Lattner
40eb9dafed
- Cleaned up the interface to AnalysisUsage to take analysis class names
...
instead of ::ID's.
- Pass::getAnalysis<> now no longer takes an optional argument
llvm-svn: 3264
2002-08-08 19:01:28 +00:00
Chris Lattner
8e72d6f6e9
Implement dominator checking in the verifier, so that we check that all
...
defintiions dominate their uses
llvm-svn: 3214
2002-08-02 17:37:08 +00:00
Chris Lattner
00fb26cf4d
Register Verifier pass
...
llvm-svn: 3019
2002-07-23 18:08:17 +00:00
Chris Lattner
7af3ee9840
Add a hack to check for a subset of true dominance properties
...
llvm-svn: 2947
2002-07-18 00:13:42 +00:00
Anand Shukla
8c37789a33
changes for 64bit gcc
...
llvm-svn: 2801
2002-06-25 22:07:38 +00:00
Chris Lattner
069a795940
* Update to work with Megapatch
...
* Add two new checks:
* PHI nodes must be the first thing in a basic block, all grouped together
* All basic blocks should only end with terminator insts, not contain them
llvm-svn: 2773
2002-06-25 15:56:27 +00:00
Chris Lattner
338a462110
Verify that function call arguments match the function signature
...
llvm-svn: 2553
2002-05-08 19:49:50 +00:00
Chris Lattner
d5a847057b
Eliminate duplicate or unneccesary #include's
...
llvm-svn: 2397
2002-04-29 17:42:12 +00:00
Chris Lattner
37104aace8
Add new optional getPassName() virtual function that a Pass can override
...
to make debugging output a lot nicer.
llvm-svn: 2395
2002-04-29 14:57:45 +00:00
Chris Lattner
f12cc842b3
Tighten up the AnalysisUsage of lots of passes, primarily to correctly indicate whether or not they invalidate the CFGA
...
llvm-svn: 2386
2002-04-28 21:27:06 +00:00
Chris Lattner
412d277f4a
Remove extra unused argument from CheckFailed method
...
Remove extraneous \n's from assert strings
llvm-svn: 2367
2002-04-28 16:06:24 +00:00
Chris Lattner
9713b840cf
The check to see if an external function was marked internal was not reachable!
...
llvm-svn: 2366
2002-04-28 16:04:26 +00:00
Chris Lattner
c8e665431b
* Rename MethodPass class to FunctionPass
...
- Rename runOnMethod to runOnFunction
* Transform getAnalysisUsageInfo into getAnalysisUsage
- Method is now const
- It now takes one AnalysisUsage object to fill in instead of 3 vectors
to fill in
- Pass's now specify which other passes they _preserve_ not which ones
they modify (be conservative!)
- A pass can specify that it preserves all analyses (because it never
modifies the underlying program)
* s/Method/Function/g in other random places as well
llvm-svn: 2333
2002-04-27 06:56:12 +00:00
Chris Lattner
d46bb6e933
* Abort program on verification errors
...
* Verify that load, store, and GEP instructions indices are correct, because
they _continually_ bite me on this pool allocations stuff
llvm-svn: 2309
2002-04-24 19:12:21 +00:00
Chris Lattner
21ea83bb3e
Add some basic checks of CallInst's.
...
Assert now returns from the current function on error.
llvm-svn: 2308
2002-04-18 22:11:52 +00:00
Chris Lattner
0e851daf53
* Convert the verifier to use an InstVisitor to be better structured
...
* Implement checking that a binary operator's two sides are the same type
* Actually check that an instruction does not have a name if it has a void
return type.
llvm-svn: 2305
2002-04-18 20:37:37 +00:00
Chris Lattner
af95e589df
* Fix bug: test/Regression/Verifier/2002-04-13-RetTypes.ll
...
* Check that arguments match the method types of the method they live in
llvm-svn: 2243
2002-04-13 22:48:46 +00:00
Chris Lattner
486302a0e6
Add new check of return value type matching ret instruction values types
...
llvm-svn: 2230
2002-04-12 18:20:49 +00:00
Chris Lattner
f739fa8541
s/Method/Function
...
llvm-svn: 2180
2002-04-08 22:03:57 +00:00
Chris Lattner
3d381bb4d9
Remove some gross code by using the Value::dump method to do debug dumps
...
llvm-svn: 2150
2002-04-07 22:33:13 +00:00
Chris Lattner
3e6e3e6bce
* s/Method/Function
...
* Implement a check to make sure a function is not internal and external
at the same time
llvm-svn: 2050
2002-03-29 19:06:18 +00:00
Chris Lattner
fbf5be52c3
Checkin new test for problem anand ran into
...
llvm-svn: 1880
2002-03-15 20:25:09 +00:00
Chris Lattner
7704e9f337
Add a check to ensure that only PHI nodes are self referential. Code
...
input to instruction combination was broken, which caused it to explode.
llvm-svn: 1870
2002-03-14 16:53:48 +00:00
Chris Lattner
b67f732b8c
Expose more entry points to the verifier
...
llvm-svn: 1815
2002-02-26 21:45:33 +00:00
Chris Lattner
43373a6868
Make it compile with GCC 3.0.4
...
llvm-svn: 1786
2002-02-24 23:01:21 +00:00
Chris Lattner
d02f08dec9
Actually implement some checking in the verifier.
...
These specific problems were ones Anand ran into in his work and seem not
uncommon for beginners.
llvm-svn: 1781
2002-02-20 17:55:43 +00:00
Chris Lattner
ccf571a408
Convert analyses to new pass structure
...
llvm-svn: 1603
2002-01-31 00:42:27 +00:00
Chris Lattner
7f74a56e24
Changes to build successfully with GCC 3.02
...
llvm-svn: 1503
2002-01-20 22:54:45 +00:00
Chris Lattner
68289f0b89
Add notes
...
llvm-svn: 1163
2001-11-06 22:53:11 +00:00
Chris Lattner
dea211ea67
Remove #include of nonexistant header file
...
llvm-svn: 443
2001-09-07 16:32:10 +00:00
Chris Lattner
d77f3c0cbd
Added a note about a new verification the verifier should do
...
Removed a redundant check
llvm-svn: 100
2001-06-29 05:22:12 +00:00
Chris Lattner
4cee8d8ffb
Miscellaneous cleanups:
...
* Convert post to pre-increment for for loops
* Use generic programming more
* Use new Value::cast* instructions
* Use new Module, Method, & BasicBlock forwarding methods
* Use new facilities in STLExtras.h
* Use new Instruction::isPHINode() method
llvm-svn: 96
2001-06-27 23:41:11 +00:00
Chris Lattner
2f7c963559
Initial revision
...
llvm-svn: 2
2001-06-06 20:29:01 +00:00