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

Tom Roeder tmroeder at google.com
Wed May 14 11:57:28 PDT 2014


This diff fixes the problems noted in the review. PTAL.

For the for-loop invalidation problem, I didn't see any way to increment the implicit iterator early in C++11 style, so I've gone back to a standard iterator for loop to match the style of other invalidation-sensitive Use-handling loops.

Also, as I was working on these fixes, I found a problem with GlobalAlias: it doesn't support replaceUsesOfWithOnConstant, and it cannot target declaration-only functions. So, I've added some special-case handling for GlobalAlias statements that target jumptable functions. I've also added a new test case for "alias".

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_alias.ll
  test/CodeGen/X86/jump_table_bitcast.ll
  test/CodeGen/X86/jump_tables.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D3361.9397.patch
Type: text/x-patch
Size: 54430 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140514/cb1725be/attachment.bin>


More information about the llvm-commits mailing list