diff options
| author | 2020-08-03 15:06:44 +0000 | |
|---|---|---|
| committer | 2020-08-03 15:06:44 +0000 | |
| commit | b64793999546ed8adebaeebd9d8345d18db8927d (patch) | |
| tree | 4357c27b561d73b0e089727c6ed659f2ceff5f47 /gnu/llvm/lib/Transforms/IPO/SCCP.cpp | |
| parent | Add support for UTF-8 DISPLAY-HINTs with octet length. For now only (diff) | |
| download | wireguard-openbsd-b64793999546ed8adebaeebd9d8345d18db8927d.tar.xz wireguard-openbsd-b64793999546ed8adebaeebd9d8345d18db8927d.zip | |
Remove LLVM 8.0.1 files.
Diffstat (limited to 'gnu/llvm/lib/Transforms/IPO/SCCP.cpp')
| -rw-r--r-- | gnu/llvm/lib/Transforms/IPO/SCCP.cpp | 89 |
1 files changed, 0 insertions, 89 deletions
diff --git a/gnu/llvm/lib/Transforms/IPO/SCCP.cpp b/gnu/llvm/lib/Transforms/IPO/SCCP.cpp deleted file mode 100644 index d2c34abfc13..00000000000 --- a/gnu/llvm/lib/Transforms/IPO/SCCP.cpp +++ /dev/null @@ -1,89 +0,0 @@ -#include "llvm/Transforms/IPO/SCCP.h" -#include "llvm/Analysis/AssumptionCache.h" -#include "llvm/Analysis/PostDominators.h" -#include "llvm/Analysis/TargetLibraryInfo.h" -#include "llvm/Transforms/IPO.h" -#include "llvm/Transforms/Scalar/SCCP.h" - -using namespace llvm; - -PreservedAnalyses IPSCCPPass::run(Module &M, ModuleAnalysisManager &AM) { - const DataLayout &DL = M.getDataLayout(); - auto &TLI = AM.getResult<TargetLibraryAnalysis>(M); - auto &FAM = AM.getResult<FunctionAnalysisManagerModuleProxy>(M).getManager(); - auto getAnalysis = [&FAM](Function &F) -> AnalysisResultsForFn { - DominatorTree &DT = FAM.getResult<DominatorTreeAnalysis>(F); - return { - make_unique<PredicateInfo>(F, DT, FAM.getResult<AssumptionAnalysis>(F)), - &DT, FAM.getCachedResult<PostDominatorTreeAnalysis>(F)}; - }; - - if (!runIPSCCP(M, DL, &TLI, getAnalysis)) - return PreservedAnalyses::all(); - - PreservedAnalyses PA; - PA.preserve<DominatorTreeAnalysis>(); - PA.preserve<PostDominatorTreeAnalysis>(); - PA.preserve<FunctionAnalysisManagerModuleProxy>(); - return PA; -} - -namespace { - -//===--------------------------------------------------------------------===// -// -/// IPSCCP Class - This class implements interprocedural Sparse Conditional -/// Constant Propagation. -/// -class IPSCCPLegacyPass : public ModulePass { -public: - static char ID; - - IPSCCPLegacyPass() : ModulePass(ID) { - initializeIPSCCPLegacyPassPass(*PassRegistry::getPassRegistry()); - } - - bool runOnModule(Module &M) override { - if (skipModule(M)) - return false; - const DataLayout &DL = M.getDataLayout(); - const TargetLibraryInfo *TLI = - &getAnalysis<TargetLibraryInfoWrapperPass>().getTLI(); - - auto getAnalysis = [this](Function &F) -> AnalysisResultsForFn { - DominatorTree &DT = - this->getAnalysis<DominatorTreeWrapperPass>(F).getDomTree(); - return { - make_unique<PredicateInfo>( - F, DT, - this->getAnalysis<AssumptionCacheTracker>().getAssumptionCache( - F)), - nullptr, // We cannot preserve the DT or PDT with the legacy pass - nullptr}; // manager, so set them to nullptr. - }; - - return runIPSCCP(M, DL, TLI, getAnalysis); - } - - void getAnalysisUsage(AnalysisUsage &AU) const override { - AU.addRequired<AssumptionCacheTracker>(); - AU.addRequired<DominatorTreeWrapperPass>(); - AU.addRequired<TargetLibraryInfoWrapperPass>(); - } -}; - -} // end anonymous namespace - -char IPSCCPLegacyPass::ID = 0; - -INITIALIZE_PASS_BEGIN(IPSCCPLegacyPass, "ipsccp", - "Interprocedural Sparse Conditional Constant Propagation", - false, false) -INITIALIZE_PASS_DEPENDENCY(DominatorTreeWrapperPass) -INITIALIZE_PASS_DEPENDENCY(TargetLibraryInfoWrapperPass) -INITIALIZE_PASS_END(IPSCCPLegacyPass, "ipsccp", - "Interprocedural Sparse Conditional Constant Propagation", - false, false) - -// createIPSCCPPass - This is the public interface to this file. -ModulePass *llvm::createIPSCCPPass() { return new IPSCCPLegacyPass(); } |
