<div dir="ltr"><div>I'm trying to create a simplified 2 slot VLIW from an OR1K. The codebase I'm working with is <a href="https://github.com/openrisc/llvm-or1k">here</a>. I've created an initial MyTargetSchedule.td</div><div><br></div><div><div>def MyTargetModel : SchedMachineModel {</div><div> // HW can decode 2 instructions per cycle.</div><div> let IssueWidth = 2;</div><div> let LoadLatency = 4;</div><div> let MispredictPenalty = 16;</div><div><br></div><div> // This flag is set to allow the scheduler to assign a default model to</div><div> // unrecognized opcodes.</div><div> let CompleteModel = 0;</div><div>}</div><div><br></div><div>def WriteALU : SchedWrite;</div><div>def WriteBranch : SchedWrite;</div><div><br></div><div>let SchedModel = MyTargetModel in {</div><div>// SLOT0 can handles everything</div><div>def Slot0 : ProcResource<1>;</div><div>// SLOT1 can't handles branches</div><div>def Slot1 : ProcResource<1>;</div><div><br></div><div>// Many micro-ops are capable of issuing on multiple ports.</div><div>def SlotAny : ProcResGroup<[Slot0, Slot1]>;</div><div><br></div><div>def : WriteRes<WriteALU, [SlotAny]> {</div><div> let Latency = 1;</div><div> let ResourceCycles =[1];</div><div>}</div><div><br></div><div>def : WriteRes<WriteBranch, [Slot0]> {</div><div> let Latency = 1;</div><div> let ResourceCycles =[1];</div><div>}</div><div>}</div></div><div><br></div><div>I've also changed OR1K.td to have </div><div><br></div><div><div>def : ProcessorModel<"generic", MyTargetModel, [FeatureDiv, FeatureMul]>;</div><div>def : ProcessorModel<"or1200", MyTargetModel, [FeatureDiv, FeatureMul]>;</div></div><div><br></div><div><br></div><div>No issues compiling the code. But when I run the following command I get and assertion:</div><div> </div><div>llc -mcpu=mytarget hello_world.compiled.ll -debug-only=misched -mtriple=mytarget-unknown-linux-gnu<br></div><div><br></div><div><a href="https://github.com/openrisc/llvm-or1k/blob/master/lib/MC/SubtargetFeature.cpp#L268">This </a>is the offending line. </div><div><br></div><div>I'd really appreciate if someone could point out the problem.</div><div><br></div><div>Thanks,</div><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div>Rail Shafigulin</div></div></div></div></div>
</div>