[PATCH] D93261: [NewPM] Add TargetMachine method to add alias analyses
Arthur Eubanks via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 21 13:46:23 PST 2020
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG76f4f42ebaf9: [NewPM] Add TargetMachine method to add alias analyses (authored by aeubanks).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D93261/new/
https://reviews.llvm.org/D93261
Files:
llvm/include/llvm/Passes/PassBuilder.h
llvm/include/llvm/Target/TargetMachine.h
llvm/lib/Passes/PassBuilder.cpp
Index: llvm/lib/Passes/PassBuilder.cpp
===================================================================
--- llvm/lib/Passes/PassBuilder.cpp
+++ llvm/lib/Passes/PassBuilder.cpp
@@ -1882,6 +1882,10 @@
// results from `GlobalsAA` through a readonly proxy.
AA.registerModuleAnalysis<GlobalsAA>();
+ // Add target-specific alias analyses.
+ if (TM)
+ TM->registerAliasAnalyses(AA);
+
return AA;
}
Index: llvm/include/llvm/Target/TargetMachine.h
===================================================================
--- llvm/include/llvm/Target/TargetMachine.h
+++ llvm/include/llvm/Target/TargetMachine.h
@@ -23,6 +23,7 @@
namespace llvm {
+class AAManager;
class Function;
class GlobalValue;
class MachineModuleInfoWrapperPass;
@@ -322,6 +323,10 @@
virtual void registerPassBuilderCallbacks(PassBuilder &,
bool DebugPassManager) {}
+ /// Allow the target to register alias analyses with the AAManager for use
+ /// with the new pass manager. Only affects the "default" AAManager.
+ virtual void registerAliasAnalyses(AAManager &) {}
+
/// Add passes to the specified pass manager to get the specified file
/// emitted. Typically this will involve several steps of code generation.
/// This method should return true if emission of this file type is not
Index: llvm/include/llvm/Passes/PassBuilder.h
===================================================================
--- llvm/include/llvm/Passes/PassBuilder.h
+++ llvm/include/llvm/Passes/PassBuilder.h
@@ -460,6 +460,9 @@
/// Build the default `AAManager` with the default alias analysis pipeline
/// registered.
+ ///
+ /// This also adds target-specific alias analyses registered via
+ /// TargetMachine::registerAliasAnalyses().
AAManager buildDefaultAAPipeline();
/// Parse a textual pass pipeline description into a \c
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D93261.313195.patch
Type: text/x-patch
Size: 1881 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20201221/1bd58a06/attachment.bin>
More information about the llvm-commits
mailing list