summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2018-04-24 00:48:59 +0000
committerDavid Blaikie <dblaikie@gmail.com>2018-04-24 00:48:59 +0000
commita27771b62f2f8c399ed8fac124810a273226d5d5 (patch)
tree9d460637b3905c15ac1d14080a397001299e5e04 /llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
parent1bcb258ba319c380b206c2ab7d9f8baaffcb2058 (diff)
downloadbcm5719-llvm-a27771b62f2f8c399ed8fac124810a273226d5d5.tar.gz
bcm5719-llvm-a27771b62f2f8c399ed8fac124810a273226d5d5.zip
InstCombine: Fix layering by not including Scalar.h in InstCombine
(notionally Scalar.h is part of libLLVMScalarOpts, so it shouldn't be included by InstCombine which doesn't/shouldn't need to depend on ScalarOpts) llvm-svn: 330669
Diffstat (limited to 'llvm/lib/Transforms/InstCombine/InstructionCombining.cpp')
-rw-r--r--llvm/lib/Transforms/InstCombine/InstructionCombining.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp b/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
index c2c3ee1aff1..4e95423c989 100644
--- a/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
+++ b/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
@@ -35,6 +35,7 @@
#include "InstCombineInternal.h"
#include "llvm-c/Initialization.h"
+#include "llvm-c/Transforms/InstCombine.h"
#include "llvm/ADT/APInt.h"
#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/DenseMap.h"
@@ -74,6 +75,7 @@
#include "llvm/IR/Instructions.h"
#include "llvm/IR/IntrinsicInst.h"
#include "llvm/IR/Intrinsics.h"
+#include "llvm/IR/LegacyPassManager.h"
#include "llvm/IR/Metadata.h"
#include "llvm/IR/Operator.h"
#include "llvm/IR/PassManager.h"
@@ -95,7 +97,6 @@
#include "llvm/Support/raw_ostream.h"
#include "llvm/Transforms/InstCombine/InstCombine.h"
#include "llvm/Transforms/InstCombine/InstCombineWorklist.h"
-#include "llvm/Transforms/Scalar.h"
#include <algorithm>
#include <cassert>
#include <cstdint>
@@ -3367,3 +3368,7 @@ void LLVMInitializeInstCombine(LLVMPassRegistryRef R) {
FunctionPass *llvm::createInstructionCombiningPass(bool ExpensiveCombines) {
return new InstructionCombiningPass(ExpensiveCombines);
}
+
+void LLVMAddInstructionCombiningPass(LLVMPassManagerRef PM) {
+ unwrap(PM)->add(createInstructionCombiningPass());
+}
OpenPOWER on IntegriCloud