Skip to content

Commit 1e3d48d

Browse files
fhahnRyan Santhiraraja
andauthored
Preserve GlobalsAA analysis result in InjectTLIMappings (#1382)
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 <[email protected]> Reviewers: fpetrogalli, joerg, fhahn Reviewed By: fhahn Differential Revision: https://reviews.llvm.org/D82343 Co-authored-by: Ryan Santhiraraja <[email protected]>
1 parent 01c7d75 commit 1e3d48d

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

llvm/lib/Transforms/Utils/InjectTLIMappings.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
#include "llvm/Transforms/Utils/InjectTLIMappings.h"
1515
#include "llvm/ADT/Statistic.h"
1616
#include "llvm/Analysis/DemandedBits.h"
17+
#include "llvm/Analysis/GlobalsModRef.h"
1718
#include "llvm/Analysis/OptimizationRemarkEmitter.h"
1819
#include "llvm/Analysis/VectorUtils.h"
1920
#include "llvm/IR/InstIterator.h"
@@ -176,6 +177,7 @@ void InjectTLIMappingsLegacy::getAnalysisUsage(AnalysisUsage &AU) const {
176177
AU.addPreserved<LoopAccessLegacyAnalysis>();
177178
AU.addPreserved<DemandedBitsWrapperPass>();
178179
AU.addPreserved<OptimizationRemarkEmitterWrapperPass>();
180+
AU.addPreserved<GlobalsAAWrapperPass>();
179181
}
180182

181183
////////////////////////////////////////////////////////////////////////////////

0 commit comments

Comments
 (0)