[PATCH] D33587: [DAGCombine] Do several rounds of combine.

Amaury SECHET via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri May 26 01:25:14 PDT 2017


deadalnix created this revision.
Herald added subscribers: javed.absar, nhaehnle, wdng, nemanjai, jyknight.

DAGcombine does one pass over all nodes and then give up. This is suboptimal because one node's combine can expose a combine for another node.

Because some of the combines create infinite loops, we limit things to 3 rounds. Idealy, we like to continue combining as long as something is combinable, but that will require removing the combine that do and undo each others, so in the meantime, doing 3 rounds maximum seems like a good tradeof.


https://reviews.llvm.org/D33587

Files:
  lib/CodeGen/SelectionDAG/DAGCombiner.cpp
  test/CodeGen/AArch64/arm64-narrow-st-merge.ll
  test/CodeGen/AArch64/arm64-variadic-aapcs.ll
  test/CodeGen/AArch64/fold-constants.ll
  test/CodeGen/AMDGPU/and.ll
  test/CodeGen/AMDGPU/cndmask-no-def-vcc.ll
  test/CodeGen/AMDGPU/copy-illegal-type.ll
  test/CodeGen/AMDGPU/cvt_f32_ubyte.ll
  test/CodeGen/AMDGPU/fneg-combines.ll
  test/CodeGen/AMDGPU/llvm.amdgcn.s.getpc.ll
  test/CodeGen/AMDGPU/load-constant-i16.ll
  test/CodeGen/AMDGPU/load-constant-i8.ll
  test/CodeGen/AMDGPU/load-global-i16.ll
  test/CodeGen/AMDGPU/load-global-i8.ll
  test/CodeGen/AMDGPU/load-local-i16.ll
  test/CodeGen/AMDGPU/r600.bitcast.ll
  test/CodeGen/AMDGPU/setcc.ll
  test/CodeGen/AMDGPU/shift-and-i64-ubfe.ll
  test/CodeGen/AMDGPU/shift-i64-opts.ll
  test/CodeGen/ARM/2014-01-09-pseudo_expand_implicit_reg.ll
  test/CodeGen/ARM/vector-DAGCombine.ll
  test/CodeGen/PowerPC/no-pref-jumps.ll
  test/CodeGen/SPARC/32abi.ll
  test/CodeGen/SystemZ/selectcc-01.ll
  test/CodeGen/SystemZ/selectcc-02.ll
  test/CodeGen/X86/avx512-any_extend_load.ll
  test/CodeGen/X86/constant-combines.ll
  test/CodeGen/X86/divide-by-constant.ll
  test/CodeGen/X86/illegal-bitfield-loadstore.ll
  test/CodeGen/X86/known-bits.ll
  test/CodeGen/X86/legalize-shift-64.ll
  test/CodeGen/X86/movmsk.ll
  test/CodeGen/X86/oddshuffles.ll
  test/CodeGen/X86/or-branch.ll
  test/CodeGen/X86/popcnt.ll
  test/CodeGen/X86/sse3.ll
  test/CodeGen/X86/urem-i8-constant.ll
  test/CodeGen/X86/vec_extract-mmx.ll
  test/CodeGen/X86/vector-sext.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D33587.100372.patch
Type: text/x-patch
Size: 75164 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170526/042ad766/attachment.bin>


More information about the llvm-commits mailing list