Skip to content

Commit f64dc4e

Browse files
Ryan Santhirarajafhahn
authored andcommitted
Preserve GlobalsAA analysis result in InjectTLIMappings
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
1 parent e07a8b5 commit f64dc4e

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"
@@ -144,6 +145,7 @@ void InjectTLIMappingsLegacy::getAnalysisUsage(AnalysisUsage &AU) const {
144145
AU.addPreserved<LoopAccessLegacyAnalysis>();
145146
AU.addPreserved<DemandedBitsWrapperPass>();
146147
AU.addPreserved<OptimizationRemarkEmitterWrapperPass>();
148+
AU.addPreserved<GlobalsAAWrapperPass>();
147149
}
148150

149151
////////////////////////////////////////////////////////////////////////////////

0 commit comments

Comments
 (0)