diff options
| author | Alina Sbirlea <asbirlea@google.com> | 2019-10-30 11:19:06 -0700 |
|---|---|---|
| committer | Alina Sbirlea <asbirlea@google.com> | 2019-10-30 11:40:16 -0700 |
| commit | 9f0ff0b2634bab6a5be8dace005c9eb24d386dd1 (patch) | |
| tree | ad57d55f88d0ee444ec66543cdf842312ced21ff /llvm/tools/opt | |
| parent | f25f3d39df42ebcc8a394c8ce85981235a6720b0 (diff) | |
| download | bcm5719-llvm-9f0ff0b2634bab6a5be8dace005c9eb24d386dd1.tar.gz bcm5719-llvm-9f0ff0b2634bab6a5be8dace005c9eb24d386dd1.zip | |
[LegacyPassManager] Delete BasicBlockPass/Manager.
Summary:
Delete the BasicBlockPass and BasicBlockManager, all its dependencies and update documentation.
The BasicBlockManager was improperly tested and found to be potentially broken, and was deprecated as of rL373254.
In light of the switch to the new pass manager coming before the next release, this patch is a first cleanup of the LegacyPassManager.
Reviewers: chandlerc, echristo
Subscribers: mehdi_amini, sanjoy.google, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D69121
Diffstat (limited to 'llvm/tools/opt')
| -rw-r--r-- | llvm/tools/opt/PassPrinters.cpp | 38 | ||||
| -rw-r--r-- | llvm/tools/opt/PassPrinters.h | 4 | ||||
| -rw-r--r-- | llvm/tools/opt/opt.cpp | 5 |
3 files changed, 1 insertions, 46 deletions
diff --git a/llvm/tools/opt/PassPrinters.cpp b/llvm/tools/opt/PassPrinters.cpp index 70da6a43f8d..a877d9dc90f 100644 --- a/llvm/tools/opt/PassPrinters.cpp +++ b/llvm/tools/opt/PassPrinters.cpp @@ -198,40 +198,6 @@ struct RegionPassPrinter : public RegionPass { char RegionPassPrinter::ID = 0; -struct BasicBlockPassPrinter : public BasicBlockPass { - const PassInfo *PassToPrint; - raw_ostream &Out; - static char ID; - std::string PassName; - bool QuietPass; - - BasicBlockPassPrinter(const PassInfo *PI, raw_ostream &out, bool Quiet) - : BasicBlockPass(ID), PassToPrint(PI), Out(out), QuietPass(Quiet) { - std::string PassToPrintName = PassToPrint->getPassName(); - PassName = "BasicBlockPass Printer: " + PassToPrintName; - } - - bool runOnBasicBlock(BasicBlock &BB) override { - if (!QuietPass) - Out << "Printing Analysis info for BasicBlock '" << BB.getName() - << "': Pass " << PassToPrint->getPassName() << ":\n"; - - // Get and print pass... - getAnalysisID<Pass>(PassToPrint->getTypeInfo()) - .print(Out, BB.getParent()->getParent()); - return false; - } - - StringRef getPassName() const override { return PassName; } - - void getAnalysisUsage(AnalysisUsage &AU) const override { - AU.addRequiredID(PassToPrint->getTypeInfo()); - AU.setPreservesAll(); - } -}; - -char BasicBlockPassPrinter::ID = 0; - } // end anonymous namespace FunctionPass *llvm::createFunctionPassPrinter(const PassInfo *PI, @@ -260,7 +226,3 @@ RegionPass *llvm::createRegionPassPrinter(const PassInfo *PI, raw_ostream &OS, return new RegionPassPrinter(PI, OS, Quiet); } -BasicBlockPass *llvm::createBasicBlockPassPrinter(const PassInfo *PI, - raw_ostream &OS, bool Quiet) { - return new BasicBlockPassPrinter(PI, OS, Quiet); -} diff --git a/llvm/tools/opt/PassPrinters.h b/llvm/tools/opt/PassPrinters.h index d4e7a4a97f3..692befbdae7 100644 --- a/llvm/tools/opt/PassPrinters.h +++ b/llvm/tools/opt/PassPrinters.h @@ -18,7 +18,6 @@ namespace llvm { -class BasicBlockPass; class CallGraphSCCPass; class FunctionPass; class ModulePass; @@ -43,9 +42,6 @@ LoopPass *createLoopPassPrinter(const PassInfo *PI, raw_ostream &out, RegionPass *createRegionPassPrinter(const PassInfo *PI, raw_ostream &out, bool Quiet); -BasicBlockPass *createBasicBlockPassPrinter(const PassInfo *PI, - raw_ostream &out, bool Quiet); - } // end namespace llvm #endif // LLVM_TOOLS_OPT_PASSPRINTERS_H diff --git a/llvm/tools/opt/opt.cpp b/llvm/tools/opt/opt.cpp index 15495a511d0..433f5f22d8d 100644 --- a/llvm/tools/opt/opt.cpp +++ b/llvm/tools/opt/opt.cpp @@ -328,7 +328,7 @@ public: PassKind Kind = P->getPassKind(); StringRef Name = P->getPassName(); - // TODO: Implement Debugify for BasicBlockPass, LoopPass. + // TODO: Implement Debugify for LoopPass. switch (Kind) { case PT_Function: super::add(createDebugifyFunctionPass()); @@ -790,9 +790,6 @@ int main(int argc, char **argv) { if (AnalyzeOnly) { switch (Kind) { - case PT_BasicBlock: - Passes.add(createBasicBlockPassPrinter(PassInf, Out->os(), Quiet)); - break; case PT_Region: Passes.add(createRegionPassPrinter(PassInf, Out->os(), Quiet)); break; |

