[llvm][NFC] Removed addressed fixme; formatting.

Removed already-addressed fixme, and updated formatting of a few lines
that were triggering Harbormaster.
This commit is contained in:
Mircea Trofin 2020-04-29 09:04:14 -07:00
parent 5e37cf0adc
commit 4632b7292a
1 changed files with 7 additions and 10 deletions

View File

@ -34,8 +34,6 @@
#include "llvm/Analysis/ProfileSummaryInfo.h" #include "llvm/Analysis/ProfileSummaryInfo.h"
#include "llvm/Analysis/TargetLibraryInfo.h" #include "llvm/Analysis/TargetLibraryInfo.h"
#include "llvm/Analysis/TargetTransformInfo.h" #include "llvm/Analysis/TargetTransformInfo.h"
#include "llvm/Transforms/Utils/Local.h"
#include "llvm/Transforms/Utils/CallPromotionUtils.h"
#include "llvm/IR/Attributes.h" #include "llvm/IR/Attributes.h"
#include "llvm/IR/BasicBlock.h" #include "llvm/IR/BasicBlock.h"
#include "llvm/IR/DataLayout.h" #include "llvm/IR/DataLayout.h"
@ -57,8 +55,10 @@
#include "llvm/Support/CommandLine.h" #include "llvm/Support/CommandLine.h"
#include "llvm/Support/Debug.h" #include "llvm/Support/Debug.h"
#include "llvm/Support/raw_ostream.h" #include "llvm/Support/raw_ostream.h"
#include "llvm/Transforms/Utils/CallPromotionUtils.h"
#include "llvm/Transforms/Utils/Cloning.h" #include "llvm/Transforms/Utils/Cloning.h"
#include "llvm/Transforms/Utils/ImportedFunctionsInliningStatistics.h" #include "llvm/Transforms/Utils/ImportedFunctionsInliningStatistics.h"
#include "llvm/Transforms/Utils/Local.h"
#include "llvm/Transforms/Utils/ModuleUtils.h" #include "llvm/Transforms/Utils/ModuleUtils.h"
#include <algorithm> #include <algorithm>
#include <cassert> #include <cassert>
@ -158,9 +158,9 @@ using InlinedArrayAllocasTy = DenseMap<ArrayType *, std::vector<AllocaInst *>>;
/// *actually make it to the backend*, which is really what we want. /// *actually make it to the backend*, which is really what we want.
/// ///
/// Because we don't have this information, we do this simple and useful hack. /// Because we don't have this information, we do this simple and useful hack.
static void mergeInlinedArrayAllocas( static void mergeInlinedArrayAllocas(Function *Caller, InlineFunctionInfo &IFI,
Function *Caller, InlineFunctionInfo &IFI, InlinedArrayAllocasTy &InlinedArrayAllocas,
InlinedArrayAllocasTy &InlinedArrayAllocas, int InlineHistory) { int InlineHistory) {
SmallPtrSet<AllocaInst *, 16> UsedAllocas; SmallPtrSet<AllocaInst *, 16> UsedAllocas;
// When processing our SCC, check to see if CS was inlined from some other // When processing our SCC, check to see if CS was inlined from some other
@ -1003,8 +1003,7 @@ PreservedAnalyses InlinerPass::run(LazyCallGraph::SCC &InitialC,
// node however because those functions aren't going to be mutated by this // node however because those functions aren't going to be mutated by this
// pass. // pass.
FunctionAnalysisManager &FAM = FunctionAnalysisManager &FAM =
AM.getResult<FunctionAnalysisManagerCGSCCProxy>(*C, CG) AM.getResult<FunctionAnalysisManagerCGSCCProxy>(*C, CG).getManager();
.getManager();
// Get the remarks emission analysis for the caller. // Get the remarks emission analysis for the caller.
auto &ORE = FAM.getResult<OptimizationRemarkEmitterAnalysis>(F); auto &ORE = FAM.getResult<OptimizationRemarkEmitterAnalysis>(F);
@ -1111,7 +1110,6 @@ PreservedAnalyses InlinerPass::run(LazyCallGraph::SCC &InitialC,
int NewHistoryID = InlineHistory.size(); int NewHistoryID = InlineHistory.size();
InlineHistory.push_back({&Callee, InlineHistoryID}); InlineHistory.push_back({&Callee, InlineHistoryID});
// FIXME(mtrofin): refactor IFI.InlinedCallSites to be CallBase-based
for (CallBase *CS : reverse(IFI.InlinedCallSites)) { for (CallBase *CS : reverse(IFI.InlinedCallSites)) {
Function *NewCallee = CS->getCalledFunction(); Function *NewCallee = CS->getCalledFunction();
if (!NewCallee) { if (!NewCallee) {
@ -1237,8 +1235,7 @@ PreservedAnalyses InlinerPass::run(LazyCallGraph::SCC &InitialC,
// function there. Also, cclear out any cached analyses. // function there. Also, cclear out any cached analyses.
auto &DeadC = *CG.lookupSCC(*CG.lookup(*DeadF)); auto &DeadC = *CG.lookupSCC(*CG.lookup(*DeadF));
FunctionAnalysisManager &FAM = FunctionAnalysisManager &FAM =
AM.getResult<FunctionAnalysisManagerCGSCCProxy>(DeadC, CG) AM.getResult<FunctionAnalysisManagerCGSCCProxy>(DeadC, CG).getManager();
.getManager();
FAM.clear(*DeadF, DeadF->getName()); FAM.clear(*DeadF, DeadF->getName());
AM.clear(DeadC, DeadC.getName()); AM.clear(DeadC, DeadC.getName());
auto &DeadRC = DeadC.getOuterRefSCC(); auto &DeadRC = DeadC.getOuterRefSCC();