Origen-SDK / o2

MIT License
4 stars 0 forks source link

STIL - ignore include statements, in-line loop comments, #208

Closed rlaj closed 1 month ago

rlaj commented 1 month ago

This PR includes two updates (in addition to merging updates from master branch):

  1. New function to parse STIL into AST that ignores include statements

  2. Loop comments - comments on loop line are now in node that is child of loop node

EXAMPLE STIL:

  Loop 5    { V { group1=0p11T;  } } // vecLine:6, testCycle:6
  // COMMENT
  Loop 3    { V { group1=0p10t;  } } // vecLine:7, testCycle:11
  // COMMENT

PREVIOUS:

        Loop(5)
            Vector
                CyclizedData
                    SigRefExpr
                        String("group1")
                    Data("0p11T")
        Comment("// vecLine:6, testCycle:6")
        Comment("// COMMENT")
        Loop(3)
            Vector
                CyclizedData
                    SigRefExpr
                        String("group1")
                    Data("0p10t")
        Comment("// vecLine:7, testCycle:11")
        Comment("// COMMENT")

UPDATED:

        Loop(5)
            Vector
                CyclizedData
                    SigRefExpr
                        String("group1")
                    Data("0p11T")
            Comment("// vecLine:6, testCycle:6")
        Comment("// COMMENT")
        Loop(3)
            Vector
                CyclizedData
                    SigRefExpr
                        String("group1")
                    Data("0p10t")
            Comment("// vecLine:7, testCycle:11")
        Comment("// COMMENT")
ginty commented 1 month ago

LGTM, but not really an AMD-special, so should the PR not be to the master branch and then we can later merge that into AMD?

rlaj commented 1 month ago

Yeah, was debating it and I guess I chose poorly, lol. Will move it over to master.