llvm/test/CodeGen/MSP430
Michael Kuperstein 98ee128c8e [CGP] Split some critical edges coming out of indirect branches
Splitting critical edges when one of the source edges is an indirectbr
is hard in general (because it requires changing the memory the indirectbr
reads). But if a block only has a single indirectbr predecessor (which is
the common case), we can simulate splitting that edge by splitting
the destination block, and retargeting the *direct* branches.

This is motivated by the use of computed gotos in python 2.7: PyEval_EvalFrame()
ends up using an indirect branch with ~100 successors, and passing a constant to
each of those. Since MachineSink can't break indirect critical edges on demand
(and doing this in MIR doesn't look feasible), this causes us to emit about ~100
defs of registers containing constants, which we in the predecessor block, where
only one of those constants is used in each successor. So, at each computed goto,
we needlessly spill about a 100 constants to stack. The end result is that a
clang-compiled python interpreter can be about ~2.5x slower on a simple python
reduction loop than a gcc-compiled interpreter.

Differential Revision: https://reviews.llvm.org/D29916


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@296149 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-24 18:41:32 +00:00
..
2009-05-10-CyclicDAG.ll
2009-05-17-Rot.ll
2009-05-17-Shift.ll
2009-05-19-DoubleSplit.ll
2009-08-25-DynamicStackAlloc.ll
2009-09-18-AbsoluteAddr.ll
2009-10-10-OrImpDef.ll
2009-11-05-8BitLibcalls.ll
2009-11-08-InvalidResNo.ll
2009-11-20-NewNode.ll
2009-12-21-FrameAddr.ll
2009-12-22-InlineAsm.ll
2010-05-01-CombinerAnd.ll
AddrMode-bis-rx.ll
AddrMode-bis-xr.ll
AddrMode-mov-rx.ll
AddrMode-mov-xr.ll
asm-clobbers.ll
bit.ll
BranchSelector.ll Fix PR27500: on MSP430 the branch destination offset is measured in words, not bytes. 2016-11-08 17:19:59 +00:00
byval.ll
cc_args.ll
cc_ret.ll
DbgValueOtherTargets.test
flt_rounds.ll [SelectionDAGBuilder] Support llvm.flt.rounds on targets where i32 is not legal 2016-10-10 20:45:15 +00:00
fp.ll
indirectbr2.ll [CGP] Split some critical edges coming out of indirect branches 2017-02-24 18:41:32 +00:00
indirectbr.ll
inline-asm.ll
Inst8mi.ll
Inst8mm.ll
Inst8mr.ll
Inst8ri.ll
Inst8rm.ll
Inst8rr.ll
Inst16mi.ll
Inst16mm.ll Revert "In visitSTORE, always use FindBetterChain, rather than only when UseAA is enabled." 2017-02-02 18:24:55 +00:00
Inst16mr.ll
Inst16ri.ll
Inst16rm.ll
Inst16rr.ll
jumptable.ll
lit.local.cfg
memset.ll
misched-msp430.ll
mult-alt-generic-msp430.ll
postinc.ll
setcc.ll
shifts.ll
spill-to-stack.ll MSP430InstrInfo::loadRegFromStackSlot forgets to set register def. 2016-02-24 15:15:02 +00:00
transient-stack-alignment.ll
umulo-16.ll [CodeGen] Fix result type for SMULO/UMULO legalization 2016-12-06 22:49:36 +00:00
vararg.ll