[llvm-dev] DFAPacketizer assert failure

Rail Shafigulin via llvm-dev llvm-dev at lists.llvm.org
Mon Nov 16 11:14:25 PST 2015

For some reason on my VLIW target DFAPacketizer fails at

assert(CachedTable.count(StateTrans) != 0);

in the following function:

// reserveResources - Reserve the resources occupied by a MCInstrDesc and
// change the current state to reflect that change.
void DFAPacketizer::reserveResources(const llvm::MCInstrDesc *MID) {
  unsigned InsnClass = MID->getSchedClass();
  const llvm::InstrStage *IS = InstrItins->beginStage(InsnClass);
  unsigned FuncUnits = IS->getUnits();
  UnsignPair StateTrans = UnsignPair(CurrentState, FuncUnits);
  assert(CachedTable.count(StateTrans) != 0);
  CurrentState = CachedTable[StateTrans];

This happens at the packetization stage, i.e. scheduling seems to work. My
schedule description is not very different from Hexagon or R600. I'm not
quite sure why this is happening. Would someone be able to shed some light
on this?

Any help is appreciated.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20151116/3d6e78e1/attachment.html>

More information about the llvm-dev mailing list