projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
25597f7
)
[DSE,MemorySSA] Skip defs without analyzable write locations.
author
Florian Hahn
<flo@fhahn.com>
Sun, 30 Aug 2020 20:53:31 +0000
(21:53 +0100)
committer
Florian Hahn
<flo@fhahn.com>
Sun, 30 Aug 2020 20:56:25 +0000
(21:56 +0100)
Similar to other checks above, if there is no write location for a def,
it cannot be considered for elimination and can be skipped.
llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
patch
|
blob
|
history
diff --git
a/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
b/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
index
b261369
..
7e4ef1e
100644
(file)
--- a/
llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
+++ b/
llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
@@
-1896,9
+1896,13
@@
struct DSEState {
continue;
}
+ // If Current does not have an analyzable write location, skip it
auto CurrentLoc = getLocForWriteEx(CurrentI);
- if (!CurrentLoc)
- break;
+ if (!CurrentLoc) {
+ StepAgain = true;
+ Current = CurrentDef->getDefiningAccess();
+ continue;
+ }
if (IsMemTerm) {
// If the killing def is a memory terminator (e.g. lifetime.end), check