]> granicus.if.org Git - clang/commit
[ubsan] Skip alignment checks which are folded away
authorVedant Kumar <vsk@apple.com>
Tue, 3 Oct 2017 01:27:26 +0000 (01:27 +0000)
committerVedant Kumar <vsk@apple.com>
Tue, 3 Oct 2017 01:27:26 +0000 (01:27 +0000)
commit3f7b4f37be57e8120a8f6621c13cbb373a6cb2fc
treef7e6d44de7f46c895720650b540d21632e882449
parent9ce2dd4d7e6c33ff7f49556f5b70f246ea204756
[ubsan] Skip alignment checks which are folded away

Don't emit alignment checks which the IR constant folder throws away.

I've tested this out on X86FastISel.cpp. While this doesn't decrease
end-to-end compile-time significantly, it results in 122 fewer type
checks (1% reduction) overall, without adding any real complexity.

Differential Revision: https://reviews.llvm.org/D37544

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@314752 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/CGExpr.cpp
test/CodeGenCXX/ubsan-suppress-checks.cpp