[PATCH] D111443: [Driver] Fix ToolChain::getSanitizerArgs
Yaxun Liu via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Nov 11 07:59:14 PST 2021
yaxunl marked an inline comment as done.
yaxunl added inline comments.
================
Comment at: clang/lib/Driver/ToolChain.cpp:124
+ }
+ return SanitizerArgs(*this, JobArgs, /*DiagnoseErrors=*/false);
}
----------------
eugenis wrote:
> SanitizerArgs SanArgs(*this, JobArgs, !SanitizerArgsChecked);
> SanitizerArgsChecked = true;
> return SanArgs;
>
done
================
Comment at: clang/lib/Driver/ToolChains/FreeBSD.cpp:471
+bool FreeBSD::isPIEDefault(const llvm::opt::ArgList &Args) const {
+ return getSanitizerArgs(Args).requiresPIE();
+}
----------------
eugenis wrote:
> it looks like we do a lot of sanitizerargs recomputing. Is it worth it to try and cache it?
In general, SanitizerArgs is per job arguments, not per toolchain. There is no good way to cache it.
On the other hand, I would expect time spent in argument parsing is trivial compared to time spent in compilation for common programs.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D111443/new/
https://reviews.llvm.org/D111443
More information about the cfe-commits
mailing list