summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorSerge Pavlov <sepavloff@gmail.com>2018-05-21 16:09:54 +0000
committerSerge Pavlov <sepavloff@gmail.com>2018-05-21 16:09:54 +0000
commit9f8068420a7b18180a7c8da2224508e93f99587f (patch)
treef12032b5586f2b39029f20a2fdee57ca8c30c437 /clang/lib/Frontend/CompilerInvocation.cpp
parent1a7aaf3cd50422797a45910e76aa197975a1e1ed (diff)
downloadbcm5719-llvm-9f8068420a7b18180a7c8da2224508e93f99587f.tar.gz
bcm5719-llvm-9f8068420a7b18180a7c8da2224508e93f99587f.zip
[CodeGen] Recognize more cases of zero initialization
If a variable has an initializer, codegen tries to build its value. If the variable is large in size, building its value requires substantial resources. It causes strange behavior from user viewpoint: compilation of huge zero initialized arrays like: char data_1[2147483648u] = { 0 }; consumes enormous amount of time and memory. With this change codegen tries to determine if variable initializer is equivalent to zero initializer. In this case variable value is not constructed. This change fixes PR18978. Differential Revision: https://reviews.llvm.org/D46241 llvm-svn: 332847
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud