This is an archive of the discontinued LLVM Phabricator instance.

[LoopUnswitch] Use reference variables instead of pointer one
ClosedPublic

Authored by jaykang10 on Mar 29 2021, 4:23 AM.

Details

Summary

Following comment of @fhahn on https://reviews.llvm.org/D99490#inline-935642, used reference variables instead of pointer one

Diff Detail

Event Timeline

jaykang10 created this revision.Mar 29 2021, 4:23 AM
jaykang10 requested review of this revision.Mar 29 2021, 4:23 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 29 2021, 4:23 AM
fhahn added inline comments.Mar 29 2021, 4:28 AM
llvm/lib/Transforms/Scalar/LoopUnswitch.cpp
850

nit: no llvm:: prefix should be needed. (e.g. we are also not using llvm::Instruction)

llvm/lib/Transforms/Utils/LoopUtils.cpp
1714

Not sure if the comment should be there. It should be in the header (which is what doxygen uses) and duplicating it here means it will probably diverge in the future, which is even more confusing.

jaykang10 added inline comments.Mar 29 2021, 4:35 AM
llvm/lib/Transforms/Scalar/LoopUnswitch.cpp
850

You are right!!! I will update it.

llvm/lib/Transforms/Utils/LoopUtils.cpp
1714

Yep, I will remove it.

jaykang10 updated this revision to Diff 333817.Mar 29 2021, 4:38 AM

Following comment of @fhahn, updated code.

@fhahn If you need something more for this one, please let me know.

fhahn accepted this revision.Mar 29 2021, 5:34 AM

LGTM, thanks

This revision is now accepted and ready to land.Mar 29 2021, 5:34 AM