diff options
author | Bob Wilson <bob.wilson@apple.com> | 2012-07-02 19:48:37 +0000 |
---|---|---|
committer | Bob Wilson <bob.wilson@apple.com> | 2012-07-02 19:48:37 +0000 |
commit | 3fb99a73686c39d9855b3f8881add977af3868cb (patch) | |
tree | 282e642ba759eb5098ac222ae5705b036fce8364 /include | |
parent | 564fbf6aff8fb95646a1290078a37c2d4dbe629f (diff) | |
download | external_llvm-3fb99a73686c39d9855b3f8881add977af3868cb.zip external_llvm-3fb99a73686c39d9855b3f8881add977af3868cb.tar.gz external_llvm-3fb99a73686c39d9855b3f8881add977af3868cb.tar.bz2 |
Consistently use AnalysisID types in TargetPassConfig.
This makes it possible to just use a zero value to represent "no pass", so
the phony NoPassID global variable is no longer needed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159568 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r-- | include/llvm/CodeGen/MachineScheduler.h | 2 | ||||
-rw-r--r-- | include/llvm/CodeGen/Passes.h | 18 |
2 files changed, 9 insertions, 11 deletions
diff --git a/include/llvm/CodeGen/MachineScheduler.h b/include/llvm/CodeGen/MachineScheduler.h index e5d3a98..8da2045 100644 --- a/include/llvm/CodeGen/MachineScheduler.h +++ b/include/llvm/CodeGen/MachineScheduler.h @@ -19,7 +19,7 @@ // createCustomMachineSched); // // Inside <Target>PassConfig: -// enablePass(MachineSchedulerID); +// enablePass(&MachineSchedulerID); // MachineSchedRegistry::setDefault(createCustomMachineSched); // //===----------------------------------------------------------------------===// diff --git a/include/llvm/CodeGen/Passes.h b/include/llvm/CodeGen/Passes.h index 1ccf29d..b7c81af 100644 --- a/include/llvm/CodeGen/Passes.h +++ b/include/llvm/CodeGen/Passes.h @@ -32,8 +32,6 @@ namespace llvm { namespace llvm { -extern char &NoPassID; // Allow targets to choose not to run a pass. - class PassConfigImpl; /// Target-Independent Code Generator Pass Configuration Options. @@ -101,19 +99,19 @@ public: /// Allow the target to override a specific pass without overriding the pass /// pipeline. When passes are added to the standard pipeline at the - /// point where StadardID is expected, add TargetID in its place. - void substitutePass(char &StandardID, char &TargetID); + /// point where StandardID is expected, add TargetID in its place. + void substitutePass(AnalysisID StandardID, AnalysisID TargetID); /// Insert InsertedPassID pass after TargetPassID pass. - void insertPass(const char &TargetPassID, const char &InsertedPassID); + void insertPass(AnalysisID TargetPassID, AnalysisID InsertedPassID); /// Allow the target to enable a specific standard pass by default. - void enablePass(char &ID) { substitutePass(ID, ID); } + void enablePass(AnalysisID PassID) { substitutePass(PassID, PassID); } /// Allow the target to disable a specific standard pass by default. - void disablePass(char &ID) { substitutePass(ID, NoPassID); } + void disablePass(AnalysisID PassID) { substitutePass(PassID, 0); } - /// Return the pass ssubtituted for StandardID by the target. + /// Return the pass substituted for StandardID by the target. /// If no substitution exists, return StandardID. AnalysisID getPassSubstitution(AnalysisID StandardID) const; @@ -237,8 +235,8 @@ protected: /// /// Add a CodeGen pass at this point in the pipeline after checking overrides. - /// Return the pass that was added, or NoPassID. - AnalysisID addPass(char &ID); + /// Return the pass that was added, or zero if no pass was added. + AnalysisID addPass(AnalysisID PassID); /// Add a pass to the PassManager. void addPass(Pass *P); |