This is an archive of the discontinued LLVM Phabricator instance.

[MemCpyOpt] precommit tests to add single-BB stack-move optimization (NFC)
ClosedPublic

Authored by khei4 on Jun 6 2023, 8:13 AM.

Details

Summary

migration from @pcwalton 's stack-move optimization only focused on single BB cases.
original patch: https://reviews.llvm.org/D140089
functional patch: https://reviews.llvm.org/D153453

Diff Detail

Event Timeline

khei4 created this revision.Jun 6 2023, 8:13 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 6 2023, 8:13 AM
khei4 requested review of this revision.Jun 6 2023, 8:13 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 6 2023, 8:13 AM
khei4 edited the summary of this revision. (Show Details)Jun 6 2023, 8:15 AM
khei4 retitled this revision from (WIP) [MemCpyOpt] precommit tes t to add inter-BB stack-move optimization to (WIP) [MemCpyOpt] precommit tests to add inter-BB stack-move optimization.Jun 6 2023, 8:23 AM
khei4 edited the summary of this revision. (Show Details)
khei4 updated this revision to Diff 534612.Jun 26 2023, 9:42 AM

add the case to write on dest before memcpy.
need to specify the expected transformation in liveness property.

khei4 updated this revision to Diff 538354.Jul 8 2023, 4:42 AM

add

  • mod on alias( TODO: but need to be changed to on src ptr)
  • inalloca

TODO: exhaustive mod/ref after copy

khei4 retitled this revision from (WIP) [MemCpyOpt] precommit tests to add inter-BB stack-move optimization to (WIP) [MemCpyOpt] precommit tests to add single-BB stack-move optimization.Jul 8 2023, 10:20 PM
khei4 edited the summary of this revision. (Show Details)
khei4 added reviewers: nikic, pcwalton.
khei4 added a subscriber: pcwalton.
khei4 updated this revision to Diff 538402.Jul 8 2023, 10:23 PM
khei4 retitled this revision from (WIP) [MemCpyOpt] precommit tests to add single-BB stack-move optimization to [MemCpyOpt] precommit tests to add single-BB stack-move optimization (NFC).

I think it's now worth to be review :)

  • add partial lifetime test
  • mod/ref exhaustive tests before/after copy
  • insert newlines
khei4 updated this revision to Diff 538915.Jul 10 2023, 10:15 PM
  • add tests
    • dest ref before copy
    • no lifetime stack move
  • rebase
khei4 updated this revision to Diff 539032.Jul 11 2023, 5:18 AM
  • drop all noundef attributes
  • fix the alignments
  • fix typo, missing tail
nikic added a comment.Jul 11 2023, 7:45 AM

We should have a test where the uses are not in the entry block (won't fold right now, but just to check it doesn't crash...)

khei4 updated this revision to Diff 539831.Jul 12 2023, 7:54 PM
  • add
    • branched case
    • loop case

to see multi-bb behavior

This revision was not accepted when it landed; it landed in state Needs Review.Jul 12 2023, 10:58 PM
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.