LLVM API Documentation

Public Types | Public Member Functions
llvm::MachineJumpTableInfo Class Reference

#include <MachineJumpTableInfo.h>

List of all members.

Public Types

enum  JTEntryKind {
  EK_BlockAddress, EK_GPRel64BlockAddress, EK_GPRel32BlockAddress, EK_LabelDifference32,
  EK_Inline, EK_Custom32
}

Public Member Functions

 MachineJumpTableInfo (JTEntryKind Kind)
JTEntryKind getEntryKind () const
unsigned getEntrySize (const DataLayout &TD) const
 getEntrySize - Return the size of each entry in the jump table.
unsigned getEntryAlignment (const DataLayout &TD) const
 getEntryAlignment - Return the alignment of each entry in the jump table.
unsigned createJumpTableIndex (const std::vector< MachineBasicBlock * > &DestBBs)
bool isEmpty () const
const std::vector
< MachineJumpTableEntry > & 
getJumpTables () const
void RemoveJumpTable (unsigned Idx)
bool ReplaceMBBInJumpTables (MachineBasicBlock *Old, MachineBasicBlock *New)
bool ReplaceMBBInJumpTable (unsigned Idx, MachineBasicBlock *Old, MachineBasicBlock *New)
void print (raw_ostream &OS) const
void dump () const

Detailed Description

Definition at line 42 of file MachineJumpTableInfo.h.


Member Enumeration Documentation

JTEntryKind - This enum indicates how each entry of the jump table is represented and emitted.

Enumerator:
EK_BlockAddress 

EK_BlockAddress - Each entry is a plain address of block, e.g.: .word LBB123

EK_GPRel64BlockAddress 

EK_GPRel64BlockAddress - Each entry is an address of block, encoded with a relocation as gp-relative, e.g.: .gpdword LBB123

EK_GPRel32BlockAddress 

EK_GPRel32BlockAddress - Each entry is an address of block, encoded with a relocation as gp-relative, e.g.: .gprel32 LBB123

EK_LabelDifference32 

EK_LabelDifference32 - Each entry is the address of the block minus the address of the jump table. This is used for PIC jump tables where gprel32 is not supported. e.g.: .word LBB123 - LJTI1_2 If the .set directive is supported, this is emitted as: .set L4_5_set_123, LBB123 - LJTI1_2 .word L4_5_set_123

EK_Inline 

EK_Inline - Jump table entries are emitted inline at their point of use. It is the responsibility of the target to emit the entries.

EK_Custom32 

EK_Custom32 - Each entry is a 32-bit value that is custom lowered by the TargetLowering::LowerCustomJumpTableEntry hook.

Definition at line 46 of file MachineJumpTableInfo.h.


Constructor & Destructor Documentation

Definition at line 82 of file MachineJumpTableInfo.h.


Member Function Documentation

createJumpTableIndex - Create a new jump table.

createJumpTableIndex - Create a new jump table entry in the jump table info.

Definition at line 769 of file MachineFunction.cpp.

dump - Call to stderr.

Definition at line 818 of file MachineFunction.cpp.

References llvm::dbgs(), and print().

getEntrySize - Return the size of each entry in the jump table.

Definition at line 729 of file MachineFunction.cpp.

References EK_BlockAddress, EK_Custom32, EK_GPRel32BlockAddress, EK_GPRel64BlockAddress, EK_Inline, EK_LabelDifference32, getEntryKind(), llvm::DataLayout::getPointerSize(), and llvm_unreachable.

isEmpty - Return true if there are no jump tables.

Definition at line 97 of file MachineJumpTableInfo.h.

print - Used by the MachineFunction printer to print information about jump tables. Implemented in MachineFunction.cpp

Definition at line 803 of file MachineFunction.cpp.

Referenced by dump(), and llvm::MachineFunction::print().

RemoveJumpTable - Mark the specific index as being dead. This will prevent it from being emitted.

Definition at line 105 of file MachineJumpTableInfo.h.

Referenced by llvm::BranchFolder::OptimizeFunction().

ReplaceMBBInJumpTable - If Old is a target of the jump tables, update the jump table to branch to New instead.

Definition at line 789 of file MachineFunction.cpp.

References llvm::MachineJumpTableEntry::MBBs.

Referenced by ReplaceMBBInJumpTables().

ReplaceMBBInJumpTables - If Old is the target of any jump tables, update the jump tables to branch to New instead.

Definition at line 778 of file MachineFunction.cpp.

References ReplaceMBBInJumpTable().


The documentation for this class was generated from the following files: