[llvm] d04f3e0 - [CodeGen] Make MMI immutable NPM pass
Yuanfang Chen via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 10 18:00:27 PDT 2020
Author: Yuanfang Chen
Date: 2020-08-10T17:52:42-07:00
New Revision: d04f3e028d3287e43d4b84efcc33c2816ac9d3d6
URL: https://github.com/llvm/llvm-project/commit/d04f3e028d3287e43d4b84efcc33c2816ac9d3d6
DIFF: https://github.com/llvm/llvm-project/commit/d04f3e028d3287e43d4b84efcc33c2816ac9d3d6.diff
LOG: [CodeGen] Make MMI immutable NPM pass
Added:
Modified:
llvm/include/llvm/CodeGen/MachineModuleInfo.h
Removed:
################################################################################
diff --git a/llvm/include/llvm/CodeGen/MachineModuleInfo.h b/llvm/include/llvm/CodeGen/MachineModuleInfo.h
index 0ee595b5b5ce..a37708c55370 100644
--- a/llvm/include/llvm/CodeGen/MachineModuleInfo.h
+++ b/llvm/include/llvm/CodeGen/MachineModuleInfo.h
@@ -54,8 +54,8 @@ class Module;
//===----------------------------------------------------------------------===//
/// This class can be derived from and used by targets to hold private
/// target-specific information for each Module. Objects of type are
-/// accessed/created with MMI::getInfo and destroyed when the MachineModuleInfo
-/// is destroyed.
+/// accessed/created with MachineModuleInfo::getObjFileInfo and destroyed when
+/// the MachineModuleInfo is destroyed.
///
class MachineModuleInfoImpl {
public:
@@ -251,6 +251,12 @@ class MachineModuleInfo {
return Personalities;
}
/// \}
+
+ // MMI owes MCContext. It should never be invalidated.
+ bool invalidate(Module &, const PreservedAnalyses &,
+ ModuleAnalysisManager::Invalidator &) {
+ return false;
+ }
}; // End class MachineModuleInfo
class MachineModuleInfoWrapperPass : public ImmutablePass {
More information about the llvm-commits
mailing list