[llvm] [AMDGPU] Account for inline asm size in inst_pref_size calculation (PR #192306)
Jay Foad via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 23 02:03:53 PDT 2026
================
@@ -218,6 +191,22 @@ bool AMDGPUMCExpr::evaluateOccupancy(MCValue &Res,
return true;
}
+bool AMDGPUMCExpr::evaluateInstPrefSize(MCValue &Res,
+ const MCAssembler *Asm) const {
+ assert(Args.size() == 3 &&
+ "AMDGPUMCExpr Argument count incorrect for InstPrefSize");
+
+ SmallVector<uint64_t, 3> Vals;
+ if (!evaluateMCExprs(Args, Asm, Vals))
+ return false;
+ uint64_t CodeSizeInBytes = Vals[0], FieldWidth = Vals[1],
+ CacheLineSize = Vals[2];
----------------
jayfoad wrote:
I don't understand why FieldWidth and CacheLineSize come in via Args. Aren't they just known constants that we can get frmo the Subtarget here?
https://github.com/llvm/llvm-project/pull/192306
More information about the llvm-commits
mailing list