This is an archive of the discontinued LLVM Phabricator instance.

[OpenMP][OpenMPIRBuilder] Fix static code analysis concerns with uninitialized variables
AcceptedPublic

Authored by Manna on Aug 5 2022, 9:03 AM.

Details

Summary

computeHeuristicUnrollFactor(): Fix static analyzer warnings with uninitialized variables warnings - NFCI

Diff Detail

Event Timeline

Manna created this revision.Aug 5 2022, 9:03 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 5 2022, 9:03 AM
Manna requested review of this revision.Aug 5 2022, 9:03 AM
Herald added a project: Restricted Project. · View Herald Transcript

The static analyzer is broken and giving a false positive report. llvm::ApproximateLoopSize() always assigns to those byref arguments. I'm not certain there's much value from forcing an initialization here, but if LLVM folks want the changes, I wouldn't block them.

jdoerfert accepted this revision.Aug 24 2022, 7:47 AM

LG, still probably good to improve the analyzer.

This revision is now accepted and ready to land.Aug 24 2022, 7:47 AM