Attention is currently required from: Daniel Carvalho.
Hello kokoro, Daniel Carvalho,
I'd like you to do a code review. Please visit
https://gem5-review.googlesource.com/c/public/gem5/+/43237
to review the following change.
Change subject: base: Remove "inline" from bitfield.hh.
......................................................................
base: Remove "inline" from bitfield.hh.
Those functions are all constexpr which implies inline, so the inline is
redundant.
Change-Id: I7ddf13ddc833365f60f644c40c9fcb16a3e6285e
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/42385
Maintainer: Gabe Black <gabe.bl...@gmail.com>
Tested-by: kokoro <noreply+kok...@google.com>
Reviewed-by: Daniel Carvalho <oda...@yahoo.com.br>
---
M src/base/bitfield.hh
1 file changed, 17 insertions(+), 17 deletions(-)
diff --git a/src/base/bitfield.hh b/src/base/bitfield.hh
index d47ab8c..888b365 100644
--- a/src/base/bitfield.hh
+++ b/src/base/bitfield.hh
@@ -56,7 +56,7 @@
*
* @ingroup api_bitfield
*/
-constexpr inline uint64_t
+constexpr uint64_t
mask(unsigned nbits)
{
return (nbits >= 64) ? (uint64_t)-1LL : (1ULL << nbits) - 1;
@@ -69,7 +69,7 @@
* @ingroup api_bitfield
*/
template <class T>
-constexpr inline T
+constexpr T
bits(T val, unsigned first, unsigned last)
{
assert(first >= last);
@@ -83,7 +83,7 @@
* @ingroup api_bitfield
*/
template <class T>
-constexpr inline T
+constexpr T
bits(T val, unsigned bit)
{
return bits(val, bit, bit);
@@ -96,7 +96,7 @@
* @ingroup api_bitfield
*/
template <class T>
-constexpr inline T
+constexpr T
mbits(T val, unsigned first, unsigned last)
{
return val & (mask(first + 1) & ~mask(last));
@@ -105,7 +105,7 @@
/**
* @ingroup api_bitfield
*/
-constexpr inline uint64_t
+constexpr uint64_t
mask(unsigned first, unsigned last)
{
return mbits((uint64_t)-1LL, first, last);
@@ -119,7 +119,7 @@
* @ingroup api_bitfield
*/
template <int N>
-constexpr inline uint64_t
+constexpr uint64_t
sext(uint64_t val)
{
bool sign_bit = bits(val, N - 1);
@@ -135,7 +135,7 @@
* @ingroup api_bitfield
*/
template <int N>
-constexpr inline uint64_t
+constexpr uint64_t
szext(uint64_t val)
{
bool sign_bit = bits(val, N - 1);
@@ -159,7 +159,7 @@
* @ingroup api_bitfield
*/
template <class T, class B>
-constexpr inline T
+constexpr T
insertBits(T val, unsigned first, unsigned last, B bit_val)
{
assert(first >= last);
@@ -175,7 +175,7 @@
* @ingroup api_bitfield
*/
template <class T, class B>
-constexpr inline T
+constexpr T
insertBits(T val, unsigned bit, B bit_val)
{
return insertBits(val, bit, bit, bit_val);
@@ -190,7 +190,7 @@
* @ingroup api_bitfield
*/
template <class T, class B>
-constexpr inline void
+constexpr void
replaceBits(T& val, unsigned first, unsigned last, B bit_val)
{
val = insertBits(val, first, last, bit_val);
@@ -202,7 +202,7 @@
* @ingroup api_bitfield
*/
template <class T, class B>
-constexpr inline void
+constexpr void
replaceBits(T& val, unsigned bit, B bit_val)
{
val = insertBits(val, bit, bit, bit_val);
@@ -256,7 +256,7 @@
*
* @ingroup api_bitfield
*/
-constexpr inline int
+constexpr int
findMsbSet(uint64_t val)
{
int msb = 0;
@@ -292,7 +292,7 @@
*
* @ingroup api_bitfield
*/
-constexpr inline int
+constexpr int
findLsbSet(uint64_t val)
{
int lsb = 0;
@@ -330,7 +330,7 @@
*
* @ingroup api_bitfield
*/
-constexpr inline int
+constexpr int
popCount(uint64_t val)
{
#ifndef __has_builtin
@@ -365,7 +365,7 @@
*
* @ingroup api_bitfield
*/
-constexpr inline uint64_t
+constexpr uint64_t
alignToPowerOfTwo(uint64_t val)
{
val--;
@@ -388,7 +388,7 @@
*
* @ingroup api_bitfield
*/
-constexpr inline int
+constexpr int
ctz32(uint32_t value)
{
return value ? __builtin_ctzl(value) : 32;
@@ -402,7 +402,7 @@
*
* @ingroup api_bitfield
*/
-constexpr inline int
+constexpr int
ctz64(uint64_t value)
{
return value ? __builtin_ctzll(value) : 64;
--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/43237
To unsubscribe, or for help writing mail filters, visit
https://gem5-review.googlesource.com/settings
Gerrit-Project: public/gem5
Gerrit-Branch: release-staging-v21-0
Gerrit-Change-Id: I7ddf13ddc833365f60f644c40c9fcb16a3e6285e
Gerrit-Change-Number: 43237
Gerrit-PatchSet: 1
Gerrit-Owner: Peter Yuen <petery....@huawei.com>
Gerrit-Reviewer: Daniel Carvalho <oda...@yahoo.com.br>
Gerrit-Reviewer: kokoro <noreply+kok...@google.com>
Gerrit-CC: Gabe Black <gabe.bl...@gmail.com>
Gerrit-Attention: Daniel Carvalho <oda...@yahoo.com.br>
Gerrit-MessageType: newchange
_______________________________________________
gem5-dev mailing list -- gem5-dev@gem5.org
To unsubscribe send an email to gem5-dev-le...@gem5.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s