[PATCH] Add an option to allow JumpInstrTables to set unnamed_addr and jumptable on all address-taken functions

Tom Roeder tmroeder at google.com
Thu Jun 12 13:52:07 PDT 2014


This small patch adds a new command flag -jump-table-all and an associated TargetOptions field JumpTableAll, and it modifies JumpInstrTables to add unnamed_addr and jumptable to all address-taken functions if the flag is set.

This is important for applications like my implementation of control-flow integrity, which want to operate over all address-taken functions and not just the ones that happened to have been marked jumptable.

http://reviews.llvm.org/D4128

Files:
  include/llvm/CodeGen/CommandFlags.h
  include/llvm/CodeGen/JumpInstrTables.h
  include/llvm/Target/TargetOptions.h
  lib/CodeGen/JumpInstrTables.cpp
  lib/CodeGen/LLVMTargetMachine.cpp
  test/CodeGen/X86/jump_table_all.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D4128.10371.patch
Type: text/x-patch
Size: 6970 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140612/aaca3b50/attachment.bin>


More information about the llvm-commits mailing list