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

Side by Side Diff: src/IceTargetLowering.h

Issue 456033003: Subzero: Randomize register assignment. (Closed) Base URL: https://gerrit.chromium.org/gerrit/p/native_client/pnacl-subzero.git@master
Patch Set: Remove redundancies. Created 6 years, 4 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/IceTargetLowering.h - Lowering interface -----*- C++ -*-===// 1 //===- subzero/src/IceTargetLowering.h - Lowering interface -----*- 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 // This file declares the TargetLowering and LoweringContext 10 // This file declares the TargetLowering and LoweringContext
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 RegSet_FramePointer = 1 << 3, 149 RegSet_FramePointer = 1 << 3,
150 RegSet_All = ~RegSet_None 150 RegSet_All = ~RegSet_None
151 }; 151 };
152 typedef uint32_t RegSetMask; 152 typedef uint32_t RegSetMask;
153 153
154 virtual llvm::SmallBitVector getRegisterSet(RegSetMask Include, 154 virtual llvm::SmallBitVector getRegisterSet(RegSetMask Include,
155 RegSetMask Exclude) const = 0; 155 RegSetMask Exclude) const = 0;
156 virtual const llvm::SmallBitVector &getRegisterSetForType(Type Ty) const = 0; 156 virtual const llvm::SmallBitVector &getRegisterSetForType(Type Ty) const = 0;
157 void regAlloc(); 157 void regAlloc();
158 158
159 typedef std::vector<int32_t> RegisterPermutation;
JF 2014/08/12 05:27:00 What's the expected size of this vector? Shouldn't
wala 2014/08/15 03:37:23 Done.
160 virtual void makeRandomRegisterPermutation(RegisterPermutation &Permutation,
Jim Stichnoth 2014/08/14 01:10:29 Can this method be const?
wala 2014/08/15 03:37:23 It changes the state of the RNG, so I wouldn't mak
161 const llvm::SmallBitVector &ExcludeRegisters) = 0;
162
159 virtual void emitVariable(const Variable *Var, const Cfg *Func) const = 0; 163 virtual void emitVariable(const Variable *Var, const Cfg *Func) const = 0;
160 164
161 // Performs target-specific argument lowering. 165 // Performs target-specific argument lowering.
162 virtual void lowerArguments() = 0; 166 virtual void lowerArguments() = 0;
163 167
164 virtual void addProlog(CfgNode *Node) = 0; 168 virtual void addProlog(CfgNode *Node) = 0;
165 virtual void addEpilog(CfgNode *Node) = 0; 169 virtual void addEpilog(CfgNode *Node) = 0;
166 170
167 virtual void emitConstants() const = 0; 171 virtual void emitConstants() const = 0;
168 172
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 private: 239 private:
236 TargetGlobalInitLowering(const TargetGlobalInitLowering &) 240 TargetGlobalInitLowering(const TargetGlobalInitLowering &)
237 LLVM_DELETED_FUNCTION; 241 LLVM_DELETED_FUNCTION;
238 TargetGlobalInitLowering & 242 TargetGlobalInitLowering &
239 operator=(const TargetGlobalInitLowering &) LLVM_DELETED_FUNCTION; 243 operator=(const TargetGlobalInitLowering &) LLVM_DELETED_FUNCTION;
240 }; 244 };
241 245
242 } // end of namespace Ice 246 } // end of namespace Ice
243 247
244 #endif // SUBZERO_SRC_ICETARGETLOWERING_H 248 #endif // SUBZERO_SRC_ICETARGETLOWERING_H
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698