aboutsummaryrefslogtreecommitdiff
path: root/lib/Support/FileUtilities.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2003-09-02 16:35:17 +0000
committerChris Lattner <sabre@nondot.org>2003-09-02 16:35:17 +0000
commitdd4b4215160bc4073c6fff07afd67e14902c6cfc (patch)
tree05edf3939c311826433ce55cd55bbcdfd159aea3 /lib/Support/FileUtilities.cpp
parentb44cacb647431b030702f099dea94fc5625041da (diff)
Change the code to no longer compute the "type description" immediately when
the type is analyzed. Instead, only compute it when requested (with getDescription), and cached for reuse later. This dramatically speeds up LLVM in general because these descriptions almost _never_ need to be constructed. The only time they are used is when a type is <<'d. Printing of modules by themselves uses other code to print symbolic types when possible, so these descriptions are really only used for debugging. Also, this fixes the particularly bad case when lots of types get resolved to each other, such as during linking of large programs. In these cases, the type descriptions would be repeatedly recomputed and discarded even though: A. noone reads the description before it gets resolved, and B. many many resolutions happen at intermediate steps, causing a HUGE waste of time. Overall, this makes the getTypeDesc function much more light-weight, and fixes bug: Assembler/2002-07-08-HugePerformanceProblem.llx, which went from taking 1048.770u/19.150s (which is 17.5 MINUTES, on apoc), to taking 0.020u/0.000s, which is a nice little speedup. :) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8320 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Support/FileUtilities.cpp')
0 files changed, 0 insertions, 0 deletions