[all-commits] [llvm/llvm-project] 633e09: [DSE] Allow ptrs defined in the entry block in IsG...
Matteo F. via All-commits
all-commits at lists.llvm.org
Tue Feb 23 04:01:19 PST 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 633e090528dbc9b6dd380771046af8463bbb5fe1
https://github.com/llvm/llvm-project/commit/633e090528dbc9b6dd380771046af8463bbb5fe1
Author: Matteo Favaro <fvrmatteo at gmail.com>
Date: 2021-02-23 (Tue, 23 Feb 2021)
Changed paths:
M llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
A llvm/test/Transforms/DeadStoreElimination/MSSA/loop-invariant-entry-block.ll
Log Message:
-----------
[DSE] Allow ptrs defined in the entry block in IsGuaranteedLoopInvariant.
The **IsGuaranteedLoopInvariant** function is making sure to check if the
incoming pointer is guaranteed to be loop invariant, therefore I think
the case where the pointer is defined in the entry block of a function
automatically guarantees the pointer to be loop invariant, as the entry
block of a function cannot have predecessors or be part of a loop.
I implemented this small patch and tested it using
**ninja check-llvm-unit** and **ninja check-llvm**. I added a contained test
file that shows the problem and used **opt -O3 -debug** on it to make sure
the case is not currently handled (in fact the debug log is showing that
the DSE pass is bailing out when testing if the killer store is able to
clobber the dead store).
Reviewed By: fhahn
Differential Revision: https://reviews.llvm.org/D96979
More information about the All-commits
mailing list