[all-commits] [llvm/llvm-project] e422c0: [GlobalOpt] Perform store->dominated load forwardi...
aeubanks via All-commits
all-commits at lists.llvm.org
Fri Jun 24 09:09:48 PDT 2022
Author: Arthur Eubanks <aeubanks at google.com>
Date: 2022-06-24 (Fri, 24 Jun 2022)
[GlobalOpt] Perform store->dominated load forwarding for stored once globals
The initial land incorrectly optimized forwarding non-Constants in non-nosync/norecurse functions. Bail on non-Constants since norecurse should cause global -> alloca promotion anyway.
The initial land also incorrectly assumed that StoredOnceStore was the only store to the global, but it actually means that only one value other than the global initializer is stored. Add a check that there's only one store.
Compile time tracker:
Reviewed By: nikic, asbirlea, jdoerfert
Differential Revision: https://reviews.llvm.org/D128128
More information about the All-commits