-
Notifications
You must be signed in to change notification settings - Fork 14
Conversation
Replacing with FORCE_INLINE does not help for: /localdisk/dmitriim/hdk/omniscidb/Utils/ExtractFromTime.cpp:199:30: warning: 'always_inline' function might not be inlinable [-Wattributes]
199 | ALWAYS_INLINE DEVICE int64_t extract_week(const int64_t timeval) { In this case looks like we should use simple inline. Is this an acceptable approach? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you also remove the FORCE and ALWAYS inline changes for now? I think that will require more thought. Let's tackle the other warnings now and look at inline warnings later.
omniscidb/Tests/ArrowStorageTest.cpp
Outdated
float64_builder.AppendValues({}); | ||
float64_builder.Finish(&empty_array); | ||
// auto status = float64_builder.AppendValues({}); | ||
ASSERT_TRUE(float64_builder.AppendValues({}).ok()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a macro you can use here -- ARROW_THROW_NOT_OK
I believe.
@@ -37,7 +37,7 @@ class AnnotateInternalFunctionsPass | |||
llvm::CGSCCAnalysisManager& AM, | |||
llvm::LazyCallGraph& CG, | |||
llvm::CGSCCUpdateResult& UR) { | |||
bool updated_function_defs = false; | |||
[[maybe_unused]] bool updated_function_defs = false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like this is actually not used? @lmontigny
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I confirm, it's not used
omniscidb/IR/Node.h
Outdated
const std::string& getFieldName(size_t i) const override { | ||
CHECK(false); | ||
// just a stub, shouldn't be reached. | ||
return op_type_; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Recommend returning empty string "" instead of a member var, since the return is not meaningful b/c the function is not implemented.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Returning a reference to a local object would produce another warning though. I wonder if we can modify CHECK
in such a way that the compiler would understand what we actually call abort
. Or maybe use some new macro like FAIL
to avoid unreachable return statements.
a6590f5
to
6d4c150
Compare
Sure, It was an initial approach. AFAIU Force inline removes symbol for this function and we can't call it on runtime, so many tests are failed with forced. Looks like warning generated by gcc is incorrect for our case - https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55830 . So I just suppressed it. |
CMakeLists.txt
Outdated
@@ -15,6 +15,7 @@ project( | |||
|
|||
set(CMAKE_CXX_STANDARD 17) | |||
set(CMAKE_CXX_STANDARD_REQUIRED ON) | |||
set(CMAKE_SUPPRESS_DEVELOPER_WARNINGS 1 CACHE INTERNAL "No dev warnings") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was able to fix the cmake warning here: #531
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool) I also tried in the same way, but didn't assume that the extra space would resolve it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the warning is fixed we need to remove this item.
omniscidb/IR/Node.h
Outdated
const std::string& getFieldName(size_t i) const override { CHECK(false); } | ||
const std::string& getFieldName(size_t i) const override { | ||
CHECK(false); | ||
// Check(false) macro have abort in Logger d-tor, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's just return an empty string, nobody will ever actually access it (b/c of the CHECK), and that is consistent with the rest of the code base.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, but signature with const ref don't allow to return ""
here. I checked and get returning address of local variable or temporary
or something like this, I can WA with static const std::string
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can also throw an exception instead of return to resolve the warning.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, I guess we can leave the abort if it builds fine w/ gcc and clang.
CMakeLists.txt
Outdated
@@ -15,6 +15,7 @@ project( | |||
|
|||
set(CMAKE_CXX_STANDARD 17) | |||
set(CMAKE_CXX_STANDARD_REQUIRED ON) | |||
set(CMAKE_SUPPRESS_DEVELOPER_WARNINGS 1 CACHE INTERNAL "No dev warnings") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the warning is fixed we need to remove this item.
omniscidb/IR/Node.h
Outdated
const std::string& getFieldName(size_t i) const override { CHECK(false); } | ||
const std::string& getFieldName(size_t i) const override { | ||
CHECK(false); | ||
// Check(false) macro have abort in Logger d-tor, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, I guess we can leave the abort if it builds fine w/ gcc and clang.
@Devjiu can you address #523 (comment) so we can merge this? It would be nice to suppress some of these warnings. |
d91de20
to
becdd8c
Compare
This commit is an initial step to remove warnings from build. Currently it's focused on linux gcc configuration. Always_inline attribute warning works incorrectly. In this case we want to keep symbol and than inline it during target llvm ir optimisation. See also: #521 Signed-off-by: Dmitrii Makarenko <[email protected]>
becdd8c
to
bf845d8
Compare
This commit is an initial step to remove warnings from build. Currently
it's focused on linux build.
Always_inline attribute warning works incorrectly. In this case we want
to keep symbol and than inline it during target llvm ir optimisation.
See also: #521
Signed-off-by: Dmitrii Makarenko [email protected]