OLD | NEW |
1 //===- subzero/src/IceTargetLoweringX86BaseImpl.h - x86 lowering -*- C++ -*-==// | 1 //===- subzero/src/IceTargetLoweringX86BaseImpl.h - x86 lowering -*- C++ -*-==// |
2 // | 2 // |
3 // The Subzero Code Generator | 3 // The Subzero Code Generator |
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 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 using IceType = ConstantInteger32; | 80 using IceType = ConstantInteger32; |
81 static const Type Ty = IceType_i8; | 81 static const Type Ty = IceType_i8; |
82 static const char *TypeName; | 82 static const char *TypeName; |
83 static const char *AsmTag; | 83 static const char *AsmTag; |
84 static const char *PrintfString; | 84 static const char *PrintfString; |
85 }; | 85 }; |
86 } // end of namespace X86 | 86 } // end of namespace X86 |
87 | 87 |
88 namespace X86NAMESPACE { | 88 namespace X86NAMESPACE { |
89 | 89 |
90 /// A helper class to ease the settings of RandomizationPoolingPause to disable | 90 using Utils::BoolFlagSaver; |
91 /// constant blinding or pooling for some translation phases. | |
92 class BoolFlagSaver { | |
93 BoolFlagSaver() = delete; | |
94 BoolFlagSaver(const BoolFlagSaver &) = delete; | |
95 BoolFlagSaver &operator=(const BoolFlagSaver &) = delete; | |
96 | |
97 public: | |
98 BoolFlagSaver(bool &F, bool NewValue) : OldValue(F), Flag(F) { F = NewValue; } | |
99 ~BoolFlagSaver() { Flag = OldValue; } | |
100 | |
101 private: | |
102 const bool OldValue; | |
103 bool &Flag; | |
104 }; | |
105 | 91 |
106 template <typename Traits> class BoolFoldingEntry { | 92 template <typename Traits> class BoolFoldingEntry { |
107 BoolFoldingEntry(const BoolFoldingEntry &) = delete; | 93 BoolFoldingEntry(const BoolFoldingEntry &) = delete; |
108 | 94 |
109 public: | 95 public: |
110 BoolFoldingEntry() = default; | 96 BoolFoldingEntry() = default; |
111 explicit BoolFoldingEntry(Inst *I); | 97 explicit BoolFoldingEntry(Inst *I); |
112 BoolFoldingEntry &operator=(const BoolFoldingEntry &) = default; | 98 BoolFoldingEntry &operator=(const BoolFoldingEntry &) = default; |
113 /// Instr is the instruction producing the i1-type variable of interest. | 99 /// Instr is the instruction producing the i1-type variable of interest. |
114 Inst *Instr = nullptr; | 100 Inst *Instr = nullptr; |
(...skipping 7304 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7419 emitGlobal(*Var, SectionSuffix); | 7405 emitGlobal(*Var, SectionSuffix); |
7420 } | 7406 } |
7421 } | 7407 } |
7422 } break; | 7408 } break; |
7423 } | 7409 } |
7424 } | 7410 } |
7425 } // end of namespace X86NAMESPACE | 7411 } // end of namespace X86NAMESPACE |
7426 } // end of namespace Ice | 7412 } // end of namespace Ice |
7427 | 7413 |
7428 #endif // SUBZERO_SRC_ICETARGETLOWERINGX86BASEIMPL_H | 7414 #endif // SUBZERO_SRC_ICETARGETLOWERINGX86BASEIMPL_H |
OLD | NEW |