[PATCH] [MachineSink] Use the real post dominator tree

Jingyue Wu jingyue at google.com
Mon Oct 6 15:14:36 PDT 2014


Hi Jiangning, resistor,

Fixes a FIXME in MachineSinking. Instead of using the simple heuristics in
isPostDominatedBy, use the real MachinePostDominatorTree and MachineLoopInfo.
The old heuristics caused instructions to sink unnecessarily, and might create
register pressure.

This is the second try of the fix. The first one (D4814) caused a performance
regression due to failing to sink instructions out of loops (PR21115). This
patch fixes PR21115 by sinking an instruction from a deeper loop to a shallower
one regardless of whether the target block post-dominates the source.

http://reviews.llvm.org/D5633

Files:
  lib/CodeGen/MachineSink.cpp
  test/CodeGen/NVPTX/machine-sink.ll
  test/CodeGen/X86/loop-strength-reduce8.ll
  test/CodeGen/X86/sink-out-of-loop.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D5633.14478.patch
Type: text/x-patch
Size: 6340 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20141006/04ca514d/attachment.bin>


More information about the llvm-commits mailing list