[all-commits] [llvm/llvm-project] 24a49e: [NewGVN] FIx phi-of-ops in the presence of memory ...
Nuno Lopes via All-commits
all-commits at lists.llvm.org
Wed Jan 26 02:19:35 PST 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 24a49e99f386432fc6fa46faf6e2ba91cfaed2df
https://github.com/llvm/llvm-project/commit/24a49e99f386432fc6fa46faf6e2ba91cfaed2df
Author: Nuno Lopes <nuno.lopes at tecnico.ulisboa.pt>
Date: 2022-01-26 (Wed, 26 Jan 2022)
Changed paths:
M llvm/lib/Transforms/Scalar/NewGVN.cpp
M llvm/test/Transforms/NewGVN/phi-of-ops-loads.ll
M llvm/test/Transforms/NewGVN/storeoverstore.ll
Log Message:
-----------
[NewGVN] FIx phi-of-ops in the presence of memory read operations
The phi-of-ops functionality has a function OpIsSafeForPHIOfOps
to determine when it's safe to create the new phi.
But this function only checks for the obvious dominator conditions
and ignores memory.
This patch takes the conservative approach and disables phi-of-ops
whenever there's a load that doesn't dominate the phi, as its
value may be affected by a store inside the loop.
This can be improved later to check aliasing between the
load/stores.
Fixes https://llvm.org/PR53277
Reviewed By: asbirlea
Differential Revision: https://reviews.llvm.org/D117999
More information about the All-commits
mailing list