1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-22 12:33:33 +02:00
Commit Graph

3209 Commits

Author SHA1 Message Date
Dan Gohman
0af129aa1b Add a lint check for mismatched return types, inspired by PR6944.
llvm-svn: 108162
2010-07-12 18:02:04 +00:00
Duncan Sands
f7b98e2b1e Convert some tab stops into spaces.
llvm-svn: 108130
2010-07-12 08:16:59 +00:00
Chandler Carruth
6b1b1c63b9 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.

llvm-svn: 108129
2010-07-12 06:47:05 +00:00
Chris Lattner
d8288040c3 fix PR7429, a crash turning a load from a string into a float.
llvm-svn: 108113
2010-07-12 00:22:51 +00:00
Gabor Greif
0a544667f8 remove useless cast and fix typos in comment
llvm-svn: 107989
2010-07-09 16:42:04 +00:00
Gabor Greif
a2c75f904d cache result of operator*
llvm-svn: 107988
2010-07-09 16:39:02 +00:00
Gabor Greif
e249fc8808 cache result of operator*
llvm-svn: 107982
2010-07-09 16:22:36 +00:00
Gabor Greif
1277447002 cache result of operator*
llvm-svn: 107978
2010-07-09 15:53:42 +00:00
Gabor Greif
9096841571 cache result of operator*
llvm-svn: 107977
2010-07-09 15:52:36 +00:00
Gabor Greif
6184b1a2fa cache result of operator*
llvm-svn: 107976
2010-07-09 15:40:10 +00:00
Gabor Greif
6c80602356 cache result of operator*
llvm-svn: 107967
2010-07-09 14:28:41 +00:00
Gabor Greif
7bc80c7586 do not repeatedly dereference use_iterator
llvm-svn: 107963
2010-07-09 13:17:13 +00:00
Stuart Hastings
a3999081cf Reverting r107918 and r107919. Radar 8063111.
llvm-svn: 107930
2010-07-08 23:25:39 +00:00
Stuart Hastings
b70d4e06e3 Fix decl/def debug info for template functions. Radar 8063111.
llvm-svn: 107919
2010-07-08 22:28:59 +00:00
Dan Gohman
dbfdd07710 Minore code simplification.
llvm-svn: 107777
2010-07-07 14:30:04 +00:00
Dan Gohman
2a08e2ce81 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.

llvm-svn: 107776
2010-07-07 14:27:09 +00:00
Gabor Greif
600c671ab6 conditionalize by CallInst::ArgOffset
llvm-svn: 107767
2010-07-07 10:34:03 +00:00
Dan Gohman
0cea029f14 Add some more TODO comments.
llvm-svn: 107657
2010-07-06 15:23:00 +00:00
Dan Gohman
fa0252225f Add a comment.
llvm-svn: 107656
2010-07-06 15:21:57 +00:00
Dan Gohman
f9365363db 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.

llvm-svn: 107420
2010-07-01 20:08:40 +00:00
Dan Gohman
547c92af20 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.

llvm-svn: 107316
2010-06-30 20:21:12 +00:00
Dan Gohman
683a9e2498 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.

llvm-svn: 107298
2010-06-30 17:27:11 +00:00
Dan Gohman
b7fc09a156 Improve ScalarEvolution's nsw and nuw preservation.
llvm-svn: 107257
2010-06-30 07:16:37 +00:00
Dan Gohman
7446416058 When computing a new ConservativeResult, intersect it with
the old one instead of replacing it, to be more precise.

llvm-svn: 107256
2010-06-30 06:58:35 +00:00
Dan Gohman
2112bbf184 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.

llvm-svn: 107249
2010-06-30 06:12:16 +00:00
Dan Gohman
01304ebfad Simplify.
llvm-svn: 107248
2010-06-30 06:09:46 +00:00
Dan Gohman
32534063c7 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.

llvm-svn: 107224
2010-06-29 23:43:06 +00:00
Dan Gohman
1c9ce3e66d Fix whitespace style.
llvm-svn: 107175
2010-06-29 18:12:34 +00:00
Duncan Sands
b367b1e428 Remove a pointless variable.
llvm-svn: 107128
2010-06-29 11:39:45 +00:00
Benjamin Kramer
acb45b427b Use a more obvious way to avoid compiling functions which are only used when XDEBUG is enabled.
llvm-svn: 107125
2010-06-29 10:03:11 +00:00
Chandler Carruth
e9bf8c4ee8 Jump through some silly hoops to make GCC accept that a function may not always
be called.

llvm-svn: 107124
2010-06-29 06:46:00 +00:00
Dan Gohman
f5dfb360be 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.

llvm-svn: 107117
2010-06-29 01:41:41 +00:00
Dan Gohman
37bf33ccff Add an Intraprocedural form of BasicAliasAnalysis, which aims to
properly handles instructions and arguments defined in different
functions, or across recursive function iterations.

llvm-svn: 107109
2010-06-29 00:50:39 +00:00
Dan Gohman
bd121d9b9f Fix Value::stripPointerCasts and BasicAA to avoid trouble on
code in unreachable blocks, which have have use-def cycles.
This fixes PR7514.

llvm-svn: 107071
2010-06-28 21:16:52 +00:00
Dan Gohman
d454f5c234 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.

llvm-svn: 107013
2010-06-28 16:01:37 +00:00
Devang Patel
fdca552823 Use named MDNode, llvm.dbg.sp, to collect subprogram info. This will be used to emit local variable's debug info of deleted functions.
llvm-svn: 106989
2010-06-28 05:53:08 +00:00
Devang Patel
858a0f3664 Do not forget last element, function, while creating Subprogram definition MDNode from subprogram declare MDNode.
llvm-svn: 106985
2010-06-27 21:04:31 +00:00
Dan Gohman
01de3704f9 Eliminate a redundant FoldingSet lookup.
llvm-svn: 106872
2010-06-25 18:47:08 +00:00
Dan Gohman
bfbfa95b51 Don't try to preserve pointer types in SCEVConstants; the old code
was over-complicated.

llvm-svn: 106760
2010-06-24 16:47:03 +00:00
Dan Gohman
35a5a7285a Make the trunc code consistent with the zext and sext code in its
handling of pointer types.

llvm-svn: 106757
2010-06-24 16:33:38 +00:00
Gabor Greif
b86c04f740 use ArgOperand accessors
llvm-svn: 106697
2010-06-23 23:38:07 +00:00
Gabor Greif
bfb7386690 use the new isFreeCall API and ArgOperand accessors
llvm-svn: 106692
2010-06-23 22:48:06 +00:00
Gabor Greif
4615fc1c93 minor enhancement to llvm::isFreeCall API: return CallInst; no functional change
llvm-svn: 106686
2010-06-23 21:51:12 +00:00
Gabor Greif
0b348ae475 use ArgOperand getters
llvm-svn: 106685
2010-06-23 21:41:47 +00:00
Dan Gohman
f44783ab4e Replace ScalarEvolution's private copy of getLoopPredecessor
with LoopInfo's public copy.

llvm-svn: 106603
2010-06-22 23:43:28 +00:00
Dan Gohman
74d5144414 Use pre-increment instead of post-increment when the result is not used.
llvm-svn: 106542
2010-06-22 15:08:57 +00:00
Dan Gohman
a3bc6b13f7 Allow "exhaustive" trip count evaluation on phi nodes with all
constant operands.

llvm-svn: 106537
2010-06-22 13:15:46 +00:00
Devang Patel
f50b6147ad Use single interface, using twine, to get named metadata.
getNamedMetadata().

llvm-svn: 106518
2010-06-22 01:19:38 +00:00
Devang Patel
dee41b010a Do not rely on Twine temporaries to survive.
llvm-svn: 106515
2010-06-22 01:01:58 +00:00
Dan Gohman
6a3c46ad49 Use A.append(...) instead of A.insert(A.end(), ...) when A is a
SmallVector, and other SmallVector simplifications.

llvm-svn: 106452
2010-06-21 19:47:52 +00:00