[llvm] r269589 - [PM/SCCP] Fix pass dependencies.

Davide Italiano via llvm-commits llvm-commits at lists.llvm.org
Sun May 15 01:04:28 PDT 2016


Author: davide
Date: Sun May 15 03:04:28 2016
New Revision: 269589

URL: http://llvm.org/viewvc/llvm-project?rev=269589&view=rev
Log:
[PM/SCCP] Fix pass dependencies.

TargetLibraryInfoWrapperPass is a dependency of
SCCP but it's not listed as such. Chandler pointed
out this is an easy mistake to make which only
surfaces in weird crashes with some flag combinations.
This code will go away anyway at some point in the
future, but as long as it's (still) exercised, try
to make it correct.

Modified:
    llvm/trunk/lib/Transforms/Scalar/SCCP.cpp

Modified: llvm/trunk/lib/Transforms/Scalar/SCCP.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/SCCP.cpp?rev=269589&r1=269588&r2=269589&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/SCCP.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/SCCP.cpp Sun May 15 03:04:28 2016
@@ -1573,8 +1573,11 @@ namespace {
 } // end anonymous namespace
 
 char SCCP::ID = 0;
-INITIALIZE_PASS(SCCP, "sccp",
+INITIALIZE_PASS_BEGIN(SCCP, "sccp",
                 "Sparse Conditional Constant Propagation", false, false)
+INITIALIZE_PASS_DEPENDENCY(TargetLibraryInfoWrapperPass)
+INITIALIZE_PASS_END(SCCP, "sccp",
+                    "Sparse Conditional Constant Propagation", false, false)
 
 // createSCCPPass - This is the public interface to this file.
 FunctionPass *llvm::createSCCPPass() {




More information about the llvm-commits mailing list