[PATCH] D128128: [GlobalOpt] Perform store->dominated load forwarding for stored once globals
Nikita Popov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 21 12:05:58 PDT 2022
nikic added inline comments.
================
Comment at: llvm/lib/Transforms/IPO/GlobalOpt.cpp:1458
+ // global.
+ if (!isa<Constant>(StoredOnceValue) && !F->hasNoSync())
+ return false;
----------------
Possible complication here might be storing the address of a thread-local, which is Constant but not necessarily the same between two invocations. (Though that would be solved by https://reviews.llvm.org/D125291.)
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D128128/new/
https://reviews.llvm.org/D128128
More information about the llvm-commits
mailing list