[LLVMbugs] [Bug 5698] New: odd performance bug

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Sat Dec 5 23:29:02 PST 2009


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

           Summary: odd performance bug
           Product: new-bugs
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: new bugs
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: regehr at cs.utah.edu
                CC: llvmbugs at cs.uiuc.edu


The innocent-looking function below takes many minutes to compile at -Os using
either llvm-gcc and clang.  I can't repro using llc since it seems to lack an
Os flag and doesn't exhibit the behavior at -O[0123].  I'm using r90568.


typedef unsigned char uint8_t;
typedef uint8_t error_t;
void DelugeMetadataP__BlockWrite__eraseDone (uint8_t imgNum, error_t error);
void DelugeMetadataP__nextImage (void);
uint8_t DelugeMetadataP__state;
uint8_t DelugeMetadataP__currentImageIdx;
void DelugeMetadataP__nextImage (void);
void
DelugeMetadataP__BlockWrite__eraseDone (uint8_t imgNum, error_t error)
{

  {
    switch ((int) DelugeMetadataP__state)
      {
      case 3:;
        switch ((int) DelugeMetadataP__state)
          {
          case 3:;
            DelugeMetadataP__BlockWrite__eraseDone (imgNum, error);
            break;
          case 2:;
            DelugeMetadataP__currentImageIdx =
              (uint8_t) ((int) DelugeMetadataP__currentImageIdx + 1);
            DelugeMetadataP__nextImage ();
            break;
          }
        break;
      case 2:;
        DelugeMetadataP__currentImageIdx =
          (uint8_t) ((int) DelugeMetadataP__currentImageIdx + 1);
        DelugeMetadataP__nextImage ();
        break;
      }
    return;
  }
}


-- 
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