Chris Lattner [Mon, 2 Nov 2009 03:25:55 +0000 (03:25 +0000)]
only IPSCCP incoming arguments if the function is executable, this fixes
an assertion on the buildbot.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85784
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 2 Nov 2009 03:21:36 +0000 (03:21 +0000)]
add a new ValueState::getConstantInt() helper, use it to
simplify some code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85783
91177308-0d34-0410-b5e6-
96231b3b80d8
Edward O'Callaghan [Mon, 2 Nov 2009 03:20:57 +0000 (03:20 +0000)]
Fix malloc.h is deprecated warning on DragonFly BSD.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85782
91177308-0d34-0410-b5e6-
96231b3b80d8
Edward O'Callaghan [Mon, 2 Nov 2009 03:14:31 +0000 (03:14 +0000)]
Fix for warning seen on DF-BSD, Victor, please fix this to use a shift instead of pow()
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85781
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 2 Nov 2009 03:03:42 +0000 (03:03 +0000)]
tidy up some more: remove some extraneous inline specifiers, return harder.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85780
91177308-0d34-0410-b5e6-
96231b3b80d8
Edward O'Callaghan [Mon, 2 Nov 2009 02:55:39 +0000 (02:55 +0000)]
Apply fix for PR5135, Credit to Andreas Neustifter.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85779
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 2 Nov 2009 02:54:24 +0000 (02:54 +0000)]
eliminate the SCCPSolver::getValueMapping method.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85778
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 2 Nov 2009 02:48:17 +0000 (02:48 +0000)]
fix failures introduced in r85774
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85777
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 2 Nov 2009 02:47:51 +0000 (02:47 +0000)]
factor duplicated code into a new DeleteInstructionInBlock
function, eliminate temporary (and pointless) smallvector.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85776
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 2 Nov 2009 02:33:50 +0000 (02:33 +0000)]
Chris used to use '...' instead of proper grammar.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85775
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 2 Nov 2009 02:30:06 +0000 (02:30 +0000)]
remove some extraneous llvmcontext stuff.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85774
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 2 Nov 2009 02:20:32 +0000 (02:20 +0000)]
change LatticeVal to use PointerIntPair to save some space.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85773
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 2 Nov 2009 02:06:37 +0000 (02:06 +0000)]
fix instcombine to only do store sinking when the alignments
of the two loads agree. Propagate that onto the new store.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85772
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 2 Nov 2009 02:00:18 +0000 (02:00 +0000)]
merge a test into store.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85771
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 2 Nov 2009 01:58:03 +0000 (01:58 +0000)]
convert to filecheck
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85770
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Mon, 2 Nov 2009 00:25:26 +0000 (00:25 +0000)]
Add missing end-tag.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85769
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Mon, 2 Nov 2009 00:24:16 +0000 (00:24 +0000)]
Some formatting changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85768
91177308-0d34-0410-b5e6-
96231b3b80d8
Anton Korobeynikov [Mon, 2 Nov 2009 00:12:06 +0000 (00:12 +0000)]
Handle splats of undefs properly. This includes the testcase for PR5364 as well.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85767
91177308-0d34-0410-b5e6-
96231b3b80d8
Anton Korobeynikov [Mon, 2 Nov 2009 00:11:39 +0000 (00:11 +0000)]
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!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85766
91177308-0d34-0410-b5e6-
96231b3b80d8
Anton Korobeynikov [Mon, 2 Nov 2009 00:11:06 +0000 (00:11 +0000)]
64-bit FP loads & stores operate on both NEON and VFP pipelines.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85765
91177308-0d34-0410-b5e6-
96231b3b80d8
Anton Korobeynikov [Mon, 2 Nov 2009 00:10:38 +0000 (00:10 +0000)]
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)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85764
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Sun, 1 Nov 2009 23:50:04 +0000 (23:50 +0000)]
Add PseudoSourceValue::mayAlias. It returns true if the object can ever alias any LLVM IR value.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85762
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Sun, 1 Nov 2009 22:08:51 +0000 (22:08 +0000)]
Line this up as well.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85748
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Sun, 1 Nov 2009 22:07:54 +0000 (22:07 +0000)]
Fix whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85747
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Sun, 1 Nov 2009 22:04:35 +0000 (22:04 +0000)]
Fix a couple more places where we are creating ld / st instructions without memoperands.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85746
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Sun, 1 Nov 2009 21:12:51 +0000 (21:12 +0000)]
Make use of imm12 version of Thumb2 ldr / str instructions more aggressively.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85743
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 1 Nov 2009 20:41:59 +0000 (20:41 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85742
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 1 Nov 2009 20:10:11 +0000 (20:10 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85739
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 1 Nov 2009 20:07:07 +0000 (20:07 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85738
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 1 Nov 2009 20:04:24 +0000 (20:04 +0000)]
split load sinking out to its own function, like gep sinking.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85737
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 1 Nov 2009 19:50:13 +0000 (19:50 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85736
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 1 Nov 2009 19:29:12 +0000 (19:29 +0000)]
IPSCCP apparently is not a superset of IPCP, this is bad,
but I'll investigate it separately. This unbreaks
test/FrontendC/weak_constant.c
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85735
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 1 Nov 2009 19:22:20 +0000 (19:22 +0000)]
convert to filecheck.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85734
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Sun, 1 Nov 2009 19:16:21 +0000 (19:16 +0000)]
Improve the other instance of the comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85733
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Sun, 1 Nov 2009 19:12:43 +0000 (19:12 +0000)]
Add a missing closing parenthesis, and tweak to fit in 80
columns.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85732
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 1 Nov 2009 19:09:12 +0000 (19:09 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85731
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 1 Nov 2009 19:03:42 +0000 (19:03 +0000)]
cleanups, switch GlobalDCE to SmallPtrSet instead of std::set
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85730
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 1 Nov 2009 18:57:49 +0000 (18:57 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85729
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 1 Nov 2009 18:42:03 +0000 (18:42 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85728
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 1 Nov 2009 18:17:37 +0000 (18:17 +0000)]
improve comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85725
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 1 Nov 2009 18:16:30 +0000 (18:16 +0000)]
add a comment about why we don't allow inlining indbr.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85724
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Sun, 1 Nov 2009 18:13:29 +0000 (18:13 +0000)]
Fix tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85723
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 1 Nov 2009 18:11:50 +0000 (18:11 +0000)]
the verifier shouldn't modify the IR.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85722
91177308-0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Sun, 1 Nov 2009 16:42:53 +0000 (16:42 +0000)]
Reverting 85714, 85715, 85716, which are breaking the build
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85717
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Sun, 1 Nov 2009 15:28:36 +0000 (15:28 +0000)]
Add a function to Passes.h to allow clients to create instances
of the ScalarEvolution pass without needing to #include ScalarEvolution.h.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85716
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Sun, 1 Nov 2009 15:23:35 +0000 (15:23 +0000)]
Don't #include Pass.h from CallGraph.h.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85715
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Sun, 1 Nov 2009 15:20:19 +0000 (15:20 +0000)]
Remove the #include of Pass.h from PassManager.h. This breaks a significant
#include dependency, as frontends commonly pull in PassManager.h.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85714
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 1 Nov 2009 06:11:53 +0000 (06:11 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85709
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 1 Nov 2009 04:57:33 +0000 (04:57 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85708
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 1 Nov 2009 04:23:20 +0000 (04:23 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85707
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 1 Nov 2009 04:08:01 +0000 (04:08 +0000)]
fix an issue where the verifier would reject a function whose entry
block had its address taken even if the blockaddress was dead.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85706
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 1 Nov 2009 03:42:55 +0000 (03:42 +0000)]
if CostMetrics says to never duplicate some code, don't unswitch a loop.
This prevents unswitching from duplicating indbr's.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85705
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 1 Nov 2009 03:40:38 +0000 (03:40 +0000)]
constant fold indirectbr(blockaddress(%bb)) -> br label %bb.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85704
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 1 Nov 2009 03:25:03 +0000 (03:25 +0000)]
improve x86 codegen support for blockaddress. We now compile
the testcase into:
_test1: ## @test1
## BB#0: ## %entry
leaq L_test1_bb6(%rip), %rax
jmpq *%rax
L_test1_bb: ## Address Taken
LBB1_1: ## %bb
movb $1, %al
ret
L_test1_bb6: ## Address Taken
LBB1_2: ## %bb6
movb $2, %al
ret
Note, it is very very strange that BlockAddressSDNode doesn't carry
around TargetFlags. Dan, please fix this.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85703
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 1 Nov 2009 03:07:53 +0000 (03:07 +0000)]
pull check for return inst out of loop, never inline a callee that contains
an indirectbr.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85702
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 1 Nov 2009 03:03:03 +0000 (03:03 +0000)]
Fix BlockAddress::replaceUsesOfWithOnConstant to correctly
maintain the block use count in SubclassData.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85701
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 1 Nov 2009 02:46:39 +0000 (02:46 +0000)]
implement linker support for BlockAddress.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85700
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 1 Nov 2009 01:27:45 +0000 (01:27 +0000)]
Revert 85678/85680. The decision is to stay with the current form of
indirectbr, thus we don't need "blockaddr(@func, null)". Eliminate it
for simplicity.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85699
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Sat, 31 Oct 2009 23:46:45 +0000 (23:46 +0000)]
Use cbz and cbnz instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85698
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Sat, 31 Oct 2009 22:57:36 +0000 (22:57 +0000)]
vml[as].f32 cause stalls in following advanced SIMD instructions. Avoid using
them for scalar floating point operations for now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85697
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Sat, 31 Oct 2009 22:20:56 +0000 (22:20 +0000)]
Consolidate test files
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85696
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Sat, 31 Oct 2009 22:16:14 +0000 (22:16 +0000)]
Change to use FileCheck
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85695
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Sat, 31 Oct 2009 22:14:17 +0000 (22:14 +0000)]
Make tests more explicit about which instructions are expected.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85694
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Sat, 31 Oct 2009 22:12:44 +0000 (22:12 +0000)]
Grammar tweak to comments
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85693
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 31 Oct 2009 22:11:15 +0000 (22:11 +0000)]
Make sure PRE doesn't split crit edges from indirectbr.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85692
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Sat, 31 Oct 2009 22:10:38 +0000 (22:10 +0000)]
Update test to be more explicit about what instruction sequences are expected for each operation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85691
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 31 Oct 2009 22:04:43 +0000 (22:04 +0000)]
llvm::SplitEdge should refuse to split an edge from an indirectbr.
Fix CodeGenPrepare to not try to split edges from indirectbr.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85690
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Sat, 31 Oct 2009 21:52:58 +0000 (21:52 +0000)]
Update test to be more explicit about what instruction sequences are expected for each operation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85689
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 31 Oct 2009 21:51:10 +0000 (21:51 +0000)]
update the comment above llvm::SplitCriticalEdge, and make
it abort on IndirectBrInst as describe in the comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85688
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Sat, 31 Oct 2009 21:42:19 +0000 (21:42 +0000)]
Expand 64-bit logical shift right inline
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85687
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Sat, 31 Oct 2009 21:00:56 +0000 (21:00 +0000)]
Expand 64-bit arithmetic shift right inline
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85685
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Sat, 31 Oct 2009 20:59:09 +0000 (20:59 +0000)]
Fix a missing newline in the dwarf output code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85684
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Sat, 31 Oct 2009 20:19:03 +0000 (20:19 +0000)]
Make -print-machineinstrs more readable.
- Be consistent when referring to MachineBasicBlocks: BB#0.
- Be consistent when referring to virtual registers: %reg1024.
- Be consistent when referring to unknown physical registers: %physreg10.
- Be consistent when referring to known physical registers: %RAX
- Be consistent when referring to register 0: %reg0
- Be consistent when printing alignments: align=16
- Print jump table contents.
- Don't print host addresses, in general.
- and various other cleanups.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85682
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Sat, 31 Oct 2009 20:17:39 +0000 (20:17 +0000)]
Factor out more code into addCommonCodeGenPasses. The JIT wasn't
previously running CodePlacementOpt. Also print headers before
each dump in -print-machineinstrs mode, so that it's clear which
dump is which.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85681
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 31 Oct 2009 20:13:24 +0000 (20:13 +0000)]
adjust a couple xforms to work with null bb's in BlockAddress.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85680
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 31 Oct 2009 20:08:37 +0000 (20:08 +0000)]
Make blockaddress(@func, null) be valid, and make 'deleting a basic
block with a blockaddress still referring to it' replace the invalid
blockaddress with a new blockaddress(@func, null) instead of a
inttoptr(1).
This changes the bitcode encoding format, and still needs codegen
support (this should produce a non-zero value, referring to the entry
block of the function would also be quite reasonable).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85678
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sat, 31 Oct 2009 19:54:06 +0000 (19:54 +0000)]
Force triple; darwin's ASM syntax differs from linux's.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85676
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Sat, 31 Oct 2009 19:38:01 +0000 (19:38 +0000)]
Expand 64 bit left shift inline rather than using the libcall. For now, this
is unconditional. Making it still use the libcall when optimizing for size
would be a good adjustment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85675
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sat, 31 Oct 2009 19:22:24 +0000 (19:22 +0000)]
Add missing colons for FileCheck.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85674
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Sat, 31 Oct 2009 19:06:53 +0000 (19:06 +0000)]
Convert to FileCheck
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85673
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Sat, 31 Oct 2009 18:00:10 +0000 (18:00 +0000)]
The universal SDKROOT should only be assigned when hosted. Otherwise the
SDKROOT can refer to the target when we're building for the host.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85672
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 31 Oct 2009 17:48:31 +0000 (17:48 +0000)]
add a comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85671
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Sat, 31 Oct 2009 17:33:01 +0000 (17:33 +0000)]
Revert r85667. LoopUnroll currently can't call utility functions which
auto-update the DominatorTree because it doesn't keep the DominatorTree
current while it works.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85670
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Sat, 31 Oct 2009 16:16:41 +0000 (16:16 +0000)]
Remove redundant code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85668
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Sat, 31 Oct 2009 16:08:00 +0000 (16:08 +0000)]
Merge the enhancements from LoopUnroll's FoldBlockIntoPredecessor into
MergeBlockIntoPredecessor. This makes SimplifyCFG slightly more aggressive,
and makes it unnecessary for LoopUnroll to have its own copy of this code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85667
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Sat, 31 Oct 2009 15:04:55 +0000 (15:04 +0000)]
Rename forgetLoopBackedgeTakenCount to forgetLoop, because it
clears out more information than just the stored backedge taken count.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85664
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Sat, 31 Oct 2009 14:54:17 +0000 (14:54 +0000)]
Replace LoopUnrollPass.cpp's custom code-size estimation code using
the new common CodeMetrics code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85663
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Sat, 31 Oct 2009 14:46:50 +0000 (14:46 +0000)]
Simplify this code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85662
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Sat, 31 Oct 2009 14:39:43 +0000 (14:39 +0000)]
Remove an unnecessary #include.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85661
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Sat, 31 Oct 2009 14:38:25 +0000 (14:38 +0000)]
Update CMakeLists for recent renames.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85660
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Sat, 31 Oct 2009 14:37:31 +0000 (14:37 +0000)]
Rename UnrollLoop.cpp to LoopUnroll.cpp, and LoopUnroll.cpp to
LoopUnrollPass.cpp, for consistency with other passes which are
similarly split.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85659
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Sat, 31 Oct 2009 14:35:41 +0000 (14:35 +0000)]
Remove CodeGenLICM. It's largely obsoleted by MachineLICM's new ability
to unfold loop-invariant loads.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85657
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Sat, 31 Oct 2009 14:32:25 +0000 (14:32 +0000)]
Make ScalarEvolutionAliasAnalysis slightly more aggressive, by making an
underlying alias call even for non-identified-object values.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85656
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Sat, 31 Oct 2009 14:22:52 +0000 (14:22 +0000)]
Reapply r85634, with the bug fixed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85655
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Sat, 31 Oct 2009 14:14:04 +0000 (14:14 +0000)]
When discarding SrcValue information, discard all of it so that code
that uses this information knows to behave conservatively.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85654
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Sat, 31 Oct 2009 14:12:53 +0000 (14:12 +0000)]
Fix 80-column violation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85653
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Sat, 31 Oct 2009 09:24:35 +0000 (09:24 +0000)]
Fix warning with gcc-4.0 and signed/unsigned.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85648
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Sat, 31 Oct 2009 03:39:36 +0000 (03:39 +0000)]
It's safe to remat t2LDRpci; Add PseudoSourceValue to load / store's to enable more machine licm. More changes coming.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85643
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Sat, 31 Oct 2009 01:28:06 +0000 (01:28 +0000)]
Revert 85634. It's breaking consumer-typeset (and others).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85641
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Sat, 31 Oct 2009 00:15:28 +0000 (00:15 +0000)]
Add a target triple so that this test behaves consistently across hosts.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85640
91177308-0d34-0410-b5e6-
96231b3b80d8