[clang] [mlir] [mlir][acc] Use consistent name for device_num operand (PR #136745)

Erich Keane via cfe-commits cfe-commits at lists.llvm.org
Tue Apr 22 14:49:03 PDT 2025


erichkeane wrote:

> > Also, we have `getIfCondMutable` in a number of places as well, which is now inconsistent with skipping the 'operand'.
> 
> I am not sure I follow - are you saying that for consistency, you think that the word 'operand' should be included in the name of `ifCond` (or excluded for other cases)? We do have multiple cases where we do not use the word 'operand' - for example in acc.parallel we have numGangs, numWorkers, vectorLength, selfCond, ifCond. It is used in cases where it looks awkward to not have it. For example `asyncOperands` and `waitOperands`. This is subjective though :)

I guess I would like us to be consistent between all of them?  I consider `ifCond` and `deviceNumOperand` to be equivalent, and `if` and `deviceNum` to be equivalent.  

I admit it is quite subjective, and I'm happy as long as the name of the 'same thing' is the same between constructs, but I would expect them to either consistently name that it is the argument to the clause, or the clause itself.

https://github.com/llvm/llvm-project/pull/136745


More information about the cfe-commits mailing list