hsmhsm added a comment.

In D110257#3133838 <https://reviews.llvm.org/D110257#3133838>, @JonChesterfield 
wrote:

> Please change the commit message to say why this change is necessary / an 
> improvement on what we have now.
>
> My recollection is that the amdgpu backend crashes on some IR and this 
> decreases the probability of that IR pattern occuring, which still sounds 
> like fixing the wrong place to me. Was this the one where hoisting static 
> size alloca into the entry block near the backend would the problem?
>
> I think this patch is missing a documentation update adding the new 
> constraint that allocas must be contiguous in IR. That would help to answer 
> questions about which alloca must be contiguous and which can occur separated 
> by instructions, as currently none of them need to be adjacent. Also, is this 
> only intended to constrain the entry basic block?

The current commit message reflect semantics of the patch - there is nothing 
required to change here. The goal here is to make sure that FE keeps all the 
static allocas as one cluster at the start of the entry block, which is a good 
canonical form from the perspective of better code transformation/optimization.

This is not something specific to AMDGPU backend, but  AMDGPU backend at 
present requires this canonical form.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D110257

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to