[llvm] [AMDGPU] Add option to prevent insns straddling half cache-line boundaries (PR #150239)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 23 08:49:08 PDT 2025


================
@@ -274,12 +274,72 @@ static void emitVGPRBlockComment(const MachineInstr *MI, const SIInstrInfo *TII,
   OS.emitRawComment(" transferring at most " + TransferredRegs);
 }
 
+extern cl::opt<bool> PreventHalfCacheLineStraddling;
+
+static unsigned getMCInstSizeInBytes(const MCInst &LoweredMCI,
----------------
arsenm wrote:

We should not be creating a temporary MCCodeEmitter to get the size of a single instruction; this was previously under EXPENSIVE_CHECKS for a reason 

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


More information about the llvm-commits mailing list