[PATCH] D100797: Reset NextFnNum in MachineModuleInfo::initialize

Daniel Sanders via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 19 14:48:09 PDT 2021


dsanders created this revision.
Herald added a subscriber: hiraditya.
dsanders requested review of this revision.
Herald added a project: LLVM.

In an env that reuses compiler instances for multiple compilations, this
omission results in non-deterministic assembly output (names of the
auto-generated labels) if the order or full set of Modules compiled
varies.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D100797

Files:
  llvm/lib/CodeGen/MachineModuleInfo.cpp


Index: llvm/lib/CodeGen/MachineModuleInfo.cpp
===================================================================
--- llvm/lib/CodeGen/MachineModuleInfo.cpp
+++ llvm/lib/CodeGen/MachineModuleInfo.cpp
@@ -196,6 +196,7 @@
 void MachineModuleInfo::initialize() {
   ObjFileMMI = nullptr;
   CurCallSite = 0;
+  NextFnNum = 0;
   UsesMSVCFloatingPoint = UsesMorestackAddr = false;
   HasSplitStack = HasNosplitStack = false;
   AddrLabelSymbols = nullptr;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D100797.338649.patch
Type: text/x-patch
Size: 452 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210419/c96e2e95/attachment.bin>


More information about the llvm-commits mailing list