This is an archive of the discontinued LLVM Phabricator instance.

[NFC][NewGVN] Remove OpIsSafeForPHIOfOpsHelper()
ClosedPublic

Authored by kmitropoulou on Aug 1 2022, 4:19 PM.

Diff Detail

Event Timeline

kmitropoulou created this revision.Aug 1 2022, 4:19 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 1 2022, 4:19 PM
Herald added a subscriber: hiraditya. · View Herald Transcript
kmitropoulou requested review of this revision.Aug 1 2022, 4:19 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 1 2022, 4:19 PM

Updating D130949: [NFC][NewGVN] Remove OpIsSafeForPHIOfOpsHelper()

fhahn added a comment.Aug 18 2022, 9:17 AM

Could you elaborate on the motivation for removing the helper?

Could you elaborate on the motivation for removing the helper?

Nobody else uses it and the code is easier to read.

Updating D130949: [NFC][NewGVN] Remove OpIsSafeForPHIOfOpsHelper()

I find it easier to follow what's added to OpSafeForPHIOfOps without the helper, so seems like a reasonable change.

llvm/lib/Transforms/Scalar/NewGVN.cpp
2588

Shouldn't this be continue;?

2597

Same comment (continue;)

kmitropoulou added inline comments.Aug 24 2022, 3:16 PM
llvm/lib/Transforms/Scalar/NewGVN.cpp
2588

You are right :) Thank you!

2597

Same here :)

Updating D130949: [NFC][NewGVN] Remove OpIsSafeForPHIOfOpsHelper()

kmitropoulou marked 2 inline comments as done.Sep 20 2022, 1:23 PM
asbirlea added inline comments.Sep 20 2022, 1:29 PM
llvm/lib/Transforms/Scalar/NewGVN.cpp
2919

Could you move this to a separate NFC patch?

kmitropoulou added inline comments.Sep 20 2022, 1:34 PM
llvm/lib/Transforms/Scalar/NewGVN.cpp
2919

I did not do this change. It is shown here because this change was committed in September 3rd.

kmitropoulou added inline comments.Sep 20 2022, 1:59 PM
llvm/lib/Transforms/Scalar/NewGVN.cpp
2919

It came from the following commit:

commit fedc59734a44ef7b62c5f389b0cdffd02264b2a9
Author: Kazu Hirata <kazu@google.com>
Date: Sat Sep 3 11:17:40 2022 -0700

[llvm] Use range-based for loops (NFC)

Can you rebase the patch on ToT then?

Updating D130949: [NFC][NewGVN] Remove OpIsSafeForPHIOfOpsHelper()

Can you rebase the patch on ToT then?

Done :)

Updating D130949: [NFC][NewGVN] Remove OpIsSafeForPHIOfOpsHelper()

asbirlea accepted this revision.Sep 20 2022, 2:28 PM

lgtm.

This revision is now accepted and ready to land.Sep 20 2022, 2:28 PM

Updating D130949: [NFC][NewGVN] Remove OpIsSafeForPHIOfOpsHelper()

This revision was landed with ongoing or failed builds.Sep 21 2022, 9:27 AM
This revision was automatically updated to reflect the committed changes.