It's logically nicer to do this transformation over the AST, as it removes code that needs to be done in AST lowering to Metal. However, this phase takes ~1.2ms on compute_boids, and it's trivial to emit what this phase does in metal lowering. So we should just do that instead to gain some minor perf.
Created attachment 375640 [details] patch
Comment on attachment 375640 [details] patch r=me Doesn't this also make synthesizeConstructors unnecessary? Since these constructors were only used in this pass I think.
(In reply to Robin Morisset from comment #2) > Comment on attachment 375640 [details] > patch > > r=me > Doesn't this also make synthesizeConstructors unnecessary? Since these > constructors were only used in this pass I think. Not quite, as user code can call these. But as Robin and I discussed offline, we could change this to not auto generate such things. However, I'll leave this for a future change after we discuss what to do.
Comment on attachment 375640 [details] patch Clearing flags on attachment: 375640 Committed r248310: <https://trac.webkit.org/changeset/248310>
All reviewed patches have been landed. Closing bug.
<rdar://problem/54001035>