OLD | NEW |
1 //===- subzero/src/IceSwitchLowering.h - Switch lowering --------*- C++ -*-===// | 1 //===- subzero/src/IceSwitchLowering.h - Switch lowering --------*- C++ -*-===// |
2 // | 2 // |
3 // The LLVM Compiler Infrastructure | 3 // The LLVM Compiler Infrastructure |
4 // | 4 // |
5 // This file is distributed under the University of Illinois Open Source | 5 // This file is distributed under the University of Illinois Open Source |
6 // License. See LICENSE.TXT for details. | 6 // License. See LICENSE.TXT for details. |
7 // | 7 // |
8 //===----------------------------------------------------------------------===// | 8 //===----------------------------------------------------------------------===// |
9 /// | 9 /// |
10 /// \file | 10 /// \file |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 uint64_t High; | 68 uint64_t High; |
69 union { | 69 union { |
70 CfgNode *Target; /// Target for a range. | 70 CfgNode *Target; /// Target for a range. |
71 InstJumpTable *JT; /// Jump table targets. | 71 InstJumpTable *JT; /// Jump table targets. |
72 }; | 72 }; |
73 | 73 |
74 /// Try and append a cluster returning whether or not it was successful. | 74 /// Try and append a cluster returning whether or not it was successful. |
75 bool tryAppend(const CaseCluster &New); | 75 bool tryAppend(const CaseCluster &New); |
76 }; | 76 }; |
77 | 77 |
78 /// Store the jump table data so that it can be emitted later in the correct | 78 /// Store the jump table data so that it can be emitted later in the correct ELF |
79 /// ELF section once the offsets from the start of the function are known. | 79 /// section once the offsets from the start of the function are known. |
80 class JumpTableData { | 80 class JumpTableData { |
81 JumpTableData() = delete; | 81 JumpTableData() = delete; |
82 JumpTableData &operator=(const JumpTableData &) = delete; | 82 JumpTableData &operator=(const JumpTableData &) = delete; |
83 | 83 |
84 public: | 84 public: |
85 JumpTableData(IceString FuncName, SizeT Id, SizeT NumTargets) | 85 JumpTableData(IceString FuncName, SizeT Id, SizeT NumTargets) |
86 : FuncName(FuncName), Id(Id) { | 86 : FuncName(FuncName), Id(Id) { |
87 TargetOffsets.reserve(NumTargets); | 87 TargetOffsets.reserve(NumTargets); |
88 } | 88 } |
89 JumpTableData(const JumpTableData &) = default; | 89 JumpTableData(const JumpTableData &) = default; |
(...skipping 12 matching lines...) Expand all Loading... |
102 IceString FuncName; | 102 IceString FuncName; |
103 SizeT Id; | 103 SizeT Id; |
104 std::vector<intptr_t> TargetOffsets; | 104 std::vector<intptr_t> TargetOffsets; |
105 }; | 105 }; |
106 | 106 |
107 using JumpTableDataList = std::vector<JumpTableData>; | 107 using JumpTableDataList = std::vector<JumpTableData>; |
108 | 108 |
109 } // end of namespace Ice | 109 } // end of namespace Ice |
110 | 110 |
111 #endif // SUBZERO_SRC_ICESWITCHLOWERING_H | 111 #endif // SUBZERO_SRC_ICESWITCHLOWERING_H |
OLD | NEW |