This is an archive of the discontinued LLVM Phabricator instance.

[ConstantHoisting] stop rematerializing InsertionPt
ClosedPublic

Authored by nickdesaulniers on Jul 13 2023, 2:33 PM.

Details

Summary

Reading this code, I noticed that we call findMatInsertPt a lot, for the
same inputs. Calculate it once and save the result.

Diff Detail

Event Timeline

Herald added a project: Restricted Project. · View Herald Transcript
Herald added a subscriber: hiraditya. · View Herald Transcript
nickdesaulniers requested review of this revision.Jul 13 2023, 2:33 PM
Herald added a project: Restricted Project. · View Herald TranscriptJul 13 2023, 2:33 PM

LGTM, it seems that findMatInsertPt is somewhat complex and avoiding the recomputation is nice.

MaskRay accepted this revision.Jul 13 2023, 3:37 PM
This revision is now accepted and ready to land.Jul 13 2023, 3:37 PM