IR: Refactoring and introduction of explicitly names "statement nodes"#656
Open
IR: Refactoring and introduction of explicitly names "statement nodes"#656
Conversation
|
Documentation for this branch can be viewed at https://sites.ecmwf.int/docs/loki/656/index.html |
9f21857 to
7096f5e
Compare
This was a misnomer all along, and now allows for better specialisation.
660ab00 to
cf50b27
Compare
cf50b27 to
c705e00
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #656 +/- ##
==========================================
- Coverage 96.39% 96.38% -0.02%
==========================================
Files 266 271 +5
Lines 46418 46567 +149
==========================================
+ Hits 44745 44883 +138
- Misses 1673 1684 +11
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
51a2cda to
da12fe7
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Note: This PR technically introduces an externally API-changing change, as it renames
ir.Intrinsic->ir.GenericStmtThis PR refactors the
loki.ir.nodessource into a dedicated sub-package and introduces a new set of statement nodes that all inherit fromloki.ir.nodes.GenericStmt. These replace previousir.Intrinsicnodes (a misnomer from the early days 😉 ), which in turn allows us to refer to specific statement nodes explicitly by type (eg.ir.ImplicitStmtorir.ContainsStmt). It is worth pointing out that I've only specialisedCONTAINS,IMPLICIT,CYCLE,RETURN,GO TO,PUBLIC,PRIVATEthus far, but others could follow.Pleas note also that the latter two now exist as dedicated node types, but I've not changed (yet) the internal mechanics of the
Modulethat use this information.In some more detail:
dataclass_stricttoloki.toolsloki.ir.nodesinto sub-package with sources forabstract_nodes,internal_nodesandleaf_nodesloki.ir.Intrinsic=>loki.ir.GenericStmtstmt_nodestoloki.ir.nodesand implementedImplicitStmt,ContainsStmt,ReturnStmt,CycleStmt,GotoStmt,PrivateStmtandPublicStmtir.nodes.teststo capture new node types and avoid JIT