Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(424)

Side by Side Diff: src/IceSwitchLowering.h

Issue 1665423002: Subzero: Cleanup Inst==>Instr. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/IceRegAlloc.cpp ('k') | src/IceSwitchLowering.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 InstJumpTable *getJumpTable() const { 53 InstJumpTable *getJumpTable() const {
54 assert(Kind == JumpTable); 54 assert(Kind == JumpTable);
55 return JT; 55 return JT;
56 } 56 }
57 57
58 bool isUnitRange() const { return Low == High; } 58 bool isUnitRange() const { return Low == High; }
59 bool isPairRange() const { return Low == High - 1; } 59 bool isPairRange() const { return Low == High - 1; }
60 60
61 /// Discover cases which can be clustered together and return the clusters 61 /// Discover cases which can be clustered together and return the clusters
62 /// ordered by case value. 62 /// ordered by case value.
63 static CaseClusterArray clusterizeSwitch(Cfg *Func, const InstSwitch *Inst); 63 static CaseClusterArray clusterizeSwitch(Cfg *Func, const InstSwitch *Instr);
64 64
65 private: 65 private:
66 CaseClusterKind Kind; 66 CaseClusterKind Kind;
67 uint64_t Low; 67 uint64_t Low;
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
(...skipping 25 matching lines...) Expand all
99 IceString FuncName; 99 IceString FuncName;
100 SizeT Id; 100 SizeT Id;
101 TargetList TargetOffsets; 101 TargetList TargetOffsets;
102 }; 102 };
103 103
104 using JumpTableDataList = std::vector<JumpTableData>; 104 using JumpTableDataList = std::vector<JumpTableData>;
105 105
106 } // end of namespace Ice 106 } // end of namespace Ice
107 107
108 #endif // SUBZERO_SRC_ICESWITCHLOWERING_H 108 #endif // SUBZERO_SRC_ICESWITCHLOWERING_H
OLDNEW
« no previous file with comments | « src/IceRegAlloc.cpp ('k') | src/IceSwitchLowering.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698