projects
/
oota-llvm.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[AVX512] add PSRAW Intrinsic
[oota-llvm.git]
/
include
/
llvm
/
CodeGen
/
MachineJumpTableInfo.h
diff --git
a/include/llvm/CodeGen/MachineJumpTableInfo.h
b/include/llvm/CodeGen/MachineJumpTableInfo.h
index b8d04bf2132e7a03ad18c26274ac38229ad80d84..adcd1d0de63d305e3aeddb62cc7db082f1e46763 100644
(file)
--- 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.
//
// 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.
//
//===----------------------------------------------------------------------===//
// function jump tables.
//
//===----------------------------------------------------------------------===//
@@
-20,13
+20,13
@@
#ifndef LLVM_CODEGEN_MACHINEJUMPTABLEINFO_H
#define LLVM_CODEGEN_MACHINEJUMPTABLEINFO_H
#ifndef LLVM_CODEGEN_MACHINEJUMPTABLEINFO_H
#define LLVM_CODEGEN_MACHINEJUMPTABLEINFO_H
-#include <vector>
#include <cassert>
#include <cassert>
+#include <vector>
namespace llvm {
class MachineBasicBlock;
namespace llvm {
class MachineBasicBlock;
-class
TargetData
;
+class
DataLayout
;
class raw_ostream;
/// MachineJumpTableEntry - One jump table in the jump table info.
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<MachineBasicBlock*> MBBs;
struct MachineJumpTableEntry {
/// MBBs - The vector of basic blocks from which to create the jump table.
std::vector<MachineBasicBlock*> MBBs;
-
+
explicit MachineJumpTableEntry(const std::vector<MachineBasicBlock*> &M)
: MBBs(M) {}
};
explicit MachineJumpTableEntry(const std::vector<MachineBasicBlock*> &M)
: MBBs(M) {}
};
-
+
class MachineJumpTableInfo {
public:
/// JTEntryKind - This enum indicates how each entry of the jump table is
class MachineJumpTableInfo {
public:
/// JTEntryKind - This enum indicates how each entry of the jump table is
@@
-47,12
+47,17
@@
public:
/// EK_BlockAddress - Each entry is a plain address of block, e.g.:
/// .word LBB123
EK_BlockAddress,
/// EK_BlockAddress - Each entry is a plain address of block, e.g.:
/// .word LBB123
EK_BlockAddress,
-
+
+ /// EK_GPRel64BlockAddress - Each entry is an address of block, encoded
+ /// with a relocation as gp-relative, e.g.:
+ /// .gpdword LBB123
+ EK_GPRel64BlockAddress,
+
/// EK_GPRel32BlockAddress - Each entry is an address of block, encoded
/// with a relocation as gp-relative, e.g.:
/// .gprel32 LBB123
EK_GPRel32BlockAddress,
/// EK_GPRel32BlockAddress - Each entry is an address of block, encoded
/// 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.:
/// 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.:
@@
-74,19
+79,19
@@
private:
JTEntryKind EntryKind;
std::vector<MachineJumpTableEntry> JumpTables;
public:
JTEntryKind EntryKind;
std::vector<MachineJumpTableEntry> JumpTables;
public:
- MachineJumpTableInfo(JTEntryKind Kind): EntryKind(Kind) {}
-
+
explicit
MachineJumpTableInfo(JTEntryKind Kind): EntryKind(Kind) {}
+
JTEntryKind getEntryKind() const { return EntryKind; }
/// getEntrySize - Return the size of each entry in the jump table.
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.
/// getEntryAlignment - Return the alignment of each entry in the jump table.
- unsigned getEntryAlignment(const
TargetData
&TD) const;
-
- ///
getJumpTableIndex - Create a new jump table or return an existing on
e.
+ unsigned getEntryAlignment(const
DataLayout
&TD) const;
+
+ ///
createJumpTableIndex - Create a new jump tabl
e.
///
///
- unsigned
get
JumpTableIndex(const std::vector<MachineBasicBlock*> &DestBBs);
-
+ unsigned
create
JumpTableIndex(const std::vector<MachineBasicBlock*> &DestBBs);
+
/// isEmpty - Return true if there are no jump tables.
///
bool isEmpty() const { return JumpTables.empty(); }
/// isEmpty - Return true if there are no jump tables.
///
bool isEmpty() const { return JumpTables.empty(); }
@@
-100,7
+105,7
@@
public:
void RemoveJumpTable(unsigned Idx) {
JumpTables[Idx].MBBs.clear();
}
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);
/// 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);