return Str;
}
-// =========== Immediate Randomization and Pooling routines ==============
-// Specialization of the template member function for ConstantInteger32
-// TODO(stichnot): try to move this specialization into a target-specific file.
-template <> bool ConstantInteger32::shouldBeRandomizedOrPooled() const {
- uint32_t Threshold = getFlags().getRandomizeAndPoolImmediatesThreshold();
- if (getFlags().getRandomizeAndPoolImmediatesOption() == RPI_None)
- return false;
- if (getType() != IceType_i32 && getType() != IceType_i16 &&
- getType() != IceType_i8)
- return false;
- // The Following checks if the signed representation of Value is between
- // -Threshold/2 and +Threshold/2
- bool largerThanThreshold = Threshold / 2 + Value >= Threshold;
- return largerThanThreshold;
-}
-
} // end of namespace Ice
Str << static_cast<int32_t>(getValue());
}
-/// Specialization of the template member function for ConstantInteger32
-template <> bool ConstantInteger32::shouldBeRandomizedOrPooled() const;
+// =========== Immediate Randomization and Pooling routines ==============
+// Specialization of the template member function for ConstantInteger32
+// TODO(stichnot): try to move this specialization into a target-specific file.
+template <> inline bool ConstantInteger32::shouldBeRandomizedOrPooled() const {
+ uint32_t Threshold = getFlags().getRandomizeAndPoolImmediatesThreshold();
+ if (getFlags().getRandomizeAndPoolImmediatesOption() == RPI_None)
+ return false;
+ if (getType() != IceType_i32 && getType() != IceType_i16 &&
+ getType() != IceType_i8)
+ return false;
+ // The Following checks if the signed representation of Value is between
+ // -Threshold/2 and +Threshold/2
+ bool largerThanThreshold = Threshold / 2 + Value >= Threshold;
+ return largerThanThreshold;
+}
template <>
inline void ConstantInteger64::dump(const Cfg *, Ostream &Str) const {