[llvm-exegesis] Add mechanism to add target-specific passes.
Summary:
createX86FloatingPointStackifierPass is disabled until we handle
TracksLiveness correctly.
Reviewers: gchatelet
Subscribers: mgorny, tschuett, llvm-commits
Differential Revision: https://reviews.llvm.org/D48360
llvm-svn: 335117
diff --git a/llvm/tools/llvm-exegesis/lib/Target.h b/llvm/tools/llvm-exegesis/lib/Target.h
index 25b6671..ba91afd 100644
--- a/llvm/tools/llvm-exegesis/lib/Target.h
+++ b/llvm/tools/llvm-exegesis/lib/Target.h
@@ -18,14 +18,19 @@
#define LLVM_TOOLS_LLVM_EXEGESIS_TARGET_H
#include "llvm/ADT/Triple.h"
+#include "llvm/CodeGen/TargetPassConfig.h"
+#include "llvm/IR/LegacyPassManager.h"
namespace exegesis {
class ExegesisTarget {
public:
+ // Targets can use this to add target-specific passes in assembleToStream();
+ virtual void addTargetSpecificPasses(llvm::PassManagerBase &PM) const {}
+
// Returns the ExegesisTarget for the given triple or nullptr if the target
// does not exist.
- static const ExegesisTarget* lookup(llvm::StringRef TT);
+ static const ExegesisTarget *lookup(llvm::Triple TT);
// Registers a target. Not thread safe.
static void registerTarget(ExegesisTarget *T);