[cfi] Emit jump tables as a function-level inline asm.
authorEvgeniy Stepanov <eugeni.stepanov@gmail.com>
Thu, 22 Dec 2016 22:22:35 +0000 (22:22 +0000)
committerEvgeniy Stepanov <eugeni.stepanov@gmail.com>
Thu, 22 Dec 2016 22:22:35 +0000 (22:22 +0000)
commit27d4c9b71b426742197174b7415e166f3272975a
treea4c23ae4c3eba250901ab47ca41bdd4024853e35
parente477fb95916117b4e7414c4ed90f4b1dd4a03a60
[cfi] Emit jump tables as a function-level inline asm.

Use a dummy private function with inline asm calls instead of module
level asm blocks for CFI jumptables.

The main advantage is that now jumptable codegen can be affected by
the function attributes (like target_cpu on ARM). Module level asm
gets the default subtarget based on the target triple, which is often
not good enough.

This change also uses asm constraints/arguments to reference
jumptable targets and aliases directly. We no longer do asm name
mangling in an IR pass.

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

llvm-svn: 290384
llvm/lib/Transforms/IPO/LowerTypeTests.cpp
llvm/test/Transforms/LowerTypeTests/function-disjoint.ll
llvm/test/Transforms/LowerTypeTests/function-ext.ll
llvm/test/Transforms/LowerTypeTests/function-weak.ll
llvm/test/Transforms/LowerTypeTests/function.ll
llvm/test/Transforms/LowerTypeTests/section.ll