[PATCH] D145490: [GlobalOpt] Collect initializer when building GlobalPart.
Nikita Popov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 8 08:45:03 PST 2023
nikic added inline comments.
================
Comment at: llvm/lib/Transforms/IPO/GlobalOpt.cpp:393
+ if (Inserted) {
+ It->second.Initializer =
----------------
Can drop braces
================
Comment at: llvm/lib/Transforms/IPO/GlobalOpt.cpp:549
+ continue;
+ }
GlobalVariable *NGV = new GlobalVariable(
----------------
Hm, if this happens, won't we leave behind references to a removed global? I think we need to make sure all initializers are known upfront, e.g. in the above offset checking loop.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D145490/new/
https://reviews.llvm.org/D145490
More information about the llvm-commits
mailing list