[PATCH] D116819: [AMDGPU] Disable optimizeEndCf at -O0

Christudasan Devadasan via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 10 11:21:18 PST 2022


cdevadas added a comment.

In D116819#3232302 <https://reviews.llvm.org/D116819#3232302>, @rampitec wrote:

> In D116819#3231986 <https://reviews.llvm.org/D116819#3231986>, @arsenm wrote:
>
>> I think this is an extreme interpretation of optnone. This is a minor optimization which happens as part of lowering. The fact we do this as a separate step is just an artifact of how we happen to lower control flow. It's not strictly true that no optimizations occur at -O0, especially if they are cheap and provide benefit
>
> I assume it is good to have a way to disable it with -O0 just for bug bisecting.

I agree with Stas. This optimization should be skipped for -O0. We can avoid the optnone check if it doesn't fit this context. The existing optLevel check in the patch would do then.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D116819



More information about the llvm-commits mailing list