[PATCH] D119854: [SimplifyCFG][PhaseOrdering] Defer lowering switch into an integer range comparison and branch until after at least the IPSCCP
weiwei via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 16 04:25:54 PST 2022
wwei added a comment.
In D119854#3325867 <https://reviews.llvm.org/D119854#3325867>, @lebedev.ri wrote:
> In D119854#3325866 <https://reviews.llvm.org/D119854#3325866>, @wwei wrote:
>
>> @lebedev.ri Thanks for the patch. Does `convertSwitchRangeToICmp` need to be set true for O1 <https://reviews.llvm.org/owners/package/1/> pipeline? Why not keep the same with other SimplifyCFGOptions for O1 <https://reviews.llvm.org/owners/package/1/>?
>
> I'm not sure i understand the question.
>
> This change disables the transform unless it's explicitly reenabled,
> then explicitly reenables it for all the simplifycfg pass invocations in all pipelines,
> and then un-enables it for those simplifycfg invocations that happen before IPSCCP.
> Function simplification pipeline is after IPSCCP, so naturally the transform is enabled there.
In `buildO1FunctionSimplificationPipeline`, adding `SimplifyCFGOptions().convertSwitchRangeToICmp(true)` for all CreateCFGSimplificationPass, I just wonder if this is necessary, since the performance for O1 <https://reviews.llvm.org/owners/package/1/> is not that important
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D119854/new/
https://reviews.llvm.org/D119854
More information about the llvm-commits
mailing list