[llvm] [AMDGPU] Add IR LiveReg type-based optimization (PR #66838)

Jeffrey Byrnes via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 11 14:45:45 PDT 2024


jrbyrnes wrote:

In the latest, I've refactored the main algorithm s.t. the design/style is more consistent with https://github.com/llvm/llvm-project/blob/3684a38d33d7643fe8c3a870006efa8677ac37f8/llvm/lib/CodeGen/CodeGenPrepare.cpp#L6380

That said, the linked algorithm is only used to coerce types for certain Phi nodes, whereas this feature coerces types for all problematic values (Phi Node or not) so the algorithm needed adjustments. Moreover, this feature needs to calculate the type to convert to, so some of the code from the older version survived (e.g. converTo/FromOptType). Nevertheless, the new implementation seems more standard and simple, so I thought it should supersede the old version (rather than creating a competing PR). 

The force-push was to fix the lit changes

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


More information about the llvm-commits mailing list