Skip to content
Snippets Groups Projects

SROA read chains

Merged Aaron Councilman requested to merge sroa-read-chains into main

Resolves #16 (closed). Handles mixed index types in reads and writes and also handles reads of products out of non-product types (e.g. a read from an array of products) and writes of products into non-product types (e.g. writing into an array of products).

  • For reads with mixed indices we split the read into a sequence of reads where each read either has only field indices or non-field indices. Then, the reads with field indices are handled by the rest of the SROA algorithm and the reads over non-field-indices are not (though if they produce product values, they are handled as described below).
  • For writes with mixed indices we split it into two writes where the first write contains any initial fields (i.e. a write to [field(0), selection(i), ...] is split into writes to [field(0)] and [selection(i), ...] while a write to [selection(i), field(0), ...] is unchanged) and the other write contains all other indices (it therefore always is writing into some non-product collection. Doing this involves also inserting a read for the initial fields and that read is also fed to the rest of SROA along with the write to the initial fields.
  • For reads from non-product collections that produce products, we insert reads of all (leaf) fields of that product and add them to the node list so that SROA can break up uses of the read (though the resulting code still has a read, both the non-product read and the read for the individual fields). Note that we may want to run CRC following SROA to collapse the resulting read chain before codegen.
  • For writes of products into non-products, we write each field of the product into the collection individually (which involves inserting reads of the product, which are then eliminated by the rest of SROA).

I've left the default pass order the same, but did test this with removing the early SLF pass.

Merge request reports

Pipeline #201145 passed

Pipeline passed for db1c95c5 on sroa-read-chains

Approved by

Merged by Aaron CouncilmanAaron Councilman 2 months ago (Jan 24, 2025 3:51am UTC)

Merge details

  • Changes merged into main with 254bea95 (commits were squashed).
  • Deleted the source branch.

Pipeline #201148 passed

Pipeline passed for 254bea95 on main

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
Please register or sign in to reply
Loading