[llvm] [AMDGPU] Add AMDGPU specific variadic operation MCExprs (PR #82022)

Janek van Oirschot via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 26 07:17:01 PST 2024


JanekvO wrote:

> Do we want these low level expressions, or do we want something that just combines the aggregate function resources?

Yes, these are for combining the aggregate function resources. I'm also working on a patch dependent on this one for `AMDGPUAsmPrinter::getSIProgramInfo` to create aggregate MCExprs from AMDGPUResourceUsageAnalysis (i.e., places in said function where max operation is used on any of the (derived) results from AMDGPUResourceUsageAnalysis).

One of the reasons I'm using this approach is that constructing expressions is not dependent on the evaluability of sub-expressions (i.e., creating `max(foo, bar)` is fine and will be able to resolve for the object file through fixups regardless of order of occurrences for `foo` and `bar`).

Do let me know if there's an alternate approach I've missed.

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


More information about the llvm-commits mailing list