Skip to content
Snippets Groups Projects

Refactor Field Modelling

Merged Frederik Hennig requested to merge fhennig/field-buffers into v2.0-dev
All threads resolved!

This MR introduces a significant refactoring of the backend handling of fields. This comprises several parts:

Symbol Properties

  • Introduce a system of symbol properties used to add arbitrary information to symbols
  • Remove subclasses for field-associated symbols
  • Introduce properties for marking field shape, stride, and pointer symbols
  • Refactor kernel parameters to hold symbol properties; remove field-specific KernelParameter subclasses

Field Buffers

  • Rename PsLinearizedArray to PsBuffer
  • move PsBuffer and PsSymbol to module backend.memory
  • Adapt PsBuffer constructor to take all its pointer, shape and stride as PsSymbol or PsConstant

Buffers in the AST

  • Replace PsArrayAccess by PsBufferAcc; PsBufferAcc takes an nd index tuple instead of a linearized index
  • Adapt freeze and typification to the above
  • Introduce LowerToC transformation pass which lowers buffer accesses to raw memory accesses
  • Subsume EraseAnonymousStructs into LowerToC

Kernel Translation

  • Add LowerToC pass and late canonicalization and constant folding passes to the create_kernel pipeline

Bugfixes

A number of bugs revealed during development are being fixed:

  • clone() on expression nodes used to forget the nodes' data type; now keeps it
  • RHS expression in array declarations was not assigned a data type if the type was dictated by the LHS

Closes #101 (closed)

Continues work from !408 (merged)

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • In case the printer encounters a PsBuffferAcc, an error message pointing to the LowerToC pass would be helpful.

  • Daniel Bauer approved this merge request

    approved this merge request

  • added 1 commit

    Compare with previous version

  • Frederik Hennig resolved all threads

    resolved all threads

  • Frederik Hennig enabled an automatic merge when the pipeline for a0990a9e succeeds

    enabled an automatic merge when the pipeline for a0990a9e succeeds

  • mentioned in commit a027eaf1

  • Please register or sign in to reply
    Loading