Go to the documentation of this file.
19 #ifndef LLVM_CODEGEN_MACHINEJUMPTABLEINFO_H
20 #define LLVM_CODEGEN_MACHINEJUMPTABLEINFO_H
28 class MachineBasicBlock;
36 std::vector<MachineBasicBlock*>
MBBs;
80 std::vector<MachineJumpTableEntry> JumpTables;
97 bool isEmpty()
const {
return JumpTables.empty(); }
106 JumpTables[Idx].MBBs.clear();
This is an optimization pass for GlobalISel generic memory operations.
bool RemoveMBBFromJumpTables(MachineBasicBlock *MBB)
RemoveMBBFromJumpTables - If MBB is present in any jump tables, remove it.
We currently emits eax Perhaps this is what we really should generate is Is imull three or four cycles eax eax The current instruction priority is based on pattern complexity The former is more complex because it folds a load so the latter will not be emitted Perhaps we should use AddedComplexity to give LEA32r a higher priority We should always try to match LEA first since the LEA matching code does some estimate to determine whether the match is profitable if we care more about code then imull is better It s two bytes shorter than movl leal On a Pentium M
unsigned createJumpTableIndex(const std::vector< MachineBasicBlock * > &DestBBs)
createJumpTableIndex - Create a new jump table.
A parsed version of the target data layout string in and methods for querying it.
MachineJumpTableEntry(const std::vector< MachineBasicBlock * > &M)
@ EK_BlockAddress
EK_BlockAddress - Each entry is a plain address of block, e.g.
@ EK_Custom32
EK_Custom32 - Each entry is a 32-bit value that is custom lowered by the TargetLowering::LowerCustomJ...
unsigned getEntrySize(const DataLayout &TD) const
getEntrySize - Return the size of each entry in the jump table.
bool ReplaceMBBInJumpTables(MachineBasicBlock *Old, MachineBasicBlock *New)
ReplaceMBBInJumpTables - If Old is the target of any jump tables, update the jump tables to branch to...
JTEntryKind getEntryKind() const
void dump() const
dump - Call to stderr.
bool isEmpty() const
isEmpty - Return true if there are no jump tables.
std::vector< MachineBasicBlock * > MBBs
MBBs - The vector of basic blocks from which to create the jump table.
This class implements an extremely fast bulk output stream that can only output to a stream.
MachineJumpTableInfo(JTEntryKind Kind)
Printable printJumpTableEntryReference(unsigned Idx)
Prints a jump table entry reference.
@ EK_LabelDifference32
EK_LabelDifference32 - Each entry is the address of the block minus the address of the jump table.
const std::vector< MachineJumpTableEntry > & getJumpTables() const
@ EK_GPRel64BlockAddress
EK_GPRel64BlockAddress - Each entry is an address of block, encoded with a relocation as gp-relative,...
JTEntryKind
JTEntryKind - This enum indicates how each entry of the jump table is represented and emitted.
void print(raw_ostream &OS) const
print - Used by the MachineFunction printer to print information about jump tables.
bool ReplaceMBBInJumpTable(unsigned Idx, MachineBasicBlock *Old, MachineBasicBlock *New)
ReplaceMBBInJumpTable - If Old is a target of the jump tables, update the jump table to branch to New...
void RemoveJumpTable(unsigned Idx)
RemoveJumpTable - Mark the specific index as being dead.
@ EK_Inline
EK_Inline - Jump table entries are emitted inline at their point of use.
MachineJumpTableEntry - One jump table in the jump table info.
@ EK_GPRel32BlockAddress
EK_GPRel32BlockAddress - Each entry is an address of block, encoded with a relocation as gp-relative,...
unsigned getEntryAlignment(const DataLayout &TD) const
getEntryAlignment - Return the alignment of each entry in the jump table.