[PATCH] D118541: export MachineModuleAnalysis to the new pass manager
Jameson Nash via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Jan 29 12:22:22 PST 2022
vtjnash created this revision.
Herald added a subscriber: hiraditya.
vtjnash requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
Followup to https://reviews.llvm.org/D64183, this seems to be one of the
analyses necessary for many of the passes that have not been converted
yet to the NewPM.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D118541
Files:
llvm/include/llvm/CodeGen/MachinePassRegistry.def
llvm/lib/Passes/PassBuilder.cpp
llvm/lib/Passes/PassRegistry.def
Index: llvm/lib/Passes/PassRegistry.def
===================================================================
--- llvm/lib/Passes/PassRegistry.def
+++ llvm/lib/Passes/PassRegistry.def
@@ -29,6 +29,7 @@
MODULE_ANALYSIS("asan-globals-md", ASanGlobalsMetadataAnalysis())
MODULE_ANALYSIS("inline-advisor", InlineAdvisorAnalysis())
MODULE_ANALYSIS("ir-similarity", IRSimilarityAnalysis())
+MODULE_ANALYSIS("machine-module", MachineModuleAnalysis(static_cast<LLVMTargetMachine*>(TM)))
#ifndef MODULE_ALIAS_ANALYSIS
#define MODULE_ALIAS_ANALYSIS(NAME, CREATE_PASS) \
Index: llvm/lib/Passes/PassBuilder.cpp
===================================================================
--- llvm/lib/Passes/PassBuilder.cpp
+++ llvm/lib/Passes/PassBuilder.cpp
@@ -71,6 +71,7 @@
#include "llvm/Analysis/TargetLibraryInfo.h"
#include "llvm/Analysis/TargetTransformInfo.h"
#include "llvm/Analysis/TypeBasedAliasAnalysis.h"
+#include "llvm/CodeGen/MachineModuleInfo.h"
#include "llvm/IR/Dominators.h"
#include "llvm/IR/IRPrintingPasses.h"
#include "llvm/IR/PassManager.h"
Index: llvm/include/llvm/CodeGen/MachinePassRegistry.def
===================================================================
--- llvm/include/llvm/CodeGen/MachinePassRegistry.def
+++ llvm/include/llvm/CodeGen/MachinePassRegistry.def
@@ -17,6 +17,7 @@
#define MODULE_ANALYSIS(NAME, PASS_NAME, CONSTRUCTOR)
#endif
MODULE_ANALYSIS("pass-instrumentation", PassInstrumentationAnalysis, (PIC))
+MODULE_ANALYSIS("machine-module", MachineModuleAnalysis, (TM))
#undef MODULE_ANALYSIS
#ifndef MODULE_PASS
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D118541.404295.patch
Type: text/x-patch
Size: 1590 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220129/8b9c7403/attachment.bin>
More information about the llvm-commits
mailing list