================
@@ -742,6 +754,15 @@ class MachineBasicBlock
     IsInlineAsmBrIndirectTarget = V;
   }
 
+  /// Returns true if this block directly contains an INLINEASM or
+  /// INLINEASM_BR instruction, as of the last time it was computed. See the
+  /// HasInlineAsm field comment for the staleness caveat.
+  bool hasInlineAsm() const { return HasInlineAsm; }
+
+  /// Indicates if this block directly contains an INLINEASM or INLINEASM_BR
+  /// instruction.
+  void setHasInlineAsm(bool V = true) { HasInlineAsm = V; }
----------------
isanbard wrote:

*From Claude, adding to my comment:*

The flag can only ever be stale in the "false when it should be true" direction 
(it starts false, only ever gets set true, never cleared), and it's consumed 
only as a performance short-circuit, not a correctness gate — RegAllocFast's 
normal per-instruction path still handles any `INLINEASM` it actually 
encounters regardless of the block flag. So the worst case from drift is a 
missed fold opportunity, never a miscompile.

https://github.com/llvm/llvm-project/pull/214061
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to