https://llvm.org/bugs/show_bug.cgi?id=24667

            Bug ID: 24667
           Summary: [Regression] Quadratic module build time due to
                    Preprocessor::LeaveSubmodule
           Product: clang
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: Modules
          Assignee: unassignedclangb...@nondot.org
          Reporter: chisophu...@gmail.com
                CC: dgre...@apple.com, llvm-bugs@lists.llvm.org
    Classification: Unclassified

Created attachment 14809
  --> https://llvm.org/bugs/attachment.cgi?id=14809&action=edit
Test script exhibiting quadratic module build time with ToT.

Consider:

module foo {
  header "foo1.h"
  header "foo2.h"
  ......
}

foo<n>.h:
#pragma once
#define FOO_<n>

Preprocessor::LeaveSubmodule does O(# macros in submodule) work every time it
leaves a header. This results in quadratic build times, a regression from clang
3.6

The attached script shows the following times for different values of N with
ToT:
(N)     (time)
128     0.0208690166473
256     0.0294139385223
512     0.0603349208832
1024    0.158221006393
2048    0.521872997284
4096    1.93269181252
8192    7.92222499847

Same thing but for clang 3.6:
128     0.0171859264374
256     0.0209867954254
512     0.0306701660156
1024    0.0452530384064
2048    0.0781750679016
4096    0.141057014465
8192    0.270556926727

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to