Page MenuHomePhabricator

[DebugInfo] Only perform TypeSize -> unsigned cast when necessary
ClosedPublic

Authored by joechrisellis on Feb 10 2021, 7:48 AM.

Details

Summary

This commit moves a line in SelectionDAGBuilder::handleDebugValue to
avoid implicitly casting a TypeSize object to an unsigned earlier than
necessary. It was possible that we bail out of the loop before the value
is ever used, which means we could create a superfluous TypeSize
warning.

Diff Detail

Event Timeline

joechrisellis created this revision.Feb 10 2021, 7:48 AM
joechrisellis requested review of this revision.Feb 10 2021, 7:48 AM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 10 2021, 7:48 AM
This revision is now accepted and ready to land.Feb 10 2021, 10:11 AM
david-arm added inline comments.
llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
1324

I'm not sure this is the right thing to do here. I realise you want a quick workaround, but I think the better workaround for now is to simply move this down until after the bail out below and add a TODO that this needs updating for scalable vectors perhaps?

joechrisellis marked an inline comment as done.

Address @david-arm's comments.

ACK, fair point!

joechrisellis retitled this revision from [DebugInfo] Remove early implicit cast of TypeSize to unsigned to [DebugInfo] Only perform TypeSize -> unsigned cast when necessary.Feb 11 2021, 5:53 AM
joechrisellis edited the summary of this revision. (Show Details)
This revision was landed with ongoing or failed builds.Feb 11 2021, 5:54 AM
This revision was automatically updated to reflect the committed changes.