Index: src/IceOperand.h |
diff --git a/src/IceOperand.h b/src/IceOperand.h |
index 4ae217c5f3b36676469e1dd635920ecd0d1e0704..5203c51d5374c891ee52063397b687bf2d665467 100644 |
--- a/src/IceOperand.h |
+++ b/src/IceOperand.h |
@@ -160,6 +160,11 @@ public: |
return Operand->getKind() == K; |
} |
+ // Judge if this given immediate should be randomized or pooled |
Jim Stichnoth
2015/06/12 23:48:17
End this and the next sentence with a period.
qining
2015/06/17 04:28:53
Done.
|
+ // By default should return false, only constant integers should |
+ // truely go through this method |
Jim Stichnoth
2015/06/12 23:48:17
truly
qining
2015/06/17 04:28:53
Done.
|
+ bool shouldBeRandomizedOrPooled(const GlobalContext *Ctx) { return false; } |
+ |
private: |
ConstantPrimitive(Type Ty, PrimType Value, uint32_t PoolEntryID) |
: Constant(K, Ty, PoolEntryID), Value(Value) {} |
@@ -182,6 +187,10 @@ inline void ConstantInteger32::dump(const Cfg *, Ostream &Str) const { |
Str << static_cast<int32_t>(getValue()); |
} |
+// Specialization of the template member function for ConstantInteger32 |
+template <> |
+bool ConstantInteger32::shouldBeRandomizedOrPooled(const GlobalContext *Ctx); |
Jim Stichnoth
2015/06/12 23:48:17
I'm not sure it's sufficient to limit blinding to
qining
2015/06/17 04:28:53
Done. We now support randomizing and pooling of i8
|
+ |
template <> |
inline void ConstantInteger64::dump(const Cfg *, Ostream &Str) const { |
if (!ALLOW_DUMP) |