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

Roman Lebedev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 20 11:56:57 PDT 2020


lebedev.ri resigned from this revision.
lebedev.ri added a comment.

In D89590#2335917 <https://reviews.llvm.org/D89590#2335917>, @aeubanks wrote:

> In D89590#2335885 <https://reviews.llvm.org/D89590#2335885>, @lebedev.ri wrote:
>
>> In D89590#2335864 <https://reviews.llvm.org/D89590#2335864>, @aeubanks wrote:
>>
>>> In D89590#2335840 <https://reviews.llvm.org/D89590#2335840>, @lebedev.ri wrote:
>>>
>>>> Why is this NPM specific?
>>>
>>> This is something the legacy pass did but was not properly ported to the NPM pass.
>>
>> Right. But why is this PM-specific at all, why aren't the folds themselves guarded with that?
>
> Oh I see, maybe we don't even need `SimplifyCondBranch` and `FoldTwoEntryPHINode` in `SimplifyCFGOptions`, just check for the `OptForFuzzing` attribute at time of use.

I think the transforms themselves should be explicitly guarded with `!F.hasFnAttribute(Attribute::OptForFuzzing)`,
but i don't feel strongly about it..


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