[llvm] Try To Guess SGMasks for Inline Asm Instructions (PR #155491)
Patrick Simmons via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 22 13:18:31 PST 2025
================
@@ -2391,6 +2391,56 @@ bool SchedGroup::canAddMI(const MachineInstr &MI) const {
if (MI.isMetaInstruction())
Result = false;
+ else if (MI.isInlineAsm()) {
+ const SIRegisterInfo &TRI = TII->getRegisterInfo();
+ auto &MRI = MI.getParent()->getParent()->getRegInfo();
+ bool SGPR_used = false, VGPR_used = false, VMFMA_used = false,
+ VReg32_used = false, MayLoad = MI.mayLoad(), MayStore = MI.mayStore();
+ for (const MachineOperand &Operand : MI.operands())
+ if (Operand.isReg()) {
+ auto &RegClass = *TRI.getRegClassForOperandReg(MRI, Operand);
----------------
linuxrocks123 wrote:
Removed use of auto, but kept it a reference since don't see a rationale for changing the reference to a pointer.
https://github.com/llvm/llvm-project/pull/155491
More information about the llvm-commits
mailing list