Commit Graph

3250 Commits

Author SHA1 Message Date
Eli Friedman
e2f93131fb Revert r108401; it breaks bootstrap :(
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108407 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-15 05:09:31 +00:00
Eli Friedman
3ed60a2a22 Add AssertingVH which makes PR7647 break consistently.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108401 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-15 04:46:14 +00:00
Dan Gohman
545d00645c Add a lint check for mismatched return types, inspired by PR6944.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108162 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-12 18:02:04 +00:00
Duncan Sands
3472766f9e Convert some tab stops into spaces.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108130 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-12 08:16:59 +00:00
Chandler Carruth
490b8f5d64 Add parentheses around an || to correct the logic. Also silences a GCC warning
that was actually useful here.

Chris, please double check that this is the correct interpretation. I was
pretty sure, and ran it by Nick as well.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108129 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-12 06:47:05 +00:00
Chris Lattner
eae2895120 fix PR7429, a crash turning a load from a string into a float.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108113 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-12 00:22:51 +00:00
Gabor Greif
19e5ada58a remove useless cast and fix typos in comment
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107989 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-09 16:42:04 +00:00
Gabor Greif
f64f9cf7ec cache result of operator*
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107988 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-09 16:39:02 +00:00
Gabor Greif
8ba992ad52 cache result of operator*
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107982 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-09 16:22:36 +00:00
Gabor Greif
d7cc5215f1 cache result of operator*
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107978 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-09 15:53:42 +00:00
Gabor Greif
1f2c0c9ead cache result of operator*
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107977 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-09 15:52:36 +00:00
Gabor Greif
7656018c22 cache result of operator*
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107976 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-09 15:40:10 +00:00
Gabor Greif
5891ac8be8 cache result of operator*
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107967 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-09 14:28:41 +00:00
Gabor Greif
517e124d53 do not repeatedly dereference use_iterator
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107963 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-09 13:17:13 +00:00
Stuart Hastings
99cfb69f17 Reverting r107918 and r107919. Radar 8063111.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107930 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-08 23:25:39 +00:00
Stuart Hastings
c0e2639a34 Fix decl/def debug info for template functions. Radar 8063111.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107919 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-08 22:28:59 +00:00
Dan Gohman
b8c86a010c Minore code simplification.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107777 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-07 14:30:04 +00:00
Dan Gohman
9e86f4364b Remove interprocedural-basic-aa and associated code. The AliasAnalysis
interface needs implementations to be consistent, so any code which
wants to support different semantics must use a different interface.
It's not currently worthwhile to add a new interface for this new
concept.

Document that AliasAnalysis doesn't support cross-function queries.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107776 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-07 14:27:09 +00:00
Gabor Greif
274fefdd96 conditionalize by CallInst::ArgOffset
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107767 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-07 10:34:03 +00:00
Dan Gohman
0ce249911b Add some more TODO comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107657 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-06 15:23:00 +00:00
Dan Gohman
d3b6e41ffb Add a comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107656 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-06 15:21:57 +00:00
Dan Gohman
21de4c0daf Remove context sensitivity concerns from interprocedural-basic-aa, and
make it more aggressive in cases where both pointers are known to live
in the same function.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107420 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-01 20:08:40 +00:00
Dan Gohman
06028bcce4 In ScalarEvolution::forgetValue, eliminate any SCEVUnknown
entries associated with the value being erased in the
folding set map.  These entries used to be harmless, because
a SCEVUnknown doesn't store any information about its Value*,
so having a new Value allocated at the old Value's address
wasn't a problem. But now that ScalarEvolution is storing more
information about values, this is no longer safe.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107316 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-30 20:21:12 +00:00
Dan Gohman
70eff63008 Revert the part of r107257 which introduced new logic for using
nsw and nuw flags from IR Instructions. On further consideration,
this isn't valid.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107298 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-30 17:27:11 +00:00
Dan Gohman
b9f9651445 Improve ScalarEvolution's nsw and nuw preservation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107257 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-30 07:16:37 +00:00
Dan Gohman
8a18d6b48f When computing a new ConservativeResult, intersect it with
the old one instead of replacing it, to be more precise.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107256 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-30 06:58:35 +00:00
Dan Gohman
49bda917db Rework scev-aa's basic computation so that it doesn't depend
on ScalarEvolution successfully folding and preserving
range information for both A-B and B-A. Now, if it gets
either one, it's sufficient.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107249 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-30 06:12:16 +00:00
Dan Gohman
204b7cad7a Simplify.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107248 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-30 06:09:46 +00:00
Dan Gohman
1104645eef Fix ScalarEvolution's tripcount computation for chains of loops
where each loop's induction variable's start value is the exit
value of a preceding loop.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107224 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-29 23:43:06 +00:00
Dan Gohman
6f205cbceb Fix whitespace style.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107175 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-29 18:12:34 +00:00
Duncan Sands
374acd0891 Remove a pointless variable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107128 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-29 11:39:45 +00:00
Benjamin Kramer
3432d70d5b Use a more obvious way to avoid compiling functions which are only used when XDEBUG is enabled.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107125 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-29 10:03:11 +00:00
Chandler Carruth
ca9f7efdf8 Jump through some silly hoops to make GCC accept that a function may not always
be called.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107124 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-29 06:46:00 +00:00
Dan Gohman
7a64257f94 Just as its not safe to blindly transfer the nsw bit from an add
instruction to an add scev, it's not safe to blindly transfer the
inbounds flag from a gep instruction to an nsw on the scev for the
gep.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107117 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-29 01:41:41 +00:00
Dan Gohman
6be2bd516a Add an Intraprocedural form of BasicAliasAnalysis, which aims to
properly handles instructions and arguments defined in different
functions, or across recursive function iterations.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107109 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-29 00:50:39 +00:00
Dan Gohman
50f424c3d0 Fix Value::stripPointerCasts and BasicAA to avoid trouble on
code in unreachable blocks, which have have use-def cycles.
This fixes PR7514.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107071 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-28 21:16:52 +00:00
Dan Gohman
8d121694a3 Generalize AAEval so that it can be used both per-function and
interprocedurally. Note that as of this writing, existing alias
analysis passes are not prepared to be used interprocedurally.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107013 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-28 16:01:37 +00:00
Devang Patel
fd5fdc3863 Use named MDNode, llvm.dbg.sp, to collect subprogram info. This will be used to emit local variable's debug info of deleted functions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106989 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-28 05:53:08 +00:00
Devang Patel
acc6efa176 Do not forget last element, function, while creating Subprogram definition MDNode from subprogram declare MDNode.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106985 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-27 21:04:31 +00:00
Dan Gohman
420ab9102c Eliminate a redundant FoldingSet lookup.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106872 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-25 18:47:08 +00:00
Dan Gohman
eaf6cf28dd Don't try to preserve pointer types in SCEVConstants; the old code
was over-complicated.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106760 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-24 16:47:03 +00:00
Dan Gohman
1faa88280e Make the trunc code consistent with the zext and sext code in its
handling of pointer types.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106757 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-24 16:33:38 +00:00
Gabor Greif
71339c965c use ArgOperand accessors
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106697 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-23 23:38:07 +00:00
Gabor Greif
8ff72b5344 use the new isFreeCall API and ArgOperand accessors
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106692 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-23 22:48:06 +00:00
Gabor Greif
02680f946b minor enhancement to llvm::isFreeCall API: return CallInst; no functional change
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106686 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-23 21:51:12 +00:00
Gabor Greif
e3401c4fae use ArgOperand getters
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106685 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-23 21:41:47 +00:00
Dan Gohman
605c14fb11 Replace ScalarEvolution's private copy of getLoopPredecessor
with LoopInfo's public copy.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106603 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-22 23:43:28 +00:00
Dan Gohman
fe60104ac9 Use pre-increment instead of post-increment when the result is not used.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106542 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-22 15:08:57 +00:00
Dan Gohman
9d4588ffad Allow "exhaustive" trip count evaluation on phi nodes with all
constant operands.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106537 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-22 13:15:46 +00:00
Devang Patel
a762b09310 Use single interface, using twine, to get named metadata.
getNamedMetadata().


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106518 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-22 01:19:38 +00:00