http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54402

             Bug #: 54402
           Summary: [4.8 Regression] var-tracking does not scale
    Classification: Unclassified
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: debug
        AssignedTo: unassig...@gcc.gnu.org
        ReportedBy: ste...@gcc.gnu.org


A C test case for another var-tracking issue:

typedef struct astruct_d
{
  void *data;
} astruct;

/* Generate a whole bunch of unique fake mallocs, this
   keeps the vartrack dump simpler to understand (all
   the "size" arguments have a unique name).  */
#define DE0(X)                                          \
  void *malloc##X (unsigned long size##X);
#define DE1(X)                                          \
  DE0(X##0) DE0(X##1) DE0(X##2) DE0(X##3) DE0(X##4)     \
  DE0(X##5) DE0(X##6) DE0(X##7) DE0(X##8) DE0(X##9)
#define DE2(X)                                          \
  DE1(X##0) DE1(X##1) DE1(X##2) DE1(X##3) DE1(X##4)     \
  DE1(X##5) DE1(X##6) DE1(X##7) DE1(X##8) DE1(X##9)
#define DE3(X)                                          \
  DE2(X##0) DE2(X##1) DE2(X##2) DE2(X##3) DE2(X##4)     \
  DE2(X##5) DE2(X##6) DE2(X##7) DE2(X##8) DE2(X##9)
#define DE4(X)                                          \
  DE3(X##0) DE3(X##1) DE3(X##2) DE3(X##3) DE3(X##4)     \
  DE3(X##5) DE3(X##6) DE3(X##7) DE3(X##8) DE3(X##9)
DE4(0)
#undef DE0
#undef DE1
#undef DE2
#undef DE3
#undef DE4

void foo (void)
{
/* Now call all those mallocs and generate a series of
   variables while at it.  */
#define DE0(X)                                          \
  astruct *A##X = (astruct *) malloc##X(sizeof (astruct));
#define DE1(X)                                          \
  DE0(X##0) DE0(X##1) DE0(X##2) DE0(X##3) DE0(X##4)     \
  DE0(X##5) DE0(X##6) DE0(X##7) DE0(X##8) DE0(X##9)
#define DE2(X)                                          \
  DE1(X##0) DE1(X##1) DE1(X##2) DE1(X##3) DE1(X##4)     \
  DE1(X##5) DE1(X##6) DE1(X##7) DE1(X##8) DE1(X##9)
#define DE3(X)                                          \
  DE2(X##0) DE2(X##1) DE2(X##2) DE2(X##3) DE2(X##4)     \
  DE2(X##5) DE2(X##6) DE2(X##7) DE2(X##8) DE2(X##9)
#define DE4(X)                                          \
  DE3(X##0) DE3(X##1) DE3(X##2) DE3(X##3) DE3(X##4)     \
  DE3(X##5) DE3(X##6) DE3(X##7) DE3(X##8) DE3(X##9)
DE4(0)
DE4(1)
}

-->

 var-tracking dataflow   :  34.51 (33%) usr
 var-tracking emit       :  59.46 (57%) usr

Reply via email to