Page MenuHomePhabricator

[Scalarizer] Avoid changing name of non-instructions
ClosedPublic

Authored by bjope on Sep 15 2020, 4:41 AM.

Details

Summary

The "takeName" logic in ScalarizerVisitor::gather did not consider
that the value vector could refer to non-instructions, such as
global variables. This patch make sure that we avoid changing the
name of a value if it isn't an instruction.

Diff Detail

Event Timeline

bjope created this revision.Sep 15 2020, 4:41 AM
Herald added a project: Restricted Project. · View Herald TranscriptSep 15 2020, 4:41 AM
Herald added a subscriber: hiraditya. · View Herald Transcript
bjope requested review of this revision.Sep 15 2020, 4:41 AM
lebedev.ri accepted this revision.Sep 15 2020, 4:56 AM

SGTM, sorry about that.

llvm/lib/Transforms/Scalar/Scalarizer.cpp
401–402

This could use a comment.

This revision is now accepted and ready to land.Sep 15 2020, 4:56 AM
This revision was landed with ongoing or failed builds.Sep 15 2020, 5:16 AM
This revision was automatically updated to reflect the committed changes.