[all-commits] [llvm/llvm-project] e996cf: [AMDGPU] Preserve MachineDominatorTree in SILowerC...

Jay Foad via All-commits all-commits at lists.llvm.org
Thu Oct 7 13:33:10 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: e996cf7dce2c86d40fec263d82545dd363d9f445
      https://github.com/llvm/llvm-project/commit/e996cf7dce2c86d40fec263d82545dd363d9f445
  Author: Jay Foad <jay.foad at amd.com>
  Date:   2021-10-07 (Thu, 07 Oct 2021)

  Changed paths:
    M llvm/lib/Target/AMDGPU/SILowerControlFlow.cpp
    M llvm/test/CodeGen/AMDGPU/llc-pipeline.ll

  Log Message:
  -----------
  [AMDGPU] Preserve MachineDominatorTree in SILowerControlFlow

Updating the MachineDominatorTree is easy since SILowerControlFlow only
splits and removes basic blocks. This should save a bit of compile time
because previously we would recompute the dominator tree from scratch
after this pass.

Another reason for doing this is that SILowerControlFlow preserves
LiveIntervals which transitively requires MachineDominatorTree. I think
that means that SILowerControlFlow is obliged to preserve
MachineDominatorTree too as explained here:
https://lists.llvm.org/pipermail/llvm-dev/2020-November/146923.html
although it does not seem to have caused any problems in practice yet.

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




More information about the All-commits mailing list