[llvm] a031ef6 - [GVNSink][NewPM] Add GVNSinkPass to PassRegistry.def

Arthur Eubanks via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 22 08:24:18 PDT 2020


Author: Arthur Eubanks
Date: 2020-09-22T08:24:09-07:00
New Revision: a031ef6f3ab451d797763275ce4bc658aa940794

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

LOG: [GVNSink][NewPM] Add GVNSinkPass to PassRegistry.def

Added: 
    

Modified: 
    llvm/lib/Passes/PassRegistry.def
    llvm/test/Transforms/GVNSink/struct.ll

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Passes/PassRegistry.def b/llvm/lib/Passes/PassRegistry.def
index a01c3ce7175b..803bd80424cb 100644
--- a/llvm/lib/Passes/PassRegistry.def
+++ b/llvm/lib/Passes/PassRegistry.def
@@ -202,6 +202,7 @@ FUNCTION_PASS("ee-instrument", EntryExitInstrumenterPass(/*PostInlining=*/false)
 FUNCTION_PASS("make-guards-explicit", MakeGuardsExplicitPass())
 FUNCTION_PASS("post-inline-ee-instrument", EntryExitInstrumenterPass(/*PostInlining=*/true))
 FUNCTION_PASS("gvn-hoist", GVNHoistPass())
+FUNCTION_PASS("gvn-sink", GVNSinkPass())
 FUNCTION_PASS("helloworld", HelloWorldPass())
 FUNCTION_PASS("instcombine", InstCombinePass())
 FUNCTION_PASS("instcount", InstCountPass())

diff  --git a/llvm/test/Transforms/GVNSink/struct.ll b/llvm/test/Transforms/GVNSink/struct.ll
index 2228cf2803ae..f7300bdf54f7 100644
--- a/llvm/test/Transforms/GVNSink/struct.ll
+++ b/llvm/test/Transforms/GVNSink/struct.ll
@@ -1,4 +1,5 @@
 ; RUN: opt -gvn-sink -S < %s | FileCheck %s
+; RUN: opt -passes=gvn-sink -S < %s | FileCheck %s
 
 %struct = type {i32, i32}
 %struct2 = type { [ 2 x i32], i32 }
@@ -68,4 +69,4 @@ bb2:                                              ; preds = %bb
 bb4:                                              ; preds = %bb2, %bb1
   %tmp5 = phi i32 [ 0, %bb1 ], [ 1, %bb2 ]
   ret void
-}
\ No newline at end of file
+}


        


More information about the llvm-commits mailing list