This is an archive of the discontinued LLVM Phabricator instance.

[BOLT][NFC] Simplify handleRelocation
ClosedPublic

Authored by Amir on Aug 17 2022, 6:03 PM.

Diff Detail

Event Timeline

Amir created this revision.Aug 17 2022, 6:03 PM
Herald added a reviewer: maksfb. · View Herald Transcript
Herald added a project: Restricted Project. · View Herald Transcript
Herald added a subscriber: ayermolo. · View Herald Transcript
Amir requested review of this revision.Aug 17 2022, 6:03 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 17 2022, 6:03 PM
rafauler added inline comments.Aug 17 2022, 6:42 PM
bolt/lib/Rewrite/RewriteInstance.cpp
2509–2510

I think it's better to have BinaryFunction *BF inside the if clause, so it's clear that the scope of the BF variable does not extend past this if. Unless I'm missing something else.

Amir added inline comments.Aug 17 2022, 8:41 PM
bolt/lib/Rewrite/RewriteInstance.cpp
2509–2510

Sure. I've made the change because there's no scope difference as there's no code past the if clause (here and below with RogueBF), but let's keep it explicit that the scope is restricted to the if clause.

Amir updated this revision to Diff 453519.Aug 17 2022, 8:48 PM

Revert definitions in if clauses

Amir marked an inline comment as done.Aug 17 2022, 8:49 PM
This revision is now accepted and ready to land.Aug 22 2022, 12:17 PM
This revision was automatically updated to reflect the committed changes.