[PATCH] D111680: [NFC] Rename EmitAssemblyHelper new/legacy PM methods
Arthur Eubanks via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Oct 12 15:42:22 PDT 2021
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rGb6a8c695542b: [NFC] Rename EmitAssemblyHelper new/legacy PM methods (authored by aeubanks).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D111680/new/
https://reviews.llvm.org/D111680
Files:
clang/lib/CodeGen/BackendUtil.cpp
Index: clang/lib/CodeGen/BackendUtil.cpp
===================================================================
--- clang/lib/CodeGen/BackendUtil.cpp
+++ clang/lib/CodeGen/BackendUtil.cpp
@@ -172,11 +172,16 @@
std::unique_ptr<TargetMachine> TM;
+ // Emit output using the legacy pass manager for the optimization pipeline.
+ // This will be removed soon when using the legacy pass manager for the
+ // optimization pipeline is no longer supported.
+ void EmitAssemblyWithLegacyPassManager(BackendAction Action,
+ std::unique_ptr<raw_pwrite_stream> OS);
+
+ // Emit output using the new pass manager for the optimization pipeline. This
+ // is the default.
void EmitAssembly(BackendAction Action,
std::unique_ptr<raw_pwrite_stream> OS);
-
- void EmitAssemblyWithNewPassManager(BackendAction Action,
- std::unique_ptr<raw_pwrite_stream> OS);
};
// We need this wrapper to access LangOpts and CGOpts from extension functions
@@ -966,8 +971,8 @@
return true;
}
-void EmitAssemblyHelper::EmitAssembly(BackendAction Action,
- std::unique_ptr<raw_pwrite_stream> OS) {
+void EmitAssemblyHelper::EmitAssemblyWithLegacyPassManager(
+ BackendAction Action, std::unique_ptr<raw_pwrite_stream> OS) {
TimeRegion Region(CodeGenOpts.TimePasses ? &CodeGenerationTime : nullptr);
setCommandLineOpts(CodeGenOpts);
@@ -1509,8 +1514,8 @@
///
/// This API is planned to have its functionality finished and then to replace
/// `EmitAssembly` at some point in the future when the default switches.
-void EmitAssemblyHelper::EmitAssemblyWithNewPassManager(
- BackendAction Action, std::unique_ptr<raw_pwrite_stream> OS) {
+void EmitAssemblyHelper::EmitAssembly(BackendAction Action,
+ std::unique_ptr<raw_pwrite_stream> OS) {
TimeRegion Region(CodeGenOpts.TimePasses ? &CodeGenerationTime : nullptr);
setCommandLineOpts(CodeGenOpts);
@@ -1686,8 +1691,8 @@
EmitAssemblyHelper AsmHelper(Diags, HeaderOpts, CGOpts, TOpts, LOpts, M);
- if (!CGOpts.LegacyPassManager)
- AsmHelper.EmitAssemblyWithNewPassManager(Action, std::move(OS));
+ if (CGOpts.LegacyPassManager)
+ AsmHelper.EmitAssemblyWithLegacyPassManager(Action, std::move(OS));
else
AsmHelper.EmitAssembly(Action, std::move(OS));
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D111680.379209.patch
Type: text/x-patch
Size: 2405 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20211012/a100d6e5/attachment.bin>
More information about the cfe-commits
mailing list