[PATCH] D155940: [SimplifyCFG] Transform for redirecting phis between unmergeable BB and SuccBB

Hongyu Chen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 4 00:22:24 PDT 2023


XChy added a comment.

In D155940#4636482 <https://reviews.llvm.org/D155940#4636482>, @DianQK wrote:

> I read the history of jump-table-islands.ll.
> This test checks for oversized jump tables jumping over each other.
> You transform changes from
>
>   end:                                              ; preds = %complex, %simple
>     %val = phi i8500 [ %l, %complex ], [ -1, %simple ]
>     br label %common.ret
>
> to
>
>   end:                                              ; preds = %complex
>     br label %common.ret
>
> The test was to check disappears.
> Increasing `BigInt` makes no sense.
> Sorry I don't know how to create a friendly diff display.
> You could  remove `-arm-atomic-cfg-tidy=0` and change the `end` bb to:
>
>   end:
>     %val = phi %BigInt [ %l, %complex ], [ -1, %simple ]
>     %val2 = add %BigInt %val, 1
>     ret %BigInt %val2
>   }
>
> https://reviews.llvm.org/differential/diff/555646/
>
> I feel the `SKIP_TABLE` name is confusing and should be changed to `CONTINUE_TABLE`/`ISLAND_JUMP`?

Thanks for your information and suggestions. It's OK to apply IR below to avoid related transform:

  declare void @use(%BigInt)
  ......
  end:
    %val = phi %BigInt [ %l, %complex ], [ -1, %simple ]
    call void @use(%BigInt %val)
    ret %BigInt %val

If possible, however, it would be better if there is any other available option that does not modify the original IR.


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

https://reviews.llvm.org/D155940



More information about the llvm-commits mailing list