[llvm-bugs] [Bug 24667] New: [Regression] Quadratic module build time due to Preprocessor::LeaveSubmodule
via llvm-bugs
llvm-bugs at lists.llvm.org
Tue Sep 1 15:31:51 PDT 2015
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: unassignedclangbugs at nondot.org
Reporter: chisophugis at gmail.com
CC: dgregor at apple.com, llvm-bugs at 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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20150901/a849f614/attachment.html>
More information about the llvm-bugs
mailing list