X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=include%2Fllvm%2FCodeGen%2FMachineJumpTableInfo.h;h=928145d279b6bc6848f0494df44fc3d3de87dcd6;hb=53e98a2c4aa7065f4136c5263b14192036c1e056;hp=6bd6682dd39c6145b4bf485b5ab85ce4848c4b47;hpb=6c2cf8b1fbcf70fd9db6fe44032c1ceaa2299760;p=oota-llvm.git diff --git a/include/llvm/CodeGen/MachineJumpTableInfo.h b/include/llvm/CodeGen/MachineJumpTableInfo.h index 6bd6682dd39..928145d279b 100644 --- a/include/llvm/CodeGen/MachineJumpTableInfo.h +++ b/include/llvm/CodeGen/MachineJumpTableInfo.h @@ -10,9 +10,9 @@ // The MachineJumpTableInfo class keeps track of jump tables referenced by // lowered switch instructions in the MachineFunction. // -// Instructions reference the address of these jump tables through the use of -// MO_JumpTableIndex values. When emitting assembly or machine code, these -// virtual address references are converted to refer to the address of the +// Instructions reference the address of these jump tables through the use of +// MO_JumpTableIndex values. When emitting assembly or machine code, these +// virtual address references are converted to refer to the address of the // function jump tables. // //===----------------------------------------------------------------------===// @@ -26,7 +26,7 @@ namespace llvm { class MachineBasicBlock; -class TargetData; +class DataLayout; class raw_ostream; /// MachineJumpTableEntry - One jump table in the jump table info. @@ -34,11 +34,11 @@ class raw_ostream; struct MachineJumpTableEntry { /// MBBs - The vector of basic blocks from which to create the jump table. std::vector MBBs; - + explicit MachineJumpTableEntry(const std::vector &M) : MBBs(M) {} }; - + class MachineJumpTableInfo { public: /// JTEntryKind - This enum indicates how each entry of the jump table is @@ -57,7 +57,7 @@ public: /// with a relocation as gp-relative, e.g.: /// .gprel32 LBB123 EK_GPRel32BlockAddress, - + /// 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.: @@ -80,18 +80,18 @@ private: std::vector JumpTables; public: explicit MachineJumpTableInfo(JTEntryKind Kind): EntryKind(Kind) {} - + JTEntryKind getEntryKind() const { return EntryKind; } /// getEntrySize - Return the size of each entry in the jump table. - unsigned getEntrySize(const TargetData &TD) const; + unsigned getEntrySize(const DataLayout &TD) const; /// getEntryAlignment - Return the alignment of each entry in the jump table. - unsigned getEntryAlignment(const TargetData &TD) const; - + unsigned getEntryAlignment(const DataLayout &TD) const; + /// createJumpTableIndex - Create a new jump table. /// unsigned createJumpTableIndex(const std::vector &DestBBs); - + /// isEmpty - Return true if there are no jump tables. /// bool isEmpty() const { return JumpTables.empty(); } @@ -105,7 +105,7 @@ public: void RemoveJumpTable(unsigned Idx) { JumpTables[Idx].MBBs.clear(); } - + /// ReplaceMBBInJumpTables - If Old is the target of any jump tables, update /// the jump tables to branch to New instead. bool ReplaceMBBInJumpTables(MachineBasicBlock *Old, MachineBasicBlock *New);