Commit Graph

117 Commits

Author SHA1 Message Date
Dan Gohman
49a372cebc Fix the noalias checking so that it doesn't worry about
an argument aliasing itself. Thanks Duncan!

llvm-svn: 105288
2010-06-01 20:51:40 +00:00
Dan Gohman
0fa67e479a Add lint checks for function attributes.
llvm-svn: 105009
2010-05-28 21:43:57 +00:00
Dan Gohman
c575ec61ea Fix lint's memcpy and memmove checks, and its basic block traversal.
llvm-svn: 104970
2010-05-28 17:44:00 +00:00
Dan Gohman
862f034188 Detect self-referential values.
llvm-svn: 104957
2010-05-28 16:45:33 +00:00
Dan Gohman
cef9fc37f4 Eli pointed out that va_arg instruction result values don't
reference the stack.

llvm-svn: 104951
2010-05-28 16:34:49 +00:00
Dan Gohman
54d7aaa819 Teach lint how to look through simple store+load pairs and other
effective no-op constructs, to make it more effective on
unoptimized IR.

llvm-svn: 104950
2010-05-28 16:21:24 +00:00
Dan Gohman
ddba4b725a Add a lint check for returning the address of stack memory.
llvm-svn: 104936
2010-05-28 04:33:42 +00:00
Dan Gohman
084bcb1322 Fix Lint printing warnings multiple times. Remove the ErrorStr
option from lintModule, which was an artifact from being
based on Verifier code.

llvm-svn: 104765
2010-05-26 22:28:53 +00:00
Dan Gohman
a20a5cd24f Reinstate checking of stackrestore, with checking for both Read
and Write, and add a comment explaining this.

llvm-svn: 104756
2010-05-26 22:21:25 +00:00
Dan Gohman
996bc42a26 Stackrestore is not a load.
llvm-svn: 104752
2010-05-26 22:00:10 +00:00
Dan Gohman
c96c6db59d Remove a TODO which isn't practical.
llvm-svn: 104748
2010-05-26 21:50:41 +00:00
Dan Gohman
1249adf160 Implement checking of the tail keyword.
llvm-svn: 104744
2010-05-26 21:46:36 +00:00
Dan Gohman
299e7b93ac Add lint checks for invalid uses of memory.
llvm-svn: 102733
2010-04-30 19:05:00 +00:00
Dan Gohman
c951e6e414 Tidy a comment.
llvm-svn: 102041
2010-04-22 01:30:05 +00:00
Dan Gohman
9ba08a4631 Add several more lint checks.
llvm-svn: 100841
2010-04-09 01:39:53 +00:00
Dan Gohman
7808d490d3 Add a few more lint checks.
llvm-svn: 100825
2010-04-08 23:05:57 +00:00
Dan Gohman
98bc4371c7 Add a -lint pass which checks for common sources of undefined or likely
unintended behavior.

llvm-svn: 100798
2010-04-08 18:47:09 +00:00