[llvm] [NFC] [DSE] Refactor DSE (PR #100956)
Jan Voung via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 16 08:06:40 PDT 2024
================
@@ -1325,17 +1366,15 @@ struct DSEState {
// (completely) overwrite \p KillingLoc. Currently we bail out when we
// encounter an aliasing MemoryUse (read).
std::optional<MemoryAccess *>
- getDomMemoryDef(MemoryDef *KillingDef, MemoryAccess *StartAccess,
- const MemoryLocation &KillingLoc, const Value *KillingUndObj,
+ getDomMemoryDef(MemoryLocationWrapper &KillingLoc, MemoryAccess *StartAccess,
unsigned &ScanLimit, unsigned &WalkerStepLimit,
- bool IsMemTerm, unsigned &PartialLimit) {
+ unsigned &PartialLimit) {
if (ScanLimit == 0 || WalkerStepLimit == 0) {
LLVM_DEBUG(dbgs() << "\n ... hit scan limit\n");
return std::nullopt;
}
MemoryAccess *Current = StartAccess;
- Instruction *KillingI = KillingDef->getMemoryInst();
LLVM_DEBUG(dbgs() << " trying to get dominating access\n");
// Only optimize defining access of KillingDef when directly starting at its
----------------
jvoung wrote:
Can you update the comment about `KillingDef`? There's no longer that variable and it's wrapped in KillingLoc (or make a local var KillingDef = KillingLoc.MemDef, or ...?)
https://github.com/llvm/llvm-project/pull/100956
More information about the llvm-commits
mailing list