This is an archive of the discontinued LLVM Phabricator instance.

Add a jumptable attribute + intrinsic + IR transform for jump-instruction tables
AbandonedPublic

Authored by tmroeder on Apr 4 2014, 12:04 PM.

Details

Reviewers
None
Summary

Here's a patch that implements the version of jump-instruction tables that I have been discussing on llvmdev.

It adds:

  • a jumptable function attribute that maps to a jumptable entry in a special section
  • an intrinsic llvm.jumptable_jump that can only occur as the sole instruction in a jumptable function
  • a JumpInstrTables pass that converts address-taken functions to pass through a jump-instruction table
  • codegen support + X86 backend support for lowering the intrinsic to a simple jmp f@PLT instruction
  • some basic tests of the functionality

Diff Detail

Event Timeline

tmroeder abandoned this revision.Jul 10 2014, 2:45 PM