Commit Graph

91 Commits

Author SHA1 Message Date
NAKAMURA Takumi 2a61f4e364 test/Other/close-stderr.ll: Require the feature 'shell'. It is not executable on Win32 but it is executable on MSYS-bash.
llvm-svn: 121105
2010-12-07 02:43:58 +00:00
Dan Gohman 02538ac4d3 Make BasicAliasAnalysis a normal AliasAnalysis implementation which
does normal initialization and normal chaining. Change the default
AliasAnalysis implementation to NoAlias.

Update StandardCompileOpts.h and friends to explicitly request
BasicAliasAnalysis.

Update tests to explicitly request -basicaa.

llvm-svn: 116720
2010-10-18 18:04:47 +00:00
Devang Patel 57da4caa85 Remove LoopIndexSplit pass. It is neither maintained nor used by anyone.
llvm-svn: 116004
2010-10-07 23:29:37 +00:00
Bob Wilson 3aecb15f0a Fix llvm-extract so that it changes the linkage of all GlobalValues to
"external" even when doing lazy bitcode loading.  This was broken because
a function that is not materialized fails the !isDeclaration() test.

llvm-svn: 114666
2010-09-23 17:25:06 +00:00
Dan Gohman 0d2c07cf58 Fix llvm-extract -delete's lazy loading to materialize the functions that
will not be deleted, rather than the ones that will.

llvm-svn: 114614
2010-09-23 00:33:13 +00:00
Jakob Stoklund Olesen 728941fabc XFAIL test under valgrind. It is not really our problem if sh is leaking.
llvm-svn: 113550
2010-09-09 22:02:13 +00:00
Chris Lattner 13ee795c42 remove unions from LLVM IR. They are severely buggy and not
being actively maintained, improved, or extended.

llvm-svn: 112356
2010-08-28 04:09:24 +00:00
Chandler Carruth ebf42ac831 Try to escape the '$'s in these so they reach the underlying 'sh' invocation.
I have no idea how lit did the right thing here, but other test runners don't.

llvm-svn: 111805
2010-08-23 08:54:19 +00:00
Dan Gohman 492c2ea31e Add a testcase to verify that commands don't crash when they hit
errors on stderr.

llvm-svn: 111440
2010-08-18 22:35:56 +00:00
Dan Gohman fb83b043eb Revert r111058, the lint check for indirectbr successors that aren't
address-taken. This can occur normally, if the code which took the
address got DCEd.

llvm-svn: 111121
2010-08-16 14:39:19 +00:00
Dan Gohman 21e6dc6aa3 Add a lint check for an indirectbr destination which has not
had its address taken.

llvm-svn: 111058
2010-08-13 23:56:28 +00:00
Dan Gohman d8968da2c5 Add a lint check for indirectbr with no successors.
llvm-svn: 110074
2010-08-02 23:06:43 +00:00
Benjamin Kramer d9624e2d2e Remove XFAIL, test doesn't leak anymore.
llvm-svn: 109801
2010-07-29 20:36:36 +00:00
Dan Gohman c128e70ff2 Add a lint check for mismatched return types, inspired by PR6944.
llvm-svn: 108162
2010-07-12 18:02:04 +00:00
Dan Gohman 559020df1d Don't write a file named "&1".
llvm-svn: 106269
2010-06-18 01:49:17 +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 672393f6c7 Remove this va_arg test, which is no longer applicable.
llvm-svn: 104956
2010-05-28 16:44:04 +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
Gabor Greif 38303d7e3b rename test to represent meaningful date
llvm-svn: 104831
2010-05-27 09:32:38 +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 1249adf160 Implement checking of the tail keyword.
llvm-svn: 104744
2010-05-26 21:46:36 +00:00
Daniel Dunbar 148e876ac2 XFAIL the test I added with vg_leak, apparently it is the first and only llc
-filetype=obj test, and -filetype=obj leaks a few objects. Added a FIXME, we
need to sort out the ownership model for the various MC objects.

llvm-svn: 103769
2010-05-14 07:47:51 +00:00
Daniel Dunbar 3439ed6324 Inline Asm: Ensure buffer is newline terminated to match how the text is printed.
- This is a hack, but I can't decide the best place to handle this. Chris?

llvm-svn: 103765
2010-05-14 04:31:50 +00:00
Chris Lattner d86a5a5e45 this really is needed. :(
llvm-svn: 103434
2010-05-10 21:23:48 +00:00
Chris Lattner ba44bf052a just remove this, it isn't needed.
llvm-svn: 103432
2010-05-10 21:01:47 +00:00
Chris Lattner 05b4caff3e fix a pretty obvious typo. We test things before committing them, right?
llvm-svn: 103427
2010-05-10 20:51:06 +00:00
David Greene 103d4b43e9 Fix PR6875:
This includes a patch by Roman Divacky to fix the initial crash.

Move the actual addition of passes from *PassManager::add to
*PassManager::addImpl.  That way, when adding printer passes we won't
recurse infinitely.

Finally, check to make sure that we are actually adding a FunctionPass
to a FunctionPassManager before doing a print before or after it.
Immutable passes are strange in this way because they aren't
FunctionPasses yet they can be and are added to the FunctionPassManager.

llvm-svn: 103425
2010-05-10 20:24:27 +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 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
Dan Gohman 474e488c06 Constant-fold GEP-of-GEP into a single GEP.
llvm-svn: 98178
2010-03-10 19:31:51 +00:00
Dan Gohman fc7a25dc36 Fix whitespace.
llvm-svn: 98173
2010-03-10 19:00:54 +00:00
Chris Lattner d35a728a34 stop using anders-aa
llvm-svn: 97492
2010-03-01 20:24:50 +00:00
Dan Gohman a2684dbff0 Teach the constant folder about union types.
llvm-svn: 97142
2010-02-25 16:45:19 +00:00
Dan Gohman 183a423af9 Canonicalize sizeof and alignof on pointer types to a canonical
pointer type.

llvm-svn: 95769
2010-02-10 06:13:07 +00:00
Dan Gohman f644af8bbe Factor out alignof expression folding into a separate function and
generalize it to handle more cases.

llvm-svn: 95045
2010-02-02 01:41:39 +00:00
Dan Gohman e5e1b7b05a Generalize target-independent folding rules for sizeof to handle more
cases, and implement target-independent folding rules for alignof and
offsetof. Also, reassociate reassociative operators when it leads to
more folding.

Generalize ScalarEvolution's isOffsetOf to recognize offsetof on
arrays. Rename getAllocSizeExpr to getSizeOfExpr, and getFieldOffsetExpr
to getOffsetOfExpr, for consistency with analagous ConstantExpr routines.

Make the target-dependent folder promote GEP array indices to
pointer-sized integers, to make implicit casting explicit and exposed
to subsequent folding.

And add a bunch of testcases for this new functionality, and a bunch
of related existing functionality.

llvm-svn: 94987
2010-02-01 18:27:38 +00:00
Dan Gohman a424b9fbd1 Remove the folding rule
getelementptr (i8* inttoptr (i64 1 to i8*), i32 -1) 
  to
  inttoptr (i64 0 to i8*)
from the VMCore constant folder. It didn't handle sign-extension properly
in the case where the source integer is smaller than a pointer size. And,
it relied on an assumption about sizeof(i8).

The Analysis constant folder still folds these kinds of things; it has
access to TargetData, so it can do them right.

Add a testcase which tests that the VMCore constant folder doesn't
miscompile this, and that the Analysis folder does fold it.

llvm-svn: 94750
2010-01-28 18:08:26 +00:00
Dan Gohman 80386c10d4 -disable-output is no longer needed with -analyze.
llvm-svn: 94574
2010-01-26 19:25:59 +00:00
Chris Lattner 23ac41e8f0 fix bogus test
llvm-svn: 93069
2010-01-09 19:24:49 +00:00
Dan Gohman fb4193625a Delete useless trailing semicolons.
llvm-svn: 92740
2010-01-05 17:55:26 +00:00
Dan Gohman 7f2413f18b Update these tests to match what Loop::print now prints.
llvm-svn: 85021
2009-10-24 23:52:07 +00:00
Nick Lewycky c5cb3bd927 Forbid arrays of function-type and structures with function-typed fields.
While I'm there, change code that does:
  SomeTy == Type::getFooType(Context)
into:
  SomeTy->getTypeID() == FooTyID
to decrease the amount of useless type creation which may involve locking, etc.

llvm-svn: 81846
2009-09-15 06:28:26 +00:00
Dan Gohman 0f3ef7be50 Eliminate more redundant llvm-as calls.
llvm-svn: 81540
2009-09-11 18:17:12 +00:00
Dan Gohman 1880092722 Change tests from "opt %s" to "opt < %s" so that opt doesn't see the
input filename so that opt doesn't print the input filename in the
output so that grep lines in the tests don't unintentionally match
strings in the input filename.

llvm-svn: 81537
2009-09-11 18:01:28 +00:00