Skip to content

Commit e4fb24f

Browse files
committed
Check instruction by MCInstrDesc::getSchedClass() == 0 and add testcase
1 parent 6a420eb commit e4fb24f

File tree

4 files changed

+5
-10
lines changed

4 files changed

+5
-10
lines changed

llvm/include/llvm/MC/MCInstrDesc.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,6 @@ enum Flag {
188188
Trap,
189189
VariadicOpsAreDefs,
190190
Authenticated,
191-
HasNoSchedulingInfo,
192191
};
193192
} // namespace MCID
194193

@@ -431,11 +430,6 @@ class MCInstrDesc {
431430
return Flags & (1ULL << MCID::Authenticated);
432431
}
433432

434-
/// Return true if this instruction has no scheduling info.
435-
bool hasNoSchedulingInfo() const {
436-
return Flags & (1ULL << MCID::HasNoSchedulingInfo);
437-
}
438-
439433
//===--------------------------------------------------------------------===//
440434
// Side Effect Analysis
441435
//===--------------------------------------------------------------------===//
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# RUN: llvm-exegesis -mtriple=riscv64-unknown-linux-gnu -mcpu=generic --benchmark-phase=assemble-measured-code -mode=inverse_throughput -opcode-name=InsnB 2>&1 | FileCheck %s
2+
3+
CHECK: Unsupported opcode: No Sched Class

llvm/tools/llvm-exegesis/lib/Target.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ ExegesisTarget::getIgnoredOpcodeReasonOrNull(const LLVMState &State,
4545
return "Unsupported opcode: isBranch/isIndirectBranch";
4646
if (InstrDesc.isCall() || InstrDesc.isReturn())
4747
return "Unsupported opcode: isCall/isReturn";
48-
if (InstrDesc.hasNoSchedulingInfo())
49-
return "Unsupported opcode: hasNoSchedulingInfo";
48+
if (InstrDesc.getSchedClass() == 0)
49+
return "Unsupported opcode: No Sched Class";
5050
return nullptr;
5151
}
5252

llvm/utils/TableGen/InstrInfoEmitter.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1199,8 +1199,6 @@ void InstrInfoEmitter::emitRecord(
11991199
OS << "|(1ULL<<MCID::VariadicOpsAreDefs)";
12001200
if (Inst.isAuthenticated)
12011201
OS << "|(1ULL<<MCID::Authenticated)";
1202-
if (Inst.hasNoSchedulingInfo)
1203-
OS << "|(1ULL<<MCID::HasNoSchedulingInfo)";
12041202

12051203
// Emit all of the target-specific flags...
12061204
const BitsInit *TSF = Inst.TheDef->getValueAsBitsInit("TSFlags");

0 commit comments

Comments
 (0)