The value tracking analysis uses function alignment to infer that the
least significant bits of function pointers are known to be zero.
Unfortunately, this is not correct for ARM targets: the least
significant bit of a function pointer stores the ARM/Thumb state
information (i.e., the LSB is set for Thumb functions and cleared for
ARM functions).
It is still desirable to be able to control the alignment of
functions' code (for example, aligning functions to cache line size
improves I-cache utilization), independently of function pointer
alignment.
This patch adds a new field to the DataLayout structure that stores
the ABI alignment of function pointers and uses it when querying the
alignment.
Perhaps we want to clarify that if it is not specified (or it is zero) function pointers will be aligned as regular pointers ("p" above). Is my interpretation correct here?