summaryrefslogtreecommitdiff
path: root/include/llvm/CodeGen/TargetPassConfig.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm/CodeGen/TargetPassConfig.h')
-rw-r--r--include/llvm/CodeGen/TargetPassConfig.h34
1 files changed, 10 insertions, 24 deletions
diff --git a/include/llvm/CodeGen/TargetPassConfig.h b/include/llvm/CodeGen/TargetPassConfig.h
index 1aaa85d77a54..5918c524d11c 100644
--- a/include/llvm/CodeGen/TargetPassConfig.h
+++ b/include/llvm/CodeGen/TargetPassConfig.h
@@ -84,20 +84,6 @@ template <> struct isPodLike<IdentifyingPassPtr> {
/// This is an ImmutablePass solely for the purpose of exposing CodeGen options
/// to the internals of other CodeGen passes.
class TargetPassConfig : public ImmutablePass {
-public:
- /// Pseudo Pass IDs. These are defined within TargetPassConfig because they
- /// are unregistered pass IDs. They are only useful for use with
- /// TargetPassConfig APIs to identify multiple occurrences of the same pass.
- ///
-
- /// EarlyTailDuplicate - A clone of the TailDuplicate pass that runs early
- /// during codegen, on SSA form.
- static char EarlyTailDuplicateID;
-
- /// PostRAMachineLICM - A clone of the LICM pass that runs during late machine
- /// optimization after regalloc.
- static char PostRAMachineLICMID;
-
private:
PassManagerBase *PM = nullptr;
AnalysisID StartBefore = nullptr;
@@ -218,9 +204,6 @@ public:
/// Return true if the optimized regalloc pipeline is enabled.
bool getOptimizeRegAlloc() const;
- /// Return true if shrink wrapping is enabled.
- bool getEnableShrinkWrap() const;
-
/// Return true if the default global register allocator is in use and
/// has not be overriden on the command line with '-regalloc=...'
bool usingDefaultRegAlloc() const;
@@ -229,7 +212,7 @@ public:
/// representation to the MI representation.
/// Adds IR based lowering and target specific optimization passes and finally
/// the core instruction selection passes.
- /// \returns true if an error occured, false otherwise.
+ /// \returns true if an error occurred, false otherwise.
bool addISelPasses();
/// Add common target configurable passes that perform LLVM IR to IR
@@ -320,14 +303,10 @@ public:
/// verification is enabled.
void addVerifyPass(const std::string &Banner);
- /// Check whether or not GlobalISel should be enabled by default.
- /// Fallback/abort behavior is controlled via other methods.
- virtual bool isGlobalISelEnabled() const;
-
/// Check whether or not GlobalISel should abort on error.
- /// When this is disable, GlobalISel will fall back on SDISel instead of
+ /// When this is disabled, GlobalISel will fall back on SDISel instead of
/// erroring out.
- virtual bool isGlobalISelAbortEnabled() const;
+ bool isGlobalISelAbortEnabled() const;
/// Check whether or not a diagnostic should be emitted when GlobalISel
/// uses the fallback path. In other words, it will emit a diagnostic
@@ -416,6 +395,13 @@ protected:
/// immediately before machine code is emitted.
virtual void addPreEmitPass() { }
+ /// Targets may add passes immediately before machine code is emitted in this
+ /// callback. This is called even later than `addPreEmitPass`.
+ // FIXME: Rename `addPreEmitPass` to something more sensible given its actual
+ // position and remove the `2` suffix here as this callback is what
+ // `addPreEmitPass` *should* be but in reality isn't.
+ virtual void addPreEmitPass2() {}
+
/// Utilities for targets to add passes to the pass manager.
///