[PATCH] D110450: [LLD] Remove global state in lld/COFF
Alexandre Ganea via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 27 10:37:11 PDT 2021
aganea added inline comments.
================
Comment at: lld/COFF/DLL.cpp:107
+private:
+ COFFLinkerContext &ctx;
};
----------------
I'm seeing that a lot of the `*Chunk` classes have this extra context now. Have you tried to measure peak RAM usage when linking large executables? Also in scenarios when `/Gy` is used, for example MinGW seems to use that.
My point being, if we can pass the context by argument that would be better maybe instead of storing it into these tiny objects. But I realize that isn't always practical, thus the global access proposed in D108850 - `COFFLinkerContext` would simply inherit from `CommonLinkingContext` and then could be accessed from anywhere by a call to `context()`.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D110450/new/
https://reviews.llvm.org/D110450
More information about the llvm-commits
mailing list