aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorMikhail Maltsev <mikhail.maltsev@arm.com>2018-04-27 09:12:12 +0000
committerMikhail Maltsev <mikhail.maltsev@arm.com>2018-04-27 09:12:12 +0000
commitffaa8a87811ad731c09b7ed533f28ce0fd9289ae (patch)
treea06e7d971c44e2dd9a6b62b1ac793d89cc8ec645 /clang/lib/Frontend/CompilerInvocation.cpp
parentd4349f3bf676c0fcb4242b5abe8f5f6043ed4b34 (diff)
downloadllvm-ffaa8a87811ad731c09b7ed533f28ce0fd9289ae.zip
llvm-ffaa8a87811ad731c09b7ed533f28ce0fd9289ae.tar.gz
llvm-ffaa8a87811ad731c09b7ed533f28ce0fd9289ae.tar.bz2
[IR] Do not assume that function pointers are aligned
Summary: 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). The original approach (https://reviews.llvm.org/D44781) introduced a new field for function pointer alignment in the DataLayout structure to address this. But it seems unlikely that optimizations based on function pointer alignment would bring much benefit in practice to justify the additional maintenance burden, so this patch simply assumes that function pointer alignment is always unknown. Reviewers: javed.absar, efriedma Reviewed By: efriedma Subscribers: kristof.beyls, llvm-commits, hfinkel, rogfer01 Differential Revision: https://reviews.llvm.org/D46110 llvm-svn: 331025
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
0 files changed, 0 insertions, 0 deletions