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

Unified Diff: src/IceTargetLowering.h

Issue 807293003: Subzero: Randomize register assignment. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Simply; fix a bug; add the lit test Created 6 years 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 side-by-side diff with in-line comments
Download patch
Index: src/IceTargetLowering.h
diff --git a/src/IceTargetLowering.h b/src/IceTargetLowering.h
index 3e2243a9f18b0d71fae3f80a464da94be6891b2a..617a7bbacfa2e29d926a81866b298485ffe01ace 100644
--- a/src/IceTargetLowering.h
+++ b/src/IceTargetLowering.h
@@ -191,6 +191,10 @@ public:
virtual const llvm::SmallBitVector &getRegisterSetForType(Type Ty) const = 0;
void regAlloc(RegAllocKind Kind);
+ virtual void makeRandomRegisterPermutation(
+ llvm::SmallVectorImpl<int32_t> &Permutation,
+ const llvm::SmallBitVector &ExcludeRegisters) const = 0;
+
virtual void emitVariable(const Variable *Var) const = 0;
// Performs target-specific argument lowering.
@@ -204,9 +208,7 @@ public:
virtual ~TargetLowering() {}
protected:
- TargetLowering(Cfg *Func)
- : Func(Func), Ctx(Func->getContext()), HasComputedFrame(false),
- CallsReturnsTwice(false), StackAdjustment(0) {}
+ TargetLowering(Cfg *Func);
virtual void lowerAlloca(const InstAlloca *Inst) = 0;
virtual void lowerArithmetic(const InstArithmetic *Inst) = 0;
virtual void lowerAssign(const InstAssign *Inst) = 0;
@@ -241,6 +243,7 @@ protected:
// natural location, as arguments are pushed for a function call.
int32_t StackAdjustment;
LoweringContext Context;
+ const bool RandomizeRegisterAllocation;
jvoung (off chromium) 2014/12/17 19:53:34 Maybe keep the bools together.
Jim Stichnoth 2014/12/18 18:52:03 Done.
};
// TargetGlobalInitLowering is used for "lowering" global

Powered by Google App Engine
This is Rietveld 408576698