This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug tree-optimization/23490] New: Long compile time for array initializer with inlined constructor


GNU C++ version 4.1.0 20050810

This little program:

struct qd_real {
    double x[4];
    inline qd_real(double x0, double x1, double x2, double x3) {
        x[0] = x0;
        x[1] = x1;
        x[2] = x2;
        x[3] = x3;
    }

};

#define TWO(x) x, x

const qd_real sin_table[] = {
    TWO(
    TWO(
    TWO(        
    TWO(
    TWO(        
    TWO(        
    TWO(
    TWO(
    TWO(
    TWO(
        qd_real(1, 2, 3, 4)
        ))))))))))
};

takes about 25 seconds to compile on my machine, although it's only 1000 lines
or so. Compile time seems to scale roughly linear, but it's pretty damn slow.
2.95 takes 6 seconds, but that's without checking, so it's not entirely fair.

Profile:

samples  %        symbol name
3483     14.2530  rtx_equal_for_memref_p
2016      8.2498  find_base_term
1765      7.2227  canon_rtx
1493      6.1096  memrefs_conflict_p
1189      4.8656  for_each_rtx_1
1052      4.3049  nonoverlapping_memrefs_p
921       3.7689  rtx_equal_p
690       2.8236  exp_equiv_p
640       2.6190  addr_side_effect_eval
579       2.3694  canon_true_dependence
504       2.0624  check_dependence
479       1.9601  is_gimple_stmt
460       1.8824  ggc_alloc_stat
343       1.4036  for_each_rtx
327       1.3381  walk_tree
300       1.2276  base_alias_check
270       1.1049  poison_pages
258       1.0558  schedule_block
253       1.0353  cse_insn

-- 
           Summary: Long compile time for array initializer with inlined
                    constructor
           Product: gcc
           Version: 4.1.0
            Status: UNCONFIRMED
          Keywords: compile-time-hog
          Severity: normal
          Priority: P2
         Component: tree-optimization
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: falk at debian dot org
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: alphaev68-unknown-linux-gnu
  GCC host triplet: alphaev68-unknown-linux-gnu
GCC target triplet: alphaev68-unknown-linux-gnu


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]