[PATCH] D72732: [GVN] introduce GVNOptions to control GVN pass behavior
Fedor Sergeev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 15 14:08:51 PST 2020
fedor.sergeev marked 3 inline comments as done.
fedor.sergeev added inline comments.
================
Comment at: llvm/lib/Transforms/Scalar/GVN.cpp:2725
AU.addRequired<LoopInfoWrapperPass>();
if (!NoMemDepAnalysis)
AU.addRequired<MemoryDependenceWrapperPass>();
----------------
fhahn wrote:
> This could use Impl. isMemDepEnabled as well, right? Then we could get rid of the NoMemDepAnalysis variable.
thanks for catching this!
================
Comment at: llvm/lib/Transforms/Scalar/GVN.cpp:2696
- explicit GVNLegacyPass(bool NoMemDepAnalysis = !EnableMemDep)
- : FunctionPass(ID), NoMemDepAnalysis(NoMemDepAnalysis) {
+ explicit GVNLegacyPass(bool NoMemDepAnalysis)
+ : FunctionPass(ID),
----------------
Also removed default value as it is not used anyway and just gives a wrong feeling that global control affects something here.
In fact it was not (and I just kept pre-existing behavior).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D72732/new/
https://reviews.llvm.org/D72732
More information about the llvm-commits
mailing list