> +// REQUIRES: long_tests

I got curious as to why this was slow. I ran perf on

./bin/clang -E @..../response-file.c.tmp.1.txt response-file.c  -###

The results are interesting

  39.24%  clang  clang-3.6                     [.]
llvm::opt::Option::matches(llvm::opt::OptSpecifier) const
                                     ▒
  25.58%  clang  clang-3.6                     [.]
llvm::opt::Option::Option(llvm::opt::OptTable::Info const*,
llvm::opt::OptTable const*)                     ▒
  14.84%  clang  clang-3.6                     [.]
llvm::opt::OptTable::getOption(llvm::opt::OptSpecifier) const
                                     ▒
   1.68%  clang  libc-2.18.so                  [.] strlen

Now, there are 300_000 options in the response file, but adding a
counter to ] llvm::opt::Option::matches shows that it is called about
349_802_000 times :-)

Is this a now issue? Is it worth fixing?

Cheers,
Rafael

_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to