llvm.org GIT mirror llvm / a2f0069
[TableGen] Include schedule model name in diagnostic. If you have more than one schedule model in your TableGen target definitions, then the diagnostic "No schedule information for instruction 'foo'" is rather unhelpful, because it doesn't tell you _which_ schedule model is missing the necessary information (or, as it might be, missing the UnsupportedFeatures definition that would stop it thinking it needed it). Extended the message to include the name of the schedule model that it's complaining about. Reviewers: nhaehnle, hfinkel, javedabsar, efriedma, javed.absar Reviewed By: javed.absar Subscribers: javed.absar, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D60559 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@358389 91177308-0d34-0410-b5e6-96231b3b80d8 Simon Tatham 6 months ago
2 changed file(s) with 20 addition(s) and 1 deletion(s). Raw diff Collapse all Expand all
0 // RUN: not llvm-tblgen -gen-subtarget -I %p/../../include %s 2>&1 | FileCheck %s -DFILE=%s
1
2 include "llvm/Target/Target.td"
3
4 def TestTarget : Target;
5
6 // CHECK: [[FILE]]:[[@LINE+1]]:1: error: No schedule information for instruction 'TestInst' in SchedMachineModel 'TestSchedModel'
7 def TestInst : Instruction {
8 let OutOperandList = (outs);
9 let InOperandList = (ins);
10 bits<8> Inst = 0b00101010;
11 }
12
13 def TestSchedModel : SchedMachineModel {
14 let CompleteModel = 1;
15 }
16
17 def TestProcessor : ProcessorModel<"testprocessor", TestSchedModel, []>;
19341934 if (Inst->TheDef->isValueUnset("SchedRW") && !HadCompleteModel) {
19351935 PrintError(Inst->TheDef->getLoc(),
19361936 "No schedule information for instruction '" +
1937 Inst->TheDef->getName() + "'");
1937 Inst->TheDef->getName() + "' in SchedMachineModel '" +
1938 ProcModel.ModelDef->getName() + "'");
19381939 Complete = false;
19391940 }
19401941 continue;