[Sema] Avoid isNullPointerConstant invocation
DiagnoseNullConversion is needlessly calling isNullPointerConstant which is an expensive routine due to its calls to a constant evaluator -- which we don't need. Building the Linux Kernel (x86_64) with this fix has improved build times by ~2.1%. This is mainly due to the following methods no longer needing to be called anywhere near as often: 1) ExprConstant::CheckICE (reduced CPU cycles by ~90%) 2) IntExprEvaluator::VisitBinaryOperator (reduced CPU cycles by ~50%) Reviewed By: rtrieu, nickdesaulniers Differential Revision: https://reviews.llvm.org/D131532
Loading
Please sign in to comment