1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-21 03:53:04 +02:00
Commit Graph

6934 Commits

Author SHA1 Message Date
Dan Gohman
230d92b375 Move MaximumAlignment to be a member of the Value class.
llvm-svn: 109891
2010-07-30 21:07:05 +00:00
Nick Lewycky
b6db4aaeaa Add missing newline to debug statement.
llvm-svn: 109886
2010-07-30 20:27:01 +00:00
Eli Friedman
642f4c66c3 PR7750: !CExpr->isNullValue() only properly computes whether CExpr is nonnull
if CExpr is a ConstantInt.

llvm-svn: 109773
2010-07-29 18:03:33 +00:00
Gabor Greif
0899f01287 simplify by using CallSite constructors; virtually eliminates CallSite::get from the tree
llvm-svn: 109687
2010-07-28 22:50:26 +00:00
Dan Gohman
939744be5f Define a maximum supported alignment value for load, store, and
alloca instructions (constrained by their internal encoding),
and add error checking for it. Fix an instcombine bug which
generated huge alignment values (null is infinitely aligned).
This fixes undefined behavior noticed by John Regehr.

llvm-svn: 109643
2010-07-28 20:12:04 +00:00
Dan Gohman
5295c21189 When user code intentionally dereferences null, the alignment of the
dereference is theoretically infinite. Put a cap on the computed
alignment to avoid overflow, noticed by John Regehr.

llvm-svn: 109596
2010-07-28 17:14:23 +00:00
Gabor Greif
ecd9b45b05 simplify
llvm-svn: 109589
2010-07-28 15:52:43 +00:00
Gabor Greif
16a98fddef use Value* constructor of CallSite to create potentially improper site, and test that
llvm-svn: 109581
2010-07-28 14:28:18 +00:00
Gabor Greif
2778a21978 recommit simplification (r109502, backed out r109509); seems to innocent
llvm-svn: 109510
2010-07-27 16:44:23 +00:00
Gabor Greif
c95e84ab61 back out this too to restore the bots
llvm-svn: 109509
2010-07-27 15:56:07 +00:00
Gabor Greif
394841cea8 simplify: CallSite::get --> CallSite constructor
llvm-svn: 109506
2010-07-27 15:02:37 +00:00
Gabor Greif
ee90e05139 simplify
llvm-svn: 109502
2010-07-27 13:31:22 +00:00
Owen Anderson
12ab6162bf Add an initial implementation of LazyValueInfo updating for JumpThreading. Disabled for now.
llvm-svn: 109424
2010-07-26 18:48:03 +00:00
Dan Gohman
23a6a1bdc5 Remove LCSSA's bogus dependence on LoopSimplify and LoopSimplify's bogus
dependence on DominanceFrontier. Instead, add an explicit DominanceFrontier
pass in StandardPasses.h to ensure that it gets scheduled at the right
time.

Declare that loop unrolling preserves ScalarEvolution, and shuffle some
getAnalysisUsages.

This eliminates one LoopSimplify and one LCCSA run in the standard
compile opts sequence.

llvm-svn: 109413
2010-07-26 18:11:16 +00:00
Dan Gohman
7d588b7dec Preserve ScalarEvolution in the loop unroller.
llvm-svn: 109412
2010-07-26 18:02:06 +00:00
Dan Gohman
32010a6c96 Use DominatorTree::properlyDominates instead of dominates with an
explicit inequality check.

llvm-svn: 109401
2010-07-26 17:37:36 +00:00
Dan Gohman
bed2730c5b A block dominates itself, by definition.
llvm-svn: 109400
2010-07-26 17:35:32 +00:00
Nick Lewycky
8cbc57da86 Revert this because we can't clone cyclic MDNodes which are creating during a
build of llvm-gcc.

llvm-svn: 109355
2010-07-24 20:54:02 +00:00
Nick Lewycky
7094bd27bc Whether function-local or not, a MDNode may reference a Function in which case
it needs to be mapped to refer to the function in the new module, not the old
one. Fixes PR7700.

llvm-svn: 109353
2010-07-24 19:43:25 +00:00
Devang Patel
f53de95e64 Speculatively revert 109117
llvm-svn: 109132
2010-07-22 18:44:00 +00:00
Gabor Greif
feb96f2df2 keep in 80 cols
llvm-svn: 109122
2010-07-22 17:18:03 +00:00
Devang Patel
58b7143697 Map MDNode correctly.
A non function local MDNode can have an operand which is cloned by MapValue(). 

llvm-svn: 109117
2010-07-22 16:35:00 +00:00
Gabor Greif
96a9f8c7c6 mass elimination of reliance on automatic iterator dereferencing
llvm-svn: 109103
2010-07-22 13:36:47 +00:00
Gabor Greif
225d763b90 simplify
llvm-svn: 109101
2010-07-22 13:07:39 +00:00
Gabor Greif
40e372be7e do not access arguments via low-level interface, do not multiply dereference use_iterators
llvm-svn: 109100
2010-07-22 13:04:32 +00:00
Gabor Greif
582eb39c11 pass dereferenced iterator to dyn_cast
llvm-svn: 109099
2010-07-22 11:48:35 +00:00
Gabor Greif
87ef691878 pass dereferenced iterator to dyn_cast
llvm-svn: 109098
2010-07-22 11:43:44 +00:00
Gabor Greif
a7509fca78 undo 80 column trespassing I caused
llvm-svn: 109092
2010-07-22 10:37:47 +00:00
Dan Gohman
859ffd353e Make NamedMDNode not be a subclass of Value, and simplify the interface
for creating and populating NamedMDNodes.

llvm-svn: 109061
2010-07-21 23:38:33 +00:00
Owen Anderson
f8addbb0a1 Fix batch of converting RegisterPass<> to INTIALIZE_PASS().
llvm-svn: 109045
2010-07-21 22:09:45 +00:00
Dan Gohman
a07df2e2bf Make this code a little more readable.
llvm-svn: 108968
2010-07-20 23:49:44 +00:00
Dan Gohman
6f009c4a42 Use DebugLocs instead of MDNodes.
llvm-svn: 108967
2010-07-20 23:49:05 +00:00
Dan Gohman
c813346166 Fix a typo.
llvm-svn: 108962
2010-07-20 23:10:36 +00:00
Dan Gohman
66ae369e76 Don't look up the "dbg" metadata kind by name.
llvm-svn: 108961
2010-07-20 23:09:34 +00:00
Dan Gohman
d8e1fd258f Use getDebugLoc and setDebugLoc instead of getDbgMetadata and setDbgMetadata,
avoiding MDNode overhead.

llvm-svn: 108909
2010-07-20 20:09:07 +00:00
Dan Gohman
e36ed050b8 Remember that the induction variable is always a PHINode and
use getIncomingValueForBlock instead of
LoopInfo::getCanonicalInductionVariableIncrement.

llvm-svn: 108865
2010-07-20 17:18:52 +00:00
Owen Anderson
0217b8e1d9 Tweak per Chris' comments.
llvm-svn: 108736
2010-07-19 19:23:32 +00:00
Owen Anderson
8159755faa Reimplement r108639 in InstCombine rather than DAGCombine.
llvm-svn: 108687
2010-07-19 08:09:34 +00:00
Owen Anderson
c8dc055b5e Another attempt at getting the clang self-host to like my instcombine patch.
llvm-svn: 108614
2010-07-17 06:56:35 +00:00
Chris Lattner
663dd0eb36 eliminate unlockedRefineAbstractTypeTo, types are all per-llvmcontext,
so there is no locking involved in type refinement.

llvm-svn: 108553
2010-07-16 20:50:13 +00:00
Dan Gohman
b5593f8fda Reorder the contents of various getAnalysisUsage functions, eliminating
a redundant loopsimplify run from the default -O2 sequence.

llvm-svn: 108539
2010-07-16 17:58:45 +00:00
Owen Anderson
ca2a306a1a Remove the rest of my instcombine changes. Back to the drawing board on this one.
llvm-svn: 108530
2010-07-16 16:39:00 +00:00
Gabor Greif
17c48ecd68 eliminate CallInst::ArgOffset
llvm-svn: 108522
2010-07-16 09:38:02 +00:00
Nick Lewycky
1b4a83430b Arrays and vectors with different numbers of elements are not equivalent.
llvm-svn: 108517
2010-07-16 06:31:12 +00:00
Eric Christopher
5eef314caf Also revert 108422, it's causing some test failures.
Working on testcases for Owen.

llvm-svn: 108494
2010-07-16 01:36:12 +00:00
Dan Gohman
de662ad8b0 Don't merge uses when they are targetting fixup sites with
different widths. In a use with a narrower fixup, formulae
may be wider than the fixup, in which case the high bits
aren't necessarily meaningful, so it isn't safe to reuse
them for uses with wider fixups.

This fixes PR7618, though the testcase is too large for a
reasonable regression test, since it heavily dependes on
hitting LSR's heuristics in a certain way.

llvm-svn: 108455
2010-07-15 20:24:58 +00:00
Dan Gohman
3c5c24ac18 Use dbgs() instead of errs() in a DEBUG.
llvm-svn: 108453
2010-07-15 20:12:42 +00:00
Owen Anderson
cc5ef967da Speculatively revert r108429 to fix the clang self-host.
llvm-svn: 108436
2010-07-15 18:18:57 +00:00
Owen Anderson
565ac2758c Per Chris' suggestion, get rid of the select canonicalization and just add
the corresponding or-icmp-and pattern.  This has the added benefit of doing
the matching earlier, and thus being less susceptible to being confused by
earlier transforms.

llvm-svn: 108429
2010-07-15 17:24:23 +00:00
Owen Anderson
b9f325bab4 Remove unneeded check, and correct style.
llvm-svn: 108427
2010-07-15 16:38:22 +00:00