base: Add M5_LIKELY and M5_UNLIKELY macros to compiler.hh.

The clang/gcc implementation uses the nonstandard __builtin_expect(). In
C++20, new standard attributes can be used instead. We can't use those
yet though.

Change-Id: Idd2541a7eca0d97ac6c643abbf2910cbc343d7e5
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/34816
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
1 file changed