David Goodwin
0668ac893d
Chain dependencies used to enforce memory order should have latency of 0 (except for true dependency of Store followed by aliased Load... we estimate that case with a single cycle of latency assuming the hardware will bypass)
...
llvm-svn: 85807
2009-11-02 17:06:28 +00:00
Bob Wilson
6eb4f53d90
Add support for BlockAddress values in ARM constant pools.
...
llvm-svn: 85806
2009-11-02 16:59:06 +00:00
Bob Wilson
ac53e0c640
Prune unnecessary include.
...
llvm-svn: 85805
2009-11-02 16:58:31 +00:00
Evan Cheng
ec5cb0cdbd
Initilize the machine LICM CSE map upon the first time an instruction is hoisted to
...
the loop preheader. Add instructions which are already in the preheader block that
may be common expressions of those that are hoisted out. These does get a few more
instructions CSE'ed.
llvm-svn: 85799
2009-11-02 08:09:49 +00:00
Evan Cheng
e79ff8a615
These are done / no longer care.
...
llvm-svn: 85798
2009-11-02 07:58:25 +00:00
Evan Cheng
532dfd431f
Add an entry.
...
llvm-svn: 85797
2009-11-02 07:51:19 +00:00
Chris Lattner
8243ac1abf
now that ip sccp *really* subsumes ipcp, remove ipcp again.
...
llvm-svn: 85796
2009-11-02 07:34:29 +00:00
Chris Lattner
f1afb57935
improve IPSCCP to be able to propagate the result of "!mayBeOverridden"
...
function to calls of that function, regardless of whether it has local
linkage or has its address taken. Not escaping should only affect
whether we make an aggressive assumption about the arguments to a
function, not whether we can track the result of it.
llvm-svn: 85795
2009-11-02 07:33:59 +00:00
Evan Cheng
ce9d8e2737
Remove an irrelevant and poorly reduced test case.
...
llvm-svn: 85794
2009-11-02 07:11:54 +00:00
Chris Lattner
c9279a9b4d
don't mark the arguments of prototype overdefined, they will never be queried.
...
llvm-svn: 85793
2009-11-02 06:34:04 +00:00
Chris Lattner
9c7e443b07
restore some code I removed in r85788, refactor it into
...
a shared place instead of duplicating it 4 times.
llvm-svn: 85792
2009-11-02 06:28:16 +00:00
Chris Lattner
23f5603692
remove some confused code that dates from when we had
...
"multiple return values" but not "first class aggregates"
llvm-svn: 85791
2009-11-02 06:17:06 +00:00
Chris Lattner
c670f866ce
avoid redundant lookups in BBExecutable, and make it a SmallPtrSet.
...
llvm-svn: 85790
2009-11-02 06:11:23 +00:00
Chris Lattner
16b825e51f
Use the libanalysis 'ConstantFoldLoadFromConstPtr' function
...
instead of reinventing SCCP-specific logic. This gives us
new powers.
llvm-svn: 85789
2009-11-02 06:06:14 +00:00
Chris Lattner
32acebedf7
switch the main 'ValueState' map from being an std::map to being
...
a DenseMap. Doing this required being aware of subtle iterator
invalidation issues, but it provides a big speedup. In a
release-asserts build, this sped up optimizing 403.gcc from
1.34s -> 0.79s (IPSCCP) and 1.11s -> 0.44s (SCCP).
This commit also conflates in a bunch of general cleanups, sorry.
llvm-svn: 85788
2009-11-02 05:55:40 +00:00
Evan Cheng
57f7c7c914
Unbreak ARMBaseRegisterInfo::copyRegToReg.
...
llvm-svn: 85787
2009-11-02 04:44:55 +00:00
Chris Lattner
9fc809ca55
fix a bug exposed by moving SRoA earlier which caused a crash building kc++
...
llvm-svn: 85786
2009-11-02 04:37:17 +00:00
Jim Grosbach
104a2c2b79
Missing bit of universal built + hosted
...
llvm-svn: 85785
2009-11-02 03:46:35 +00:00
Chris Lattner
7e74831e52
only IPSCCP incoming arguments if the function is executable, this fixes
...
an assertion on the buildbot.
llvm-svn: 85784
2009-11-02 03:25:55 +00:00
Chris Lattner
0a8c553eb2
add a new ValueState::getConstantInt() helper, use it to
...
simplify some code.
llvm-svn: 85783
2009-11-02 03:21:36 +00:00
Edward O'Callaghan
ad76c7541b
Fix malloc.h is deprecated warning on DragonFly BSD.
...
llvm-svn: 85782
2009-11-02 03:20:57 +00:00
Edward O'Callaghan
e91c6a1a44
Fix for warning seen on DF-BSD, Victor, please fix this to use a shift instead of pow()
...
llvm-svn: 85781
2009-11-02 03:14:31 +00:00
Chris Lattner
4372b58329
tidy up some more: remove some extraneous inline specifiers, return harder.
...
llvm-svn: 85780
2009-11-02 03:03:42 +00:00
Edward O'Callaghan
64a2e8f6a5
Apply fix for PR5135, Credit to Andreas Neustifter.
...
llvm-svn: 85779
2009-11-02 02:55:39 +00:00
Chris Lattner
1c8cb53667
eliminate the SCCPSolver::getValueMapping method.
...
llvm-svn: 85778
2009-11-02 02:54:24 +00:00
Chris Lattner
f02562df08
fix failures introduced in r85774
...
llvm-svn: 85777
2009-11-02 02:48:17 +00:00
Chris Lattner
d4f286cb0c
factor duplicated code into a new DeleteInstructionInBlock
...
function, eliminate temporary (and pointless) smallvector.
llvm-svn: 85776
2009-11-02 02:47:51 +00:00
Chris Lattner
a806b18c99
Chris used to use '...' instead of proper grammar.
...
llvm-svn: 85775
2009-11-02 02:33:50 +00:00
Chris Lattner
37dc1cb0fb
remove some extraneous llvmcontext stuff.
...
llvm-svn: 85774
2009-11-02 02:30:06 +00:00
Chris Lattner
28db47c45a
change LatticeVal to use PointerIntPair to save some space.
...
llvm-svn: 85773
2009-11-02 02:20:32 +00:00
Chris Lattner
b94afb778c
fix instcombine to only do store sinking when the alignments
...
of the two loads agree. Propagate that onto the new store.
llvm-svn: 85772
2009-11-02 02:06:37 +00:00
Chris Lattner
96bfb792af
merge a test into store.ll
...
llvm-svn: 85771
2009-11-02 02:00:18 +00:00
Chris Lattner
0eaddd9187
convert to filecheck
...
llvm-svn: 85770
2009-11-02 01:58:03 +00:00
Bill Wendling
772f96dca7
Add missing end-tag.
...
llvm-svn: 85769
2009-11-02 00:25:26 +00:00
Bill Wendling
a2574815af
Some formatting changes.
...
llvm-svn: 85768
2009-11-02 00:24:16 +00:00
Anton Korobeynikov
09147da530
Handle splats of undefs properly. This includes the testcase for PR5364 as well.
...
llvm-svn: 85767
2009-11-02 00:12:06 +00:00
Anton Korobeynikov
9737bfedeb
Do not infer the target type for COPY_TO_REGCLASS from dest regclass, this won't work if it can contain several types. Require explicit result type for the node for now. This fixes PR5364.
...
PS: It seems that blackfin usage of copy_to_regclass is completely bogus!
llvm-svn: 85766
2009-11-02 00:11:39 +00:00
Anton Korobeynikov
ed410a8ee3
64-bit FP loads & stores operate on both NEON and VFP pipelines.
...
llvm-svn: 85765
2009-11-02 00:11:06 +00:00
Anton Korobeynikov
3ba3789153
Use NEON reg-reg moves, where profitable. This reduces "domain-cross" stalls, when we used to mix vfp and neon code (the former were used for reg-reg moves)
...
llvm-svn: 85764
2009-11-02 00:10:38 +00:00
Evan Cheng
80a8ae9a3a
Add PseudoSourceValue::mayAlias. It returns true if the object can ever alias any LLVM IR value.
...
llvm-svn: 85762
2009-11-01 23:50:04 +00:00
Nick Lewycky
6623dcf203
Line this up as well.
...
llvm-svn: 85748
2009-11-01 22:08:51 +00:00
Nick Lewycky
2f3164a81c
Fix whitespace.
...
llvm-svn: 85747
2009-11-01 22:07:54 +00:00
Evan Cheng
a409c074c8
Fix a couple more places where we are creating ld / st instructions without memoperands.
...
llvm-svn: 85746
2009-11-01 22:04:35 +00:00
Evan Cheng
4a0d47f209
Make use of imm12 version of Thumb2 ldr / str instructions more aggressively.
...
llvm-svn: 85743
2009-11-01 21:12:51 +00:00
Chris Lattner
dc9cf48396
fix two strange things in the default passmgr:
...
1. we'd run simplifycfg at the very start, even though
the per function passes have already cleaned this up.
2. In the main per-function pipeline that is interlaced with inlining
etc, we would do instcombine, jump threading, simplifycfg *before*
doing SROA. SROA is much more likely to expose opportunities for
these passes than they are for SROA, so move SRoA up earlier.
also add some comments.
llvm-svn: 85742
2009-11-01 20:41:59 +00:00
Chris Lattner
326adfb172
merge phi-merge.ll into phi.ll
...
I don't know what Dan wants to do with phi-merge-gep.ll, I'll let
him deal with it because instcombine may end up sinking these.
llvm-svn: 85739
2009-11-01 20:10:11 +00:00
Chris Lattner
f3c2039dde
when merging two loads, make sure to take the min of their alignment,
...
not the max. This didn't matter until the previous patch because
instcombine would refuse to sink loads with differenting alignments.
llvm-svn: 85738
2009-11-01 20:07:07 +00:00
Chris Lattner
e7b1e067e9
split load sinking out to its own function, like gep sinking.
...
llvm-svn: 85737
2009-11-01 20:04:24 +00:00
Chris Lattner
b3fe1009a5
fix a bug noticed by inspection: when instcombine sinks loads through
...
phis, it didn't preserve the alignment of the load. This is a missed
optimization of the alignment is high and a miscompilation when the
alignment is low.
llvm-svn: 85736
2009-11-01 19:50:13 +00:00
Chris Lattner
2db49d0a22
IPSCCP apparently is not a superset of IPCP, this is bad,
...
but I'll investigate it separately. This unbreaks
test/FrontendC/weak_constant.c
llvm-svn: 85735
2009-11-01 19:29:12 +00:00