[all-commits] [llvm/llvm-project] 2ada8e: Introduce fix-irreducible pass

Sameer Sahasrabuddhe via All-commits all-commits at lists.llvm.org
Tue Apr 14 23:01:10 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 2ada8e2525dd2653f30c8696a27162a3b1647d66
      https://github.com/llvm/llvm-project/commit/2ada8e2525dd2653f30c8696a27162a3b1647d66
  Author: Sameer Sahasrabuddhe <sameer.sahasrabuddhe at amd.com>
  Date:   2020-04-15 (Wed, 15 Apr 2020)

  Changed paths:
    M llvm/include/llvm/Analysis/LoopInfo.h
    M llvm/include/llvm/InitializePasses.h
    M llvm/include/llvm/LinkAllPasses.h
    M llvm/include/llvm/Transforms/Utils.h
    M llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp
    M llvm/lib/Transforms/Utils/BasicBlockUtils.cpp
    M llvm/lib/Transforms/Utils/CMakeLists.txt
    A llvm/lib/Transforms/Utils/FixIrreducible.cpp
    M llvm/lib/Transforms/Utils/Utils.cpp
    A llvm/test/Transforms/FixIrreducible/basic.ll
    A llvm/test/Transforms/FixIrreducible/nested.ll
    A llvm/test/Transforms/FixIrreducible/switch.ll
    A llvm/test/Transforms/StructurizeCFG/workarounds/needs-fix-reducible.ll
    A llvm/test/Transforms/StructurizeCFG/workarounds/needs-fr-ule.ll

  Log Message:
  -----------
  Introduce fix-irreducible pass

An irreducible SCC is one which has multiple "header" blocks, i.e., blocks
with control-flow edges incident from outside the SCC. This pass converts an
irreducible SCC into a natural loop by introducing a single new header
block and redirecting all the edges on the original headers to this
new block.

This is a useful workaround for a limitation in the structurizer
which, which produces incorrect control flow in the presence of
irreducible regions. The AMDGPU backend provides an option to
enable this pass before the structurizer, which may eventually be
enabled by default.

Reviewed By: nhaehnle

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




More information about the All-commits mailing list