[llvm] r290350 - [NewGVN] Add the pass to PassRegistry.def.
Davide Italiano via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 22 08:35:03 PST 2016
Author: davide
Date: Thu Dec 22 10:35:02 2016
New Revision: 290350
URL: http://llvm.org/viewvc/llvm-project?rev=290350&view=rev
Log:
[NewGVN] Add the pass to PassRegistry.def.
We need to hook up here to get it working with the new PM.
Add a test while here (and remove a typo).
Modified:
llvm/trunk/lib/Passes/PassBuilder.cpp
llvm/trunk/lib/Passes/PassRegistry.def
llvm/trunk/test/Transforms/NewGVN/basic.ll
llvm/trunk/test/Transforms/NewGVN/br-identical.ll
Modified: llvm/trunk/lib/Passes/PassBuilder.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Passes/PassBuilder.cpp?rev=290350&r1=290349&r2=290350&view=diff
==============================================================================
--- llvm/trunk/lib/Passes/PassBuilder.cpp (original)
+++ llvm/trunk/lib/Passes/PassBuilder.cpp Thu Dec 22 10:35:02 2016
@@ -112,6 +112,7 @@
#include "llvm/Transforms/Scalar/MemCpyOptimizer.h"
#include "llvm/Transforms/Scalar/MergedLoadStoreMotion.h"
#include "llvm/Transforms/Scalar/NaryReassociate.h"
+#include "llvm/Transforms/Scalar/NewGVN.h"
#include "llvm/Transforms/Scalar/PartiallyInlineLibCalls.h"
#include "llvm/Transforms/Scalar/Reassociate.h"
#include "llvm/Transforms/Scalar/SCCP.h"
Modified: llvm/trunk/lib/Passes/PassRegistry.def
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Passes/PassRegistry.def?rev=290350&r1=290349&r2=290350&view=diff
==============================================================================
--- llvm/trunk/lib/Passes/PassRegistry.def (original)
+++ llvm/trunk/lib/Passes/PassRegistry.def Thu Dec 22 10:35:02 2016
@@ -164,6 +164,7 @@ FUNCTION_PASS("mem2reg", PromotePass())
FUNCTION_PASS("memcpyopt", MemCpyOptPass())
FUNCTION_PASS("mldst-motion", MergedLoadStoreMotionPass())
FUNCTION_PASS("nary-reassociate", NaryReassociatePass())
+FUNCTION_PASS("newgvn", NewGVNPass())
FUNCTION_PASS("jump-threading", JumpThreadingPass())
FUNCTION_PASS("partially-inline-libcalls", PartiallyInlineLibCallsPass())
FUNCTION_PASS("lcssa", LCSSAPass())
Modified: llvm/trunk/test/Transforms/NewGVN/basic.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/NewGVN/basic.ll?rev=290350&r1=290349&r2=290350&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/NewGVN/basic.ll (original)
+++ llvm/trunk/test/Transforms/NewGVN/basic.ll Thu Dec 22 10:35:02 2016
@@ -1,6 +1,5 @@
; XFAIL: *
; RUN: opt < %s -newgvn -S | FileCheck %s
-; RUN: opt < %s -passes=gvn -S | FileCheck %s
define i32 @main() {
block1:
Modified: llvm/trunk/test/Transforms/NewGVN/br-identical.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/NewGVN/br-identical.ll?rev=290350&r1=290349&r2=290350&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/NewGVN/br-identical.ll (original)
+++ llvm/trunk/test/Transforms/NewGVN/br-identical.ll Thu Dec 22 10:35:02 2016
@@ -1,4 +1,5 @@
; RUN: opt -newgvn -S -o - %s | FileCheck %s
+; RUN: opt -passes=newgvn -S -o - %s | FileCheck %s
; If a branch has two identical successors, we cannot declare either dead.
More information about the llvm-commits
mailing list