Skip to content
Snippets Groups Projects
user avatar
Vedant Kumar authored
It's possible to determine the alignment of an alloca at compile-time.
Use this information to skip emitting some runtime alignment checks.

Testing: check-clang, check-ubsan.

This significantly reduces the amount of alignment checks we emit when
compiling X86ISelLowering.cpp. Here are the numbers from patched/unpatched
clangs based on r301361.

  ------------------------------------------
  | Setup          | # of alignment checks |
  ------------------------------------------
  | unpatched, -O0 |                 47195 |
  | patched, -O0   |                 30876 | (-34.6%)
  ------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@301377 91177308-0d34-0410-b5e6-96231b3b80d8
fb77f039
History
Name Last commit Last update
..