[llvm] a7264e5 - [StructurizeCFG][opt] Mark -structurizecfg as a codegen pass

Arthur Eubanks via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 30 10:27:35 PDT 2022


Author: Arthur Eubanks
Date: 2022-09-30T10:27:09-07:00
New Revision: a7264e55492bbd071b7192dae7fe5f2f82d4a988

URL: https://github.com/llvm/llvm-project/commit/a7264e55492bbd071b7192dae7fe5f2f82d4a988
DIFF: https://github.com/llvm/llvm-project/commit/a7264e55492bbd071b7192dae7fe5f2f82d4a988.diff

LOG: [StructurizeCFG][opt] Mark -structurizecfg as a codegen pass

So we don't have to specify -enable-new-pm=0.

Added: 
    

Modified: 
    llvm/test/Transforms/StructurizeCFG/AMDGPU/backedge-id-bug-xfail.ll
    llvm/test/Transforms/StructurizeCFG/AMDGPU/uniform-regions.ll
    llvm/test/Transforms/StructurizeCFG/switch.ll
    llvm/test/Transforms/StructurizeCFG/workarounds/needs-fr-ule.ll
    llvm/test/Transforms/StructurizeCFG/workarounds/needs-unified-loop-exits.ll
    llvm/tools/opt/opt.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/test/Transforms/StructurizeCFG/AMDGPU/backedge-id-bug-xfail.ll b/llvm/test/Transforms/StructurizeCFG/AMDGPU/backedge-id-bug-xfail.ll
index 09d0ee841a881..e9c54151cf298 100644
--- a/llvm/test/Transforms/StructurizeCFG/AMDGPU/backedge-id-bug-xfail.ll
+++ b/llvm/test/Transforms/StructurizeCFG/AMDGPU/backedge-id-bug-xfail.ll
@@ -1,5 +1,5 @@
 ; XFAIL: *
-; RUN: opt -mtriple=amdgcn-amd-amdhsa -S -structurizecfg -verify-region-info %s -enable-new-pm=0
+; RUN: opt -mtriple=amdgcn-amd-amdhsa -S -structurizecfg -verify-region-info %s
 
 ; FIXME: Merge into backedge-id-bug
 ; Variant which has an issue with region construction

diff  --git a/llvm/test/Transforms/StructurizeCFG/AMDGPU/uniform-regions.ll b/llvm/test/Transforms/StructurizeCFG/AMDGPU/uniform-regions.ll
index 06304d6e10fee..e91e73ceb2b60 100644
--- a/llvm/test/Transforms/StructurizeCFG/AMDGPU/uniform-regions.ll
+++ b/llvm/test/Transforms/StructurizeCFG/AMDGPU/uniform-regions.ll
@@ -1,5 +1,5 @@
 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
-; RUN: opt -mtriple=amdgcn-- -S -o - -structurizecfg -structurizecfg-skip-uniform-regions -structurizecfg-relaxed-uniform-regions -enable-new-pm=0 < %s | FileCheck %s
+; RUN: opt -mtriple=amdgcn-- -S -o - -structurizecfg -structurizecfg-skip-uniform-regions -structurizecfg-relaxed-uniform-regions < %s | FileCheck %s
 
 define amdgpu_cs void @uniform(i32 inreg %v) {
 ; CHECK-LABEL: @uniform(

diff  --git a/llvm/test/Transforms/StructurizeCFG/switch.ll b/llvm/test/Transforms/StructurizeCFG/switch.ll
index a452217880db0..316df57ea7364 100644
--- a/llvm/test/Transforms/StructurizeCFG/switch.ll
+++ b/llvm/test/Transforms/StructurizeCFG/switch.ll
@@ -1,4 +1,4 @@
-; RUN: opt -S -structurizecfg %s -o - -enable-new-pm=0 | FileCheck %s
+; RUN: opt -S -structurizecfg %s -o - | FileCheck %s
 
 ; The structurizecfg pass cannot handle switch instructions, so we need to
 ; make sure the lower switch pass is always run before structurizecfg.

diff  --git a/llvm/test/Transforms/StructurizeCFG/workarounds/needs-fr-ule.ll b/llvm/test/Transforms/StructurizeCFG/workarounds/needs-fr-ule.ll
index a8d449565bd41..b81f83a9e7094 100644
--- a/llvm/test/Transforms/StructurizeCFG/workarounds/needs-fr-ule.ll
+++ b/llvm/test/Transforms/StructurizeCFG/workarounds/needs-fr-ule.ll
@@ -1,5 +1,5 @@
 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
-; RUN: opt < %s -fix-irreducible -unify-loop-exits -structurizecfg -enable-new-pm=0 -S | FileCheck %s
+; RUN: opt < %s -fix-irreducible -unify-loop-exits -structurizecfg -S | FileCheck %s
 define void @irreducible_mountain_bug(i1 %Pred0, i1 %Pred1, i1 %Pred2, i1 %Pred3, i1 %Pred4, i1 %Pred5, i1 %Pred6, i1 %Pred7, i1 %Pred8, i1 %Pred9, i1 %Pred10, i1 %Pred11, i1 %Pred12, i1 %Pred13) {
 ; CHECK-LABEL: @irreducible_mountain_bug(
 ; CHECK-NEXT:  entry:

diff  --git a/llvm/test/Transforms/StructurizeCFG/workarounds/needs-unified-loop-exits.ll b/llvm/test/Transforms/StructurizeCFG/workarounds/needs-unified-loop-exits.ll
index bac74359e9c5e..6cc2689f08fd0 100644
--- a/llvm/test/Transforms/StructurizeCFG/workarounds/needs-unified-loop-exits.ll
+++ b/llvm/test/Transforms/StructurizeCFG/workarounds/needs-unified-loop-exits.ll
@@ -1,5 +1,5 @@
 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
-; RUN: opt < %s -unify-loop-exits -structurizecfg -enable-new-pm=0 -S | FileCheck %s
+; RUN: opt < %s -unify-loop-exits -structurizecfg -S | FileCheck %s
 
 ; The structurizer uses an RPO traversal over a region, along with a
 ; manual hack that is meant to sort ensure that blocks within a loop

diff  --git a/llvm/tools/opt/opt.cpp b/llvm/tools/opt/opt.cpp
index 70b3b54fe4b63..9fee75d3d5d02 100644
--- a/llvm/tools/opt/opt.cpp
+++ b/llvm/tools/opt/opt.cpp
@@ -455,7 +455,8 @@ static bool shouldPinPassToLegacyPM(StringRef Pass) {
       "replace-with-veclib",  "jmc-instrument",
       "dot-regions",          "dot-regions-only",
       "view-regions",         "view-regions-only",
-      "select-optimize",      "expand-large-div-rem"};
+      "select-optimize",      "expand-large-div-rem",
+      "structurizecfg"};
   for (const auto &P : PassNamePrefix)
     if (Pass.startswith(P))
       return true;


        


More information about the llvm-commits mailing list