[PATCH] D103456: [NFC] Fix 'Load' name masking.
Daniil Fukalov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 1 06:09:23 PDT 2021
dfukalov created this revision.
dfukalov added a reviewer: mkazantsev.
Herald added a subscriber: hiraditya.
dfukalov requested review of this revision.
Herald added a project: LLVM.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D103456
Files:
llvm/lib/Transforms/Scalar/GVN.cpp
Index: llvm/lib/Transforms/Scalar/GVN.cpp
===================================================================
--- llvm/lib/Transforms/Scalar/GVN.cpp
+++ llvm/lib/Transforms/Scalar/GVN.cpp
@@ -894,17 +894,17 @@
<< "\n\n\n");
}
} else if (isCoercedLoadValue()) {
- LoadInst *Load = getCoercedLoadValue();
- if (Load->getType() == LoadTy && Offset == 0) {
- Res = Load;
+ LoadInst *CoercedLoad = getCoercedLoadValue();
+ if (CoercedLoad->getType() == LoadTy && Offset == 0) {
+ Res = CoercedLoad;
} else {
- Res = getLoadValueForLoad(Load, Offset, LoadTy, InsertPt, DL);
+ Res = getLoadValueForLoad(CoercedLoad, Offset, LoadTy, InsertPt, DL);
// We would like to use gvn.markInstructionForDeletion here, but we can't
// because the load is already memoized into the leader map table that GVN
// tracks. It is potentially possible to remove the load from the table,
// but then there all of the operations based on it would need to be
// rehashed. Just leave the dead load around.
- gvn.getMemDep().removeInstruction(Load);
+ gvn.getMemDep().removeInstruction(CoercedLoad);
LLVM_DEBUG(dbgs() << "GVN COERCED NONLOCAL LOAD:\nOffset: " << Offset
<< " " << *getCoercedLoadValue() << '\n'
<< *Res << '\n'
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D103456.348956.patch
Type: text/x-patch
Size: 1372 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210601/ff45edf3/attachment.bin>
More information about the llvm-commits
mailing list