Chris Lattner
c49ae9912a
fix failures introduced in r85774
...
llvm-svn: 85777
2009-11-02 02:48:17 +00:00
Chris Lattner
e405ed9651
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
a3c39d394d
Chris used to use '...' instead of proper grammar.
...
llvm-svn: 85775
2009-11-02 02:33:50 +00:00
Chris Lattner
6df5cec72f
remove some extraneous llvmcontext stuff.
...
llvm-svn: 85774
2009-11-02 02:30:06 +00:00
Chris Lattner
efdd2bbce6
change LatticeVal to use PointerIntPair to save some space.
...
llvm-svn: 85773
2009-11-02 02:20:32 +00:00
Chris Lattner
3cd6a61b27
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
db3311edc7
merge a test into store.ll
...
llvm-svn: 85771
2009-11-02 02:00:18 +00:00
Chris Lattner
d263dbec7a
convert to filecheck
...
llvm-svn: 85770
2009-11-02 01:58:03 +00:00
Bill Wendling
33fef7e4e5
Add missing end-tag.
...
llvm-svn: 85769
2009-11-02 00:25:26 +00:00
Bill Wendling
7f4a336785
Some formatting changes.
...
llvm-svn: 85768
2009-11-02 00:24:16 +00:00
Anton Korobeynikov
4d23754b14
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
0f38d989bd
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
8cce1eb6aa
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
14635da94b
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
ea68c7c9a8
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
e0856c5f40
Line this up as well.
...
llvm-svn: 85748
2009-11-01 22:08:51 +00:00
Nick Lewycky
b244909ad4
Fix whitespace.
...
llvm-svn: 85747
2009-11-01 22:07:54 +00:00
Evan Cheng
1a4492be97
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
43219997b6
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
ef94654363
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
Douglas Gregor
0840cc02ce
When determining whether a reference to a static data member is an
...
integral constant expression, make sure to find where the initializer
was provided---inside or outside the class definition---since that can
affect whether we have an integral constant expression (and, we need
to see the initializer itself).
llvm-svn: 85741
2009-11-01 20:32:48 +00:00
Chris Lattner
3e6398baa5
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
328ef89bd1
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
2a249e267a
split load sinking out to its own function, like gep sinking.
...
llvm-svn: 85737
2009-11-01 20:04:24 +00:00
Chris Lattner
0b40a8bc0e
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
2805f116f6
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
Chris Lattner
d162b5c955
convert to filecheck.
...
llvm-svn: 85734
2009-11-01 19:22:20 +00:00
Duncan Sands
f5e4342f45
Improve the other instance of the comment.
...
llvm-svn: 85733
2009-11-01 19:16:21 +00:00
Duncan Sands
f25d301311
Add a missing closing parenthesis, and tweak to fit in 80
...
columns.
llvm-svn: 85732
2009-11-01 19:12:43 +00:00
Chris Lattner
649f4e9e8f
only run GlobalDCE at -O3 and run it late instead of early.
...
GlobalOpt already deletes trivially dead functions/globals,
so GlobalDCE only adds values for cycles of dead things.
llvm-svn: 85731
2009-11-01 19:09:12 +00:00
Chris Lattner
b5d9c8c708
cleanups, switch GlobalDCE to SmallPtrSet instead of std::set
...
llvm-svn: 85730
2009-11-01 19:03:42 +00:00
Chris Lattner
2fa61f8427
We currently only run ipsccp at LTO time, which is silly. It subsumes
...
ipconstprop and doesn't take much time. Just run it in its place.
This adds a testcase for it, which I plan to expand to cover other
"integration" cases, where we expect the optimizer to be able to
eliminate various things. Due to phase order issues we've regressed
in a number of areas and integration tests are the only way I see to
prevent this.
llvm-svn: 85729
2009-11-01 18:57:49 +00:00
Chris Lattner
37536b90e1
remove a bunch of locking from LLVMContextImpl. Since only one thread
...
can be banging on a context at a time, this isn't needed. Owen, please
review.
llvm-svn: 85728
2009-11-01 18:42:03 +00:00
Edward O'Callaghan
683dcc63b1
Add DragonFly BSD to supported platforms list.
...
llvm-svn: 85727
2009-11-01 18:30:27 +00:00
Edward O'Callaghan
a8fa825177
Fix DragonFly BSD define in compiler-rt.
...
llvm-svn: 85726
2009-11-01 18:25:55 +00:00
Chris Lattner
249f96e339
improve comment.
...
llvm-svn: 85725
2009-11-01 18:17:37 +00:00
Chris Lattner
1756673f58
add a comment about why we don't allow inlining indbr.
...
llvm-svn: 85724
2009-11-01 18:16:30 +00:00
Evan Cheng
50bc004b67
Fix tests.
...
llvm-svn: 85723
2009-11-01 18:13:29 +00:00
Chris Lattner
253bc77513
the verifier shouldn't modify the IR.
...
llvm-svn: 85722
2009-11-01 18:11:50 +00:00
Douglas Gregor
5897e097a6
Within a template, qualified name lookup can refer to a non-dependent type
...
that is not known to be a base class at template definition time due
to some dependent base class. Treat qualified name lookup that refers
to a non-static data member or function as implicit class member
access when the "this" type would be dependent.
llvm-svn: 85718
2009-11-01 17:08:18 +00:00
Douglas Gregor
291f6145b8
Reverting 85714, 85715, 85716, which are breaking the build
...
llvm-svn: 85717
2009-11-01 16:42:53 +00:00
Dan Gohman
2b12b95d5d
Add a function to Passes.h to allow clients to create instances
...
of the ScalarEvolution pass without needing to #include ScalarEvolution.h.
llvm-svn: 85716
2009-11-01 15:28:36 +00:00
Dan Gohman
b49c889d53
Don't #include Pass.h from CallGraph.h.
...
llvm-svn: 85715
2009-11-01 15:23:35 +00:00
Dan Gohman
576ac96367
Remove the #include of Pass.h from PassManager.h. This breaks a significant
...
#include dependency, as frontends commonly pull in PassManager.h.
llvm-svn: 85714
2009-11-01 15:20:19 +00:00
Chris Lattner
1a8b80ed5a
teach ipsccp and ipconstprop that a blockaddress doesn't 'take the address' of a function
...
in a way that should prevent ip constprop. This allows clang/test/CodeGen/indirect-goto.c
to pass with the new indirect goto lowering.
llvm-svn: 85709
2009-11-01 06:11:53 +00:00
Chris Lattner
a1dc101f66
change llvm::MergeBlockIntoPredecessor to not merge two blocks BB1->BB2
...
when BB2 has its address taken. Since it ends up doing BB2->rauw(BB1),
this can cause the address of the entry block to be taken. Since it is
generally undesirable to nuke blocks whose address is taken, even when
we can, just unconditionally stop this xform.
llvm-svn: 85708
2009-11-01 04:57:33 +00:00
Chris Lattner
746139b736
strengthen an assumption: RevectorBlockTo knows that PredBB
...
ended in an uncond branch because the pass requires BreakCriticalEdges.
However, BCE doesn't eliminate critical adges from indbrs.
llvm-svn: 85707
2009-11-01 04:23:20 +00:00
Chris Lattner
274717419c
fix an issue where the verifier would reject a function whose entry
...
block had its address taken even if the blockaddress was dead.
llvm-svn: 85706
2009-11-01 04:08:01 +00:00
Chris Lattner
7a8db3a41a
if CostMetrics says to never duplicate some code, don't unswitch a loop.
...
This prevents unswitching from duplicating indbr's.
llvm-svn: 85705
2009-11-01 03:42:55 +00:00
Chris Lattner
54a4b84012
constant fold indirectbr(blockaddress(%bb)) -> br label %bb.
...
llvm-svn: 85704
2009-11-01 03:40:38 +00:00