Skip to content

Commit 7af6d4c

Browse files
committed
Attempt to add inline asm to sched group barriers
1 parent 03cb514 commit 7af6d4c

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

llvm/lib/Target/AMDGPU/AMDGPUIGroupLP.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,9 @@ enum class SchedGroupMask {
7575
DS_READ = 1u << 8,
7676
DS_WRITE = 1u << 9,
7777
TRANS = 1u << 10,
78+
INLINE_ASM = 1u << 11,
7879
ALL = ALU | VALU | SALU | MFMA | VMEM | VMEM_READ | VMEM_WRITE | DS |
79-
DS_READ | DS_WRITE | TRANS,
80+
DS_READ | DS_WRITE | TRANS | INLINE_ASM,
8081
LLVM_MARK_AS_BITMASK_ENUM(/* LargestFlag = */ ALL)
8182
};
8283

@@ -2436,6 +2437,10 @@ bool SchedGroup::canAddMI(const MachineInstr &MI) const {
24362437
TII->isTRANS(MI))
24372438
Result = true;
24382439

2440+
else if (((SGMask & SchedGroupMask::INLINE_ASM) != SchedGroupMask::NONE) &&
2441+
MI.isInlineAsm())
2442+
Result = true;
2443+
24392444
LLVM_DEBUG(
24402445
dbgs() << "For SchedGroup with mask " << format_hex((int)SGMask, 10, true)
24412446
<< (Result ? " could classify " : " unable to classify ") << MI);

0 commit comments

Comments
 (0)