[PATCH] D85047: [Hexagon] Use InstCombine instead of ConstantProp
Arthur Eubanks via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 31 15:08:48 PDT 2020
aeubanks updated this revision to Diff 282327.
aeubanks retitled this revision from "[Hexagon] Use InstCombine instead of ConstantProp
This is the last remaining use of ConstantProp, migrate it to InstCombine in the goal of removing ConstantProp." to "[Hexagon] Use InstCombine instead of ConstantProp".
aeubanks edited the summary of this revision.
aeubanks added a comment.
InstSimplify instead of InstCombine
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D85047/new/
https://reviews.llvm.org/D85047
Files:
llvm/include/llvm/Transforms/Scalar.h
llvm/include/llvm/Transforms/Scalar/InstSimplifyPass.h
llvm/lib/Target/Hexagon/HexagonTargetMachine.cpp
llvm/lib/Transforms/Scalar/InstSimplifyPass.cpp
Index: llvm/lib/Transforms/Scalar/InstSimplifyPass.cpp
===================================================================
--- llvm/lib/Transforms/Scalar/InstSimplifyPass.cpp
+++ 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;
Index: llvm/lib/Target/Hexagon/HexagonTargetMachine.cpp
===================================================================
--- llvm/lib/Target/Hexagon/HexagonTargetMachine.cpp
+++ llvm/lib/Target/Hexagon/HexagonTargetMachine.cpp
@@ -312,7 +312,7 @@
bool NoOpt = (getOptLevel() == CodeGenOpt::None);
if (!NoOpt) {
- addPass(createConstantPropagationPass());
+ addPass(createInstSimplifyLegacyPass());
addPass(createDeadCodeEliminationPass());
}
Index: llvm/include/llvm/Transforms/Scalar/InstSimplifyPass.h
===================================================================
--- llvm/include/llvm/Transforms/Scalar/InstSimplifyPass.h
+++ 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
Index: llvm/include/llvm/Transforms/Scalar.h
===================================================================
--- llvm/include/llvm/Transforms/Scalar.h
+++ 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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D85047.282327.patch
Type: text/x-patch
Size: 2059 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200731/9a73742a/attachment.bin>
More information about the llvm-commits
mailing list