[PATCH] D75097: [MC] Default MCContext::UseNamesOnTempLabels to false and only use it for MCAsmStreamer
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 25 17:30:40 PST 2020
MaskRay updated this revision to Diff 246607.
MaskRay retitled this revision from "[cc1as] Unset UseNamesOnTempLabels" to "[MC] Default MCContext::UseNamesOnTempLabels to false and only use it for MCAsmStreamer".
MaskRay edited the summary of this revision.
MaskRay added a comment.
Herald added subscribers: llvm-commits, hiraditya.
Herald added a project: LLVM.
Repurpose
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D75097/new/
https://reviews.llvm.org/D75097
Files:
llvm/include/llvm/MC/MCContext.h
llvm/lib/CodeGen/LLVMTargetMachine.cpp
llvm/lib/MC/MCAsmStreamer.cpp
llvm/tools/llvm-mc/llvm-mc.cpp
llvm/tools/llvm-ml/llvm-ml.cpp
Index: llvm/tools/llvm-ml/llvm-ml.cpp
===================================================================
--- llvm/tools/llvm-ml/llvm-ml.cpp
+++ llvm/tools/llvm-ml/llvm-ml.cpp
@@ -333,9 +333,6 @@
} else {
assert(FileType == OFT_ObjectFile && "Invalid file type!");
- // Don't waste memory on names of temp labels.
- Ctx.setUseNamesOnTempLabels(false);
-
if (!Out->os().supportsSeeking()) {
BOS = std::make_unique<buffer_ostream>(Out->os());
OS = BOS.get();
Index: llvm/tools/llvm-mc/llvm-mc.cpp
===================================================================
--- llvm/tools/llvm-mc/llvm-mc.cpp
+++ llvm/tools/llvm-mc/llvm-mc.cpp
@@ -474,9 +474,6 @@
} else {
assert(FileType == OFT_ObjectFile && "Invalid file type!");
- // Don't waste memory on names of temp labels.
- Ctx.setUseNamesOnTempLabels(false);
-
if (!Out->os().supportsSeeking()) {
BOS = std::make_unique<buffer_ostream>(Out->os());
OS = BOS.get();
Index: llvm/lib/MC/MCAsmStreamer.cpp
===================================================================
--- llvm/lib/MC/MCAsmStreamer.cpp
+++ llvm/lib/MC/MCAsmStreamer.cpp
@@ -79,6 +79,8 @@
InstPrinter->setCommentStream(CommentStream);
if (Assembler->getBackendPtr())
setAllowAutoPadding(Assembler->getBackend().allowAutoPadding());
+
+ Context.setUseNamesOnTempLabels(true);
}
MCAssembler &getAssembler() { return *Assembler; }
Index: llvm/lib/CodeGen/LLVMTargetMachine.cpp
===================================================================
--- llvm/lib/CodeGen/LLVMTargetMachine.cpp
+++ llvm/lib/CodeGen/LLVMTargetMachine.cpp
@@ -157,9 +157,6 @@
if (!MCE || !MAB)
return true;
- // Don't waste memory on names of temp labels.
- Context.setUseNamesOnTempLabels(false);
-
Triple T(getTargetTriple().str());
AsmStreamer.reset(getTarget().createMCObjectStreamer(
T, Context, std::unique_ptr<MCAsmBackend>(MAB),
Index: llvm/include/llvm/MC/MCContext.h
===================================================================
--- llvm/include/llvm/MC/MCContext.h
+++ llvm/include/llvm/MC/MCContext.h
@@ -188,7 +188,7 @@
/// differences between temporary and non-temporary labels (primarily on
/// Darwin).
bool AllowTemporaryLabels = true;
- bool UseNamesOnTempLabels = true;
+ bool UseNamesOnTempLabels = false;
/// The Compile Unit ID that we are currently processing.
unsigned DwarfCompileUnitID = 0;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D75097.246607.patch
Type: text/x-patch
Size: 2485 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200226/fa3c6257/attachment.bin>
More information about the llvm-commits
mailing list