[PATCH] D87691: [EarlyCSE] Small refactoring changes, NFC
Eli Friedman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 17 21:22:04 PDT 2020
efriedma added a comment.
Mostly looks fine; couple minor suggestions.
================
Comment at: llvm/lib/Transforms/Scalar/EarlyCSE.cpp:983
+ if (MemInst.isLoad() && !InVal.IsAtomic && MemInst.isAtomic())
+ return nullptr;
+ Instruction *Earlier = InValFirst ? InVal.DefInst : MemInst.get();
----------------
Is `InValFirst` the same thing as `!MemInst.isLoad()`? Is there some useful semantic difference I'm missing?
================
Comment at: llvm/lib/Transforms/Scalar/EarlyCSE.cpp:1294
LoadValue InVal = AvailableLoads.lookup(MemInst.getPointerOperand());
if (InVal.DefInst &&
+ InVal.DefInst == getMatchingValue(InVal, MemInst, CurrentGeneration,
----------------
Unnecessary `InVal.DefInst &&`?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D87691/new/
https://reviews.llvm.org/D87691
More information about the llvm-commits
mailing list