[PATCH] D84391: [AMDGPU] Fix incorrect arch assert while setting up FlatScratchInit

Madhur Amilkanthwar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 23 08:40:53 PDT 2020


madhur13490 added a comment.

In D84391#2169493 <https://reviews.llvm.org/D84391#2169493>, @arsenm wrote:

> In D84391#2169473 <https://reviews.llvm.org/D84391#2169473>, @madhur13490 wrote:
>
> >
>
>
>
>
> > I am not sure what does that mean. Do you agree with my way of refactoring or you're suggesting something else? With my approach there won't be any checks as I said we can get rid of `flatScratchIsPointer()` too.
>
> I mean exactly the opposite. We should not check the generation anywhere. The hardware does not make changes in a nice, disciplined, sequenced way. Everything should be based on specific feature checks. I.e. there should only be flatScratchIsPointer checks, and nothing checking getGeneration


I think we have to check `getGeneration` at some point because meaning of `FlatScratchInit` is different for every arch (so the codegen). I don't think `flatScratchIsPointer()` is enough for that. BTW I'd like to handle refactoring in a separate patch. We should let this land with a test.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D84391





More information about the llvm-commits mailing list