Introduce ceil division helper function.

This commit is contained in:
chriseth
2021-05-05 11:12:10 +02:00
parent 9d156b52c4
commit 72fc4d4a32
2 changed files with 26 additions and 6 deletions
+7
View File
@@ -126,9 +126,16 @@ public:
/// @returns the name of a function that rounds its input to the next multiple
/// of 32 or the input if it is a multiple of 32.
/// Ignores overflow.
/// signature: (value) -> result
std::string roundUpFunction();
/// @returns the name of a function that divides by 32 and rounds up during the division.
/// In other words, on input x it returns the smallest y such that y * 32 >= x.
/// Ignores overflow.
/// signature: (x) -> y
std::string divide32CeilFunction();
/// signature: (x, y) -> sum
std::string overflowCheckedIntAddFunction(IntegerType const& _type);
/// signature: (x, y) -> sum