[PATCH] Add a jumptable attribute and support for creating jump-instruction tables

Tom Roeder tmroeder at google.com
Fri Apr 11 15:00:32 PDT 2014


This patch provides a new jumptable attribute and associated CodeGen support to generate jump-instruction tables and replace function references for jumptable-annotated functions. The work of generating the tables is now done with an IR pass in CodeGen to replace address-taken functions, along with a change to AsmPrinter to generate the assembly for the tables. This is a followup to the discussion on llvmdev. See http://lists.cs.uiuc.edu/pipermail/llvmdev/2014-April/071866.html

This version of the patch has support for X86 and ARM backends, along with tests for each.

http://reviews.llvm.org/D3361

Files:
  docs/LangRef.rst
  include/llvm/Analysis/JumpInstrTableInfo.h
  include/llvm/Analysis/Passes.h
  include/llvm/Bitcode/LLVMBitCodes.h
  include/llvm/CodeGen/JumpInstrTables.h
  include/llvm/CodeGen/Passes.h
  include/llvm/IR/Attributes.h
  include/llvm/InitializePasses.h
  include/llvm/LinkAllPasses.h
  include/llvm/Target/TargetInstrInfo.h
  lib/Analysis/Analysis.cpp
  lib/Analysis/CMakeLists.txt
  lib/Analysis/JumpInstrTableInfo.cpp
  lib/AsmParser/LLLexer.cpp
  lib/AsmParser/LLParser.cpp
  lib/AsmParser/LLToken.h
  lib/Bitcode/Reader/BitcodeReader.cpp
  lib/Bitcode/Writer/BitcodeWriter.cpp
  lib/CodeGen/AsmPrinter/AsmPrinter.cpp
  lib/CodeGen/CMakeLists.txt
  lib/CodeGen/JumpInstrTables.cpp
  lib/CodeGen/LLVMTargetMachine.cpp
  lib/IR/Attributes.cpp
  lib/IR/Verifier.cpp
  lib/LTO/LTOCodeGenerator.cpp
  lib/Target/ARM/ARMBaseInstrInfo.cpp
  lib/Target/ARM/ARMBaseInstrInfo.h
  lib/Target/X86/X86InstrInfo.cpp
  lib/Target/X86/X86InstrInfo.h
  lib/Transforms/IPO/IPO.cpp
  test/Bitcode/attributes.ll
  test/CodeGen/ARM/jump_tables.ll
  test/CodeGen/X86/jump_table_bitcast.ll
  test/CodeGen/X86/jump_tables.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D3361.1.patch
Type: text/x-patch
Size: 52239 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140411/2abd9f83/attachment.bin>


More information about the llvm-commits mailing list