[llvm] MCExpr-ify SIProgramInfo (PR #88257)

Janek van Oirschot via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 16 08:14:25 PDT 2024


================
@@ -134,6 +135,12 @@ void AMDGPUAsmPrinter::initTargetStreamer(Module &M) {
     getTargetStreamer()->getPALMetadata()->readFromIR(M);
 }
 
+uint64_t AMDGPUAsmPrinter::getMCExprValue(const MCExpr *Value) {
+  int64_t Val;
+  Value->evaluateAsAbsolute(Val);
----------------
JanekvO wrote:

As with the other MCExpr value retrieval helper in this PR: now errors if it cannot resolve; aim to remove this helper when consumers of `SIProgramInfo` allow MCExprs directly.

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


More information about the llvm-commits mailing list