llvm-mirror/test/CodeGen/Thumb2
Cong Hou e29dba6476 Distribute the weight on the edge from switch to default statement to edges generated in lowering switch.
Currently, when edge weights are assigned to edges that are created when lowering switch statement, the weight on the edge to default statement (let's call it "default weight" here) is not considered. We need to distribute this weight properly. However, without value profiling, we have no idea how to distribute it. In this patch, I applied the heuristic that this weight is evenly distributed to successors.

For example, given a switch statement with cases 1,2,3,5,10,11,20, and every edge from switch to each successor has weight 10. If there is a binary search tree built to test if n < 10, then its two out-edges will have weight 4x10+10/2 = 45 and 3x10 + 10/2 = 35 respectively (currently they are 40 and 30 without considering the default weight). Each distribution (which is 5 here) will be stored in each SwitchWorkListItem for further distribution.

There are some exceptions:

For a jump table header which doesn't have any edge to default statement, we don't distribute the default weight to it.
For a bit test header which covers a contiguous range and hence has no edges to default statement, we don't distribute the default weight to it.
When the branch checks a single value or a contiguous range with no edge to default statement, we don't distribute the default weight to it.
In other cases, the default weight is evenly distributed to successors.

Differential Revision: http://reviews.llvm.org/D12418

llvm-svn: 246522
2015-09-01 01:42:16 +00:00
..
2009-07-17-CrossRegClassCopy.ll [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
2009-07-21-ISelBug.ll [opaque pointer type] Add textual IR support for explicit type parameter to the call instruction 2015-04-16 23:24:18 +00:00
2009-07-23-CPIslandBug.ll
2009-07-30-PEICrash.ll [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
2009-08-01-WrongLDRBOpc.ll [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
2009-08-02-CoalescerBug.ll [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
2009-08-04-CoalescerAssert.ll [opaque pointer type] Add textual IR support for explicit type parameter to the call instruction 2015-04-16 23:24:18 +00:00
2009-08-04-CoalescerBug.ll [opaque pointer type] Add textual IR support for explicit type parameter to the call instruction 2015-04-16 23:24:18 +00:00
2009-08-04-ScavengerAssert.ll [opaque pointer type] Add textual IR support for explicit type parameter to the call instruction 2015-04-16 23:24:18 +00:00
2009-08-04-SubregLoweringBug2.ll
2009-08-04-SubregLoweringBug3.ll [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
2009-08-04-SubregLoweringBug.ll
2009-08-06-SpDecBug.ll ARM: When spilling extra registers for alignment, prefer low registers on all Thumb targets. 2015-04-23 20:31:26 +00:00
2009-08-07-CoalescerBug.ll
2009-08-07-NeonFPBug.ll [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
2009-08-08-ScavengerAssert.ll
2009-08-10-ISelBug.ll [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
2009-08-21-PostRAKill4.ll [opaque pointer type] Add textual IR support for explicit type parameter to the call instruction 2015-04-16 23:24:18 +00:00
2009-09-01-PostRAProlog.ll [opaque pointer type] Add textual IR support for explicit type parameter to gep operator 2015-03-13 18:20:45 +00:00
2009-09-28-ITBlockBug.ll [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
2009-10-15-ITBlockBranch.ll
2009-11-01-CopyReg2RegBug.ll
2009-11-11-ScavengerAssert.ll [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
2009-11-13-STRDBug.ll
2009-12-01-LoopIVUsers.ll [opaque pointer type] Add textual IR support for explicit type parameter to the call instruction 2015-04-16 23:24:18 +00:00
2010-01-06-TailDuplicateLabels.ll [opaque pointer type] Add textual IR support for explicit type parameter to gep operator 2015-03-13 18:20:45 +00:00
2010-01-19-RemovePredicates.ll [opaque pointer type] Add textual IR support for explicit type parameter to getelementptr instruction 2015-02-27 19:29:02 +00:00
2010-02-11-phi-cycle.ll
2010-02-24-BigStack.ll
2010-03-08-addi12-ccout.ll [opaque pointer type] Add textual IR support for explicit type parameter to gep operator 2015-03-13 18:20:45 +00:00
2010-03-15-AsmCCClobber.ll [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
2010-04-15-DynAllocBug.ll ARM & AArch64: make use of common cmpxchg idioms after expansion 2014-05-30 10:09:59 +00:00
2010-04-26-CopyRegCrash.ll
2010-05-24-rsbs.ll
2010-06-14-NEONCoalescer.ll [opaque pointer type] Add textual IR support for explicit type parameter to the call instruction 2015-04-16 23:24:18 +00:00
2010-06-19-ITBlockCrash.ll [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
2010-06-21-TailMergeBug.ll [opaque pointer type] Add textual IR support for explicit type parameter to gep operator 2015-03-13 18:20:45 +00:00
2010-08-10-VarSizedAllocaBug.ll [opaque pointer type] Add textual IR support for explicit type parameter to the call instruction 2015-04-16 23:24:18 +00:00
2010-11-22-EpilogueBug.ll ARM & AArch64: make use of common cmpxchg idioms after expansion 2014-05-30 10:09:59 +00:00
2010-12-03-AddSPNarrowing.ll
2011-04-21-FILoweringBug.ll
2011-06-07-TwoAddrEarlyClobber.ll Thumb2: When optimizing for size, do not if-convert branches involving comparisons with zero. 2015-04-23 20:31:30 +00:00
2011-12-16-T2SizeReduceAssert.ll [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
2012-01-13-CBNZBug.ll [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
2013-02-19-tail-call-register-hint.ll [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
2013-03-02-vduplane-nonconstant-source-index.ll Fix a nasty bug in DAGCombine of STORE nodes. 2015-03-19 22:48:57 +00:00
2013-03-06-vector-sext-operand-scalarize.ll
aapcs.ll ARMLoadStoreOptimizer: Create LDRD/STRD on thumb2 2015-07-21 00:18:59 +00:00
aligned-constants.ll [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
aligned-spill.ll [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
bfi.ll [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
bfx.ll ARM: yet another round of ARM test clean ups 2014-04-03 23:47:24 +00:00
buildvector-crash.ll ARM & AArch64: make use of common cmpxchg idioms after expansion 2014-05-30 10:09:59 +00:00
carry.ll ARM: yet another round of ARM test clean ups 2014-04-03 23:47:24 +00:00
cbnz.ll Thumb2: When applying branch optimizations, visit branches in reverse order. 2015-04-23 20:31:35 +00:00
constant-islands-jump-table.ll ARM: recommit r237590: allow jump tables to be placed as constant islands. 2015-05-31 19:22:07 +00:00
constant-islands-new-island-padding.ll [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
constant-islands-new-island.ll ARM: allow constpool entry to be moved to the user's block in all cases. 2014-11-13 17:58:53 +00:00
constant-islands.ll Move the personality function from LandingPadInst to Function 2015-06-17 20:52:32 +00:00
cortex-fp.ll [ARM] Add support for Cortex-M7, FPv5-SP and FPv5-DP (LLVM) 2014-10-01 09:02:17 +00:00
crash.ll [opaque pointer type] Add textual IR support for explicit type parameter to gep operator 2015-03-13 18:20:45 +00:00
cross-rc-coalescing-1.ll
cross-rc-coalescing-2.ll [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
div.ll [ARM] support for Cortex-R4/R4F 2015-04-09 14:07:28 +00:00
float-cmp.ll [SDAG] Optimize unordered comparison in soft-float mode (patch by Anton Nadolskiy) 2015-07-15 08:39:35 +00:00
float-intrinsics-double.ll [SDAG] Optimize unordered comparison in soft-float mode (patch by Anton Nadolskiy) 2015-07-15 08:39:35 +00:00
float-intrinsics-float.ll [ARM] Allow selecting VRINT[APMXZR] and VCVT[BT] instructions for FPv5 2014-10-01 13:13:18 +00:00
float-ops.ll ARMLoadStoreOptimizer: Fix errata 602117 handling and make testcase actually test for it 2015-06-24 20:03:27 +00:00
frameless2.ll [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
frameless.ll
ifcvt-compare.ll Thumb2: When optimizing for size, do not if-convert branches involving comparisons with zero. 2015-04-23 20:31:30 +00:00
ifcvt-neon.ll [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
inflate-regs.ll [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
inlineasm.ll
large-call.ll [opaque pointer type] Add textual IR support for explicit type parameter to the call instruction 2015-04-16 23:24:18 +00:00
large-stack.ll ARM: When spilling extra registers for alignment, prefer low registers on all Thumb targets. 2015-04-23 20:31:26 +00:00
ldr-str-imm12.ll ARM & AArch64: make use of common cmpxchg idioms after expansion 2014-05-30 10:09:59 +00:00
lit.local.cfg Reduce verbiage of lit.local.cfg files 2014-06-09 22:42:55 +00:00
longMACt.ll ARM: yet another round of ARM test clean ups 2014-04-03 23:47:24 +00:00
lsr-deficiency.ll [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
machine-licm.ll [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
mul_const.ll ARM: yet another round of ARM test clean ups 2014-04-03 23:47:24 +00:00
pic-load.ll ARM: Add scheduling information for LDRLIT instructions to swift scheduling model 2015-07-17 23:18:26 +00:00
segmented-stacks.ll Move the segmented stack switch to a function attribute 2014-04-10 22:58:43 +00:00
setjmp_longjmp.ll Arm: Don't define a label twice with two setjmps in a function. 2015-07-16 22:34:20 +00:00
stack_guard_remat.ll [opaque pointer type] Add textual IR support for explicit type parameter to getelementptr instruction 2015-02-27 19:29:02 +00:00
tail-call-r9.ll [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
thumb2-adc.ll ARM: yet another round of ARM test clean ups 2014-04-03 23:47:24 +00:00
thumb2-add2.ll ARM: yet another round of ARM test clean ups 2014-04-03 23:47:24 +00:00
thumb2-add3.ll ARM: yet another round of ARM test clean ups 2014-04-03 23:47:24 +00:00
thumb2-add4.ll ARM: yet another round of ARM test clean ups 2014-04-03 23:47:24 +00:00
thumb2-add5.ll ARM: yet another round of ARM test clean ups 2014-04-03 23:47:24 +00:00
thumb2-add6.ll ARM: yet another round of ARM test clean ups 2014-04-03 23:47:24 +00:00
thumb2-add.ll ARM: yet another round of ARM test clean ups 2014-04-03 23:47:24 +00:00
thumb2-and2.ll ARM: yet another round of ARM test clean ups 2014-04-03 23:47:24 +00:00
thumb2-and.ll ARM: yet another round of ARM test clean ups 2014-04-03 23:47:24 +00:00
thumb2-asr2.ll ARM: yet another round of ARM test clean ups 2014-04-03 23:47:24 +00:00
thumb2-asr.ll ARM: yet another round of ARM test clean ups 2014-04-03 23:47:24 +00:00
thumb2-bcc.ll ARM: yet another round of ARM test clean ups 2014-04-03 23:47:24 +00:00
thumb2-bfc.ll ARM: yet another round of ARM test clean ups 2014-04-03 23:47:24 +00:00
thumb2-bic.ll ARM: yet another round of ARM test clean ups 2014-04-03 23:47:24 +00:00
thumb2-branch.ll ARM & AArch64: make use of common cmpxchg idioms after expansion 2014-05-30 10:09:59 +00:00
thumb2-call-tc.ll [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
thumb2-call.ll [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
thumb2-cbnz.ll [opaque pointer type] Add textual IR support for explicit type parameter to getelementptr instruction 2015-02-27 19:29:02 +00:00
thumb2-clz.ll ARM: yet another round of ARM test clean ups 2014-04-03 23:47:24 +00:00
thumb2-cmn2.ll ARM: yet another round of ARM test clean ups 2014-04-03 23:47:24 +00:00
thumb2-cmn.ll IR: Make metadata typeless in assembly 2014-12-15 19:07:53 +00:00
thumb2-cmp2.ll ARM: yet another round of ARM test clean ups 2014-04-03 23:47:24 +00:00
thumb2-cmp.ll ARM: yet another round of ARM test clean ups 2014-04-03 23:47:24 +00:00
thumb2-eor2.ll ARM: yet another round of ARM test clean ups 2014-04-03 23:47:24 +00:00
thumb2-eor.ll ARM: yet another round of ARM test clean ups 2014-04-03 23:47:24 +00:00
thumb2-ifcvt1-tc.ll [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
thumb2-ifcvt1.ll [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
thumb2-ifcvt2.ll [opaque pointer type] Add textual IR support for explicit type parameter to the call instruction 2015-04-16 23:24:18 +00:00
thumb2-ifcvt3.ll [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
thumb2-jtb.ll ARM: yet another round of ARM test clean ups 2014-04-03 23:47:24 +00:00
thumb2-ldm.ll [opaque pointer type] Add textual IR support for explicit type parameter to gep operator 2015-03-13 18:20:45 +00:00
thumb2-ldr_ext.ll [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
thumb2-ldr_post.ll [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
thumb2-ldr_pre.ll [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
thumb2-ldr.ll [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
thumb2-ldrb.ll [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
thumb2-ldrd.ll [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
thumb2-ldrh.ll [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
thumb2-lsl2.ll ARM: yet another round of ARM test clean ups 2014-04-03 23:47:24 +00:00
thumb2-lsl.ll ARM: yet another round of ARM test clean ups 2014-04-03 23:47:24 +00:00
thumb2-lsr2.ll ARM: yet another round of ARM test clean ups 2014-04-03 23:47:24 +00:00
thumb2-lsr3.ll ARM: yet another round of ARM test clean ups 2014-04-03 23:47:24 +00:00
thumb2-lsr.ll ARM: yet another round of ARM test clean ups 2014-04-03 23:47:24 +00:00
thumb2-mla.ll ARM: fix test case missed in previous roundup 2014-04-04 01:19:56 +00:00
thumb2-mls.ll ARM: yet another round of ARM test clean ups 2014-04-03 23:47:24 +00:00
thumb2-mov.ll ARM: yet another round of ARM test clean ups 2014-04-03 23:47:24 +00:00
thumb2-mul.ll ARM: yet another round of ARM test clean ups 2014-04-03 23:47:24 +00:00
thumb2-mulhi.ll ARM: yet another round of ARM test clean ups 2014-04-03 23:47:24 +00:00
thumb2-mvn2.ll ARM: yet another round of ARM test clean ups 2014-04-03 23:47:24 +00:00
thumb2-mvn.ll ARM: yet another round of ARM test clean ups 2014-04-03 23:47:24 +00:00
thumb2-neg.ll ARM: yet another round of ARM test clean ups 2014-04-03 23:47:24 +00:00
thumb2-orn2.ll ARM: yet another round of ARM test clean ups 2014-04-03 23:47:24 +00:00
thumb2-orn.ll ARM: yet another round of ARM test clean ups 2014-04-03 23:47:24 +00:00
thumb2-orr2.ll ARM: yet another round of ARM test clean ups 2014-04-03 23:47:24 +00:00
thumb2-orr.ll ARM: yet another round of ARM test clean ups 2014-04-03 23:47:24 +00:00
thumb2-pack.ll ARM: yet another round of ARM test clean ups 2014-04-03 23:47:24 +00:00
thumb2-rev16.ll
thumb2-rev.ll ARM: yet another round of ARM test clean ups 2014-04-03 23:47:24 +00:00
thumb2-ror.ll ARM: yet another round of ARM test clean ups 2014-04-03 23:47:24 +00:00
thumb2-rsb2.ll ARM: yet another round of ARM test clean ups 2014-04-03 23:47:24 +00:00
thumb2-rsb.ll ARM: yet another round of ARM test clean ups 2014-04-03 23:47:24 +00:00
thumb2-sbc.ll ARM: yet another round of ARM test clean ups 2014-04-03 23:47:24 +00:00
thumb2-select_xform.ll ARM: yet another round of ARM test clean ups 2014-04-03 23:47:24 +00:00
thumb2-select.ll
thumb2-shifter.ll ARM: yet another round of ARM test clean ups 2014-04-03 23:47:24 +00:00
thumb2-smla.ll ARM: yet another round of ARM test clean ups 2014-04-03 23:47:24 +00:00
thumb2-smul.ll [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
thumb2-spill-q.ll [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
thumb2-str_post.ll [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
thumb2-str_pre.ll [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
thumb2-str.ll [opaque pointer type] Add textual IR support for explicit type parameter to getelementptr instruction 2015-02-27 19:29:02 +00:00
thumb2-strb.ll [opaque pointer type] Add textual IR support for explicit type parameter to getelementptr instruction 2015-02-27 19:29:02 +00:00
thumb2-strh.ll [opaque pointer type] Add textual IR support for explicit type parameter to getelementptr instruction 2015-02-27 19:29:02 +00:00
thumb2-sub2.ll ARM: yet another round of ARM test clean ups 2014-04-03 23:47:24 +00:00
thumb2-sub3.ll ARM: yet another round of ARM test clean ups 2014-04-03 23:47:24 +00:00
thumb2-sub4.ll ARM: yet another round of ARM test clean ups 2014-04-03 23:47:24 +00:00
thumb2-sub5.ll ARM: yet another round of ARM test clean ups 2014-04-03 23:47:24 +00:00
thumb2-sub.ll ARM: yet another round of ARM test clean ups 2014-04-03 23:47:24 +00:00
thumb2-sxt_rot.ll ARM: spot SBFX-compatbile code expressed with sign_extend_inreg 2014-07-23 13:59:12 +00:00
thumb2-sxt-uxt.ll ARM: yet another round of ARM test clean ups 2014-04-03 23:47:24 +00:00
thumb2-tbb.ll [opaque pointer type] Add textual IR support for explicit type parameter to the call instruction 2015-04-16 23:24:18 +00:00
thumb2-tbh.ll ARM: recommit r237590: allow jump tables to be placed as constant islands. 2015-05-31 19:22:07 +00:00
thumb2-teq2.ll ARM: yet another round of ARM test clean ups 2014-04-03 23:47:24 +00:00
thumb2-teq.ll ARM: yet another round of ARM test clean ups 2014-04-03 23:47:24 +00:00
thumb2-tst2.ll ARM: yet another round of ARM test clean ups 2014-04-03 23:47:24 +00:00
thumb2-tst.ll ARM: yet another round of ARM test clean ups 2014-04-03 23:47:24 +00:00
thumb2-uxt_rot.ll ARM: add patterns for [su]xta[bh] from just a shift. 2014-07-23 13:59:07 +00:00
thumb2-uxtb.ll ARM: yet another round of ARM test clean ups 2014-04-03 23:47:24 +00:00
tls1.ll [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
tls2.ll [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
tpsoft.ll ARM: When spilling extra registers for alignment, prefer low registers on all Thumb targets. 2015-04-23 20:31:26 +00:00
v8_IT_1.ll
v8_IT_2.ll [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
v8_IT_3.ll Distribute the weight on the edge from switch to default statement to edges generated in lowering switch. 2015-09-01 01:42:16 +00:00
v8_IT_4.ll
v8_IT_5.ll Distribute the weight on the edge from switch to default statement to edges generated in lowering switch. 2015-09-01 01:42:16 +00:00
v8_IT_6.ll