[PATCH] D140883: [AMDGPU] Simplify getNumFlatOffsetBits. NFC.
    Jay Foad via Phabricator via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Tue Jan  3 06:07:31 PST 2023
    
    
  
foad added a comment.
> Is this actually an improvement?
I think so (of course!) because it simplifies getNumFlatOffsetBits without making its callers more complicated.
> Wouldn't it be conceptually simpler to pass FlatVariant and get the actual width and, if needed, signedness?
Not sure what you mean by "actual width" here. I would not want to revert to getNumFlatOffsetBits returning different values for different flat variants on the same subtarget. But I suppose an additional patch to make getNumFlatOffsetBits return the "AllowNegative" flag as well as the field width might be an improvement.
Repository:
  rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D140883/new/
https://reviews.llvm.org/D140883
    
    
More information about the llvm-commits
mailing list