Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[NFC] W/A GCC maybe-uninitialized warning #2588

Merged
merged 2 commits into from
May 28, 2024

Conversation

MrSidims
Copy link
Contributor

No description provided.

Signed-off-by: Sidorov, Dmitry <dmitry.sidorov@intel.com>
@@ -4385,9 +4385,12 @@ SPIRVValue *LLVMToSPIRVBase::transIntrinsicInst(IntrinsicInst *II,
Extracts[Idx] = BM->addVectorExtractDynamicInst(
VecSVal, BM->addIntegerConstant(I32STy, Idx), BB);
}
assert(Extracts[0] && "Uninitialized Extracts of vector reduce lowering");
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or should it be check for vecsize? Technically possible nullptr is also an initialization

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Best to check that VecSize > 0 indeed, but we have to do that with an if; assertions won't help in release builds.

Signed-off-by: Sidorov, Dmitry <dmitry.sidorov@intel.com>
@MrSidims
Copy link
Contributor Author

New patch new GCC warning. @svenvh I expect even more as for out-of-tree build of LLVM GCC won't see LLVM sources to make a correct judgment. Would it makes sense to disable this warning? On the other hand fixing them all would enhance the code base in a sense of not trusting LLVM's API outputs.

@svenvh
Copy link
Member

svenvh commented May 28, 2024

I'm quite surprised why this is suddenly happening; both the failing builds and the last passing build report "The CXX compiler identification is GNU 9.4.0".

If it's not too much effort, it would be nice to fix all of the warnings. On your latest patch the build made it to 88% so hopefully it's not much more to fix.

@MrSidims
Copy link
Contributor Author

I'm quite surprised why this is suddenly happening; both the failing builds and the last passing build report "The CXX compiler identification is GNU 9.4.0".

If it's not too much effort, it would be nice to fix all of the warnings. On your latest patch the build made it to 88% so hopefully it's not much more to fix.

Me too. Locally I'm building out-of-tree as well, but I don't see any warnings.

@svenvh
Copy link
Member

svenvh commented May 28, 2024

Me too. Locally I'm building out-of-tree as well, but I don't see any warnings.

I can reproduce something locally at least, with GCC 9.4.0 and -DCMAKE_BUILD_TYPE=Release. I can't explain the recent regressions though.

Funny enough I'm only getting the DenseMap warnings; not the warning that you're fixing with this PR.

@svenvh
Copy link
Member

svenvh commented May 28, 2024

Perhaps it's an issue with older gcc versions. Let's see what happens with #2589

Copy link
Member

@svenvh svenvh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can merge this now and decide how to proceed with the remaining failures perhaps.

@MrSidims MrSidims merged commit 0fd9882 into KhronosGroup:main May 28, 2024
8 of 9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants