From: Florian Hahn Date: Thu, 23 Apr 2020 19:37:26 +0000 (+0100) Subject: [DSE,MSSA] Skip checking write clobber for DomAccess (NFC). X-Git-Tag: llvmorg-12-init~7925 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=44ce588670d093ba4385403d007ffbf4a195d9a7;p=platform%2Fupstream%2Fllvm.git [DSE,MSSA] Skip checking write clobber for DomAccess (NFC). There is no need to check if the starting access for is a write clobber and all of its uses have already been checked. --- diff --git a/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp b/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp index 2939a87..68ef90b 100644 --- a/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp +++ b/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp @@ -1707,11 +1707,11 @@ struct DSEState { return None; } - // For the KillingDef we only have to check if it reads the memory - // location. + // For the KillingDef and DomAccess we only have to check if it reads the + // memory location. // TODO: It would probably be better to check for self-reads before // calling the function. - if (KillingDef == UseAccess) + if (KillingDef == UseAccess || DomAccess == UseAccess) continue; // Check all uses for MemoryDefs, except for defs completely overwriting