[PATCH] D89590: [NPM][SimplifyCFGPass] For OptForFuzzing attribute, disable SimplifyCondBranch and FoldTwoEntryPHINode in NPM

Zequan Wu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 21 17:14:52 PDT 2020


zequanwu added inline comments.


================
Comment at: llvm/lib/Transforms/Scalar/SimplifyCFGPass.cpp:248-251
+  if (F.hasFnAttribute(Attribute::OptForFuzzing))
+    Options.setSimplifyCondBranch(false).setFoldTwoEntryPHINode(false);
+  else
+    Options.setSimplifyCondBranch(true).setFoldTwoEntryPHINode(true);
----------------
aeubanks wrote:
> zequanwu wrote:
> > aeubanks wrote:
> > > the changes in this file shouldn't be necessary any more
> > Then this is pretty much the same as reverting the original commit. And Line 280-286 wouldn't be necessary either (LPM pass).
> This would allow turning off SimplifyCondBranch and FoldTwoEntryPHINode, but otherwise yes. Maybe we should just revert with arsenm's approval.
I add a revert patch here: D89917


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D89590/new/

https://reviews.llvm.org/D89590



More information about the llvm-commits mailing list