]> granicus.if.org Git - llvm/commit
[cfi] Avoid branch veneers in jump tables when possible.
authorEvgeniy Stepanov <eugeni.stepanov@gmail.com>
Tue, 29 Aug 2017 22:40:19 +0000 (22:40 +0000)
committerEvgeniy Stepanov <eugeni.stepanov@gmail.com>
Tue, 29 Aug 2017 22:40:19 +0000 (22:40 +0000)
commitaa1a72db63ee33e4b40b5d6cd966d865944b534c
tree77b679db6516357303f5379fa7b07d3fd42c4a94
parent7cf6af50d7e2acf171690d4f7155110bc2b966b4
[cfi] Avoid branch veneers in jump tables when possible.

Summary:
When jumptable encoding does not match target code encoding (arm vs
thumb), a veneer is inserted by the linker. We can not avoid this
in all cases, because entries within one jumptable must have the same
encoding, but we can make it less common by selecting the jumptable
encoding to match the majority of its targets.

This change only covers FullLTO, and not ThinLTO.

Reviewers: pcc

Subscribers: aemerson, mehdi_amini, javed.absar, kristof.beyls, llvm-commits, hiraditya

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@312054 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/IPO/LowerTypeTests.cpp
test/Transforms/LowerTypeTests/function-arm-thumb.ll [new file with mode: 0644]