Skip to content

Commit

Permalink
Preserve GlobalsAA analysis result in InjectTLIMappings (#1382)
Browse files Browse the repository at this point in the history
InjectTLIMappings fails to preserve the analysis result of GlobalsAA. Not preserving the analysis might affect benchmark performance. This change fixes this issue.

Patch by: Ryan Santhiraraja <rsanthir@quicinc.com>

Reviewers: fpetrogalli, joerg, fhahn

Reviewed By: fhahn

Differential Revision: https://reviews.llvm.org/D82343

Co-authored-by: Ryan Santhiraraja <rsanthir@quicinc.com>
  • Loading branch information
fhahn and Ryan Santhiraraja committed Jul 2, 2020
1 parent 01c7d75 commit 1e3d48d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions llvm/lib/Transforms/Utils/InjectTLIMappings.cpp
Expand Up @@ -14,6 +14,7 @@
#include "llvm/Transforms/Utils/InjectTLIMappings.h"
#include "llvm/ADT/Statistic.h"
#include "llvm/Analysis/DemandedBits.h"
#include "llvm/Analysis/GlobalsModRef.h"
#include "llvm/Analysis/OptimizationRemarkEmitter.h"
#include "llvm/Analysis/VectorUtils.h"
#include "llvm/IR/InstIterator.h"
Expand Down Expand Up @@ -176,6 +177,7 @@ void InjectTLIMappingsLegacy::getAnalysisUsage(AnalysisUsage &AU) const {
AU.addPreserved<LoopAccessLegacyAnalysis>();
AU.addPreserved<DemandedBitsWrapperPass>();
AU.addPreserved<OptimizationRemarkEmitterWrapperPass>();
AU.addPreserved<GlobalsAAWrapperPass>();
}

////////////////////////////////////////////////////////////////////////////////
Expand Down

0 comments on commit 1e3d48d

Please sign in to comment.