llvm/test/CodeGen
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
..
AArch64 [globalisel] Decouple src pattern operands from dst pattern operands. 2017-02-24 15:43:30 +00:00
AMDGPU [DAGCombiner] add missing folds for scalar select of {-1,0,1} 2017-02-24 17:17:33 +00:00
ARM [CGP] Split some critical edges coming out of indirect branches 2017-02-24 18:41:32 +00:00
AVR [AVR] Disable integrated assembler for a few tests 2017-02-22 22:41:13 +00:00
BPF Revert "In visitSTORE, always use FindBetterChain, rather than only when UseAA is enabled." 2017-02-02 18:24:55 +00:00
Generic Implement intrinsic mangling for literal struct types. 2017-02-15 23:16:20 +00:00
Hexagon [DAGCombiner] add missing folds for scalar select of {-1,0,1} 2017-02-24 17:17:33 +00:00
Inputs
Lanai
Mips Recommit "[mips] Fix atomic compare and swap at O0." 2017-02-24 16:32:18 +00:00
MIR MIRTests: Remove unnecessary 2>&1 redirection 2017-02-22 18:47:41 +00:00
MSP430 [CGP] Split some critical edges coming out of indirect branches 2017-02-24 18:41:32 +00:00
NVPTX [DAGCombiner] add missing folds for scalar select of {-1,0,1} 2017-02-24 17:17:33 +00:00
PowerPC [CGP] Split some critical edges coming out of indirect branches 2017-02-24 18:41:32 +00:00
SPARC Codegen: Make chains from trellis-shaped CFGs 2017-02-15 19:49:14 +00:00
SystemZ [TLI] Robustize SDAG LibFunc proto checking by merging it into TLI. 2017-02-03 19:11:19 +00:00
Thumb [ARM] Fix constant islands pass. 2017-02-22 09:06:21 +00:00
Thumb2 [ARM] Replace HasT2ExtractPack with HasDSP 2017-02-17 15:42:44 +00:00
WebAssembly [WebAssembly] Configure codegen to legalize f16 values. 2017-02-22 16:28:00 +00:00
WinEH
X86 [DAGCombiner] add missing folds for scalar select of {-1,0,1} 2017-02-24 17:17:33 +00:00
XCore Move some error handling down to MCStreamer. 2017-02-10 15:13:12 +00:00