Like the recently added getExactLog2 except ignore the sign bit.
Details
Details
Diff Detail
Diff Detail
Event Timeline
| llvm/include/llvm/ADT/APFloat.h | ||
|---|---|---|
| 494–495 | It looks like using std::optional<int> as return value can produce clearer interface, no? | |
| llvm/include/llvm/ADT/APFloat.h | ||
|---|---|---|
| 494–495 | It shouldn’t differ from the non-abs version. I also don’t think optional is any nicer here | |
Comment Actions
LGTM.
| llvm/include/llvm/ADT/APFloat.h | ||
|---|---|---|
| 500 | inline is excessive here, a member function defined in its class definition is inline (https://eel.is/c++draft/class.mfct#1). | |
It looks like using std::optional<int> as return value can produce clearer interface, no?