diff --git a/llvm/include/llvm/Transforms/Scalar.h b/llvm/include/llvm/Transforms/Scalar.h --- a/llvm/include/llvm/Transforms/Scalar.h +++ b/llvm/include/llvm/Transforms/Scalar.h @@ -530,6 +530,13 @@ // transformations. // Pass *createWarnMissedTransformationsPass(); + +//===----------------------------------------------------------------------===// +// +// This pass does instruction simplification on each +// instruction in a function. +// +FunctionPass *createInstSimplifyLegacyPass(); } // End llvm namespace #endif diff --git a/llvm/include/llvm/Transforms/Scalar/InstSimplifyPass.h b/llvm/include/llvm/Transforms/Scalar/InstSimplifyPass.h --- a/llvm/include/llvm/Transforms/Scalar/InstSimplifyPass.h +++ b/llvm/include/llvm/Transforms/Scalar/InstSimplifyPass.h @@ -36,10 +36,6 @@ PreservedAnalyses run(Function &F, FunctionAnalysisManager &AM); }; -/// Create a legacy pass that does instruction simplification on each -/// instruction in a function. -FunctionPass *createInstSimplifyLegacyPass(); - } // end namespace llvm #endif // LLVM_TRANSFORMS_UTILS_INSTSIMPLIFYPASS_H diff --git a/llvm/lib/Target/Hexagon/HexagonTargetMachine.cpp b/llvm/lib/Target/Hexagon/HexagonTargetMachine.cpp --- a/llvm/lib/Target/Hexagon/HexagonTargetMachine.cpp +++ b/llvm/lib/Target/Hexagon/HexagonTargetMachine.cpp @@ -312,7 +312,7 @@ bool NoOpt = (getOptLevel() == CodeGenOpt::None); if (!NoOpt) { - addPass(createConstantPropagationPass()); + addPass(createInstSimplifyLegacyPass()); addPass(createDeadCodeEliminationPass()); } diff --git a/llvm/lib/Transforms/Scalar/InstSimplifyPass.cpp b/llvm/lib/Transforms/Scalar/InstSimplifyPass.cpp --- a/llvm/lib/Transforms/Scalar/InstSimplifyPass.cpp +++ b/llvm/lib/Transforms/Scalar/InstSimplifyPass.cpp @@ -20,6 +20,7 @@ #include "llvm/IR/Type.h" #include "llvm/InitializePasses.h" #include "llvm/Pass.h" +#include "llvm/Transforms/Scalar.h" #include "llvm/Transforms/Utils.h" #include "llvm/Transforms/Utils/Local.h" using namespace llvm;