Vedant Kumar dbbdda4d23 [ubsan] Skip null checks if they are constant-folded away
The IR builder can constant-fold null checks if the pointer operand
points to a constant. If the "is-non-null" check is folded away to
"true", don't emit the null check + branch.

Testing: check-clang, check-ubsan.

This slightly reduces the amount of null checks we emit when compiling
X86ISelLowering.cpp. Here are the numbers from patched/unpatched clangs
based on r300371.

  -------------------------------------
  | Setup          | # of null checks |
  -------------------------------------
  | unpatched, -O0 |            25251 |
  | patched, -O0   |            23925 | (-5.3%)
  -------------------------------------

llvm-svn: 300509
2017-04-17 22:26:10 +00:00
2017-02-25 02:46:53 +00:00
S
Description
Carbon Language's main repository: documents, design, implementation, and related tools. (NOTE: Carbon Language is experimental; see README)
Apache-2.0
2.9 GiB
0 Stars 1 Watchers 0 Forks
Languages
C++ 89.5%
Python 4.1%
Starlark 4%
Carbon 1.4%
JavaScript 0.4%
Other 0.3%