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

Arthur Eubanks via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 20 16:55:01 PDT 2020


aeubanks added a comment.

In D89590#2343196 <https://reviews.llvm.org/D89590#2343196>, @zequanwu wrote:

> In D89590#2342497 <https://reviews.llvm.org/D89590#2342497>, @aeubanks wrote:
>
>> I'd say either revert https://github.com/llvm/llvm-project/commit/cdd006eec9409923f9a56b9026ce2cb72e7b71dc, or in `FoldTwoEntryPHINode()` check that the option is set and that the OptForFuzzing attribute is not set (same with `simplifyCondBranch()`). I guess I'd slightly prefer the second option as to not totally revert the original commit.
>
> Why do we want to check the option and not `OptForFuzzing`? Doesn't they have the same truth value?

As of right now, yes, but the point of https://github.com/llvm/llvm-project/commit/cdd006eec9409923f9a56b9026ce2cb72e7b71dc was that in the future, some consumer of `simplifyCFG()` may want to set those options. I'm not against a complete revert of that change, but it does sort of make sense.


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