[LLVMbugs] [Bug 2543] New: llc failed with MIPS architecture

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Fri Jul 11 00:57:52 PDT 2008


http://llvm.org/bugs/show_bug.cgi?id=2543

           Summary: llc failed with MIPS architecture
           Product: tools
           Version: 2.3
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: llc
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: patrice.gerin at imag.fr
                CC: llvmbugs at cs.uiuc.edu


Created an attachment (id=1827)
 --> (http://llvm.org/bugs/attachment.cgi?id=1827)
A simple  .c file

When I compile the simple attached C file, llc seems to enter an infinite loop
with -march=mips.

Here after are the command I write:

llvm-gcc -emit-llvm -c main.c -o main.bc
llc -march=mips -debug main.bc -f -o main.mips.s

I identify that the infinite loop is the while() in the
LatencyPriorityQueue::CalculatePriorities() method (file
CodeGen/SelectionDAG/ScheduleDAGList.cpp). Some SUnit are added continuously to
the WorkList ...

I attach the main.c and main.bc files.

void LatencyPriorityQueue::CalculatePriorities() {
  Latencies.assign(SUnits->size(), -1);
  NumNodesSolelyBlocking.assign(SUnits->size(), 0);

  // For each node, calculate the maximal path from the node to the exit.
  std::vector<std::pair<const SUnit*, unsigned> > WorkList;
  for (unsigned i = 0, e = SUnits->size(); i != e; ++i) {
    const SUnit *SU = &(*SUnits)[i];
    if (SU->Succs.empty())
      WorkList.push_back(std::make_pair(SU, 0U));
  }

  while (!WorkList.empty()) {
    const SUnit *SU = WorkList.back().first;
    unsigned SuccLat = WorkList.back().second;
    WorkList.pop_back();
    int &Latency = Latencies[SU->NodeNum];
    if (Latency == -1 || (SU->Latency + SuccLat) > (unsigned)Latency) {
      Latency = SU->Latency + SuccLat;
      for (SUnit::const_pred_iterator I = SU->Preds.begin(),E =
SU->Preds.end();
           I != E; ++I)
        WorkList.push_back(std::make_pair(I->Dep, Latency));
    }
  }
}


-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list