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

Side by Side Diff: src/IceTargetLoweringX86BaseImpl.h

Issue 1683243003: ARM32 Vector lowering - scalarize select (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Use BoolFlagSaver for GeneratingTargetHelpers. 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
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « src/IceTargetLoweringARM32.cpp ('k') | src/IceUtils.h » ('j') | src/IceUtils.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698