Commit Graph

84 Commits

Author SHA1 Message Date
Greg Daniel
f15a598ab0 Revert "Reland "Create a basic IRNode pooling system.""
This reverts commit 5b09e6a007.

Reason for revert: breaking g3

Original change's description:
> Reland "Create a basic IRNode pooling system."
>
> This is a reland of e16eca95f5
>
> Original change's description:
> > Create a basic IRNode pooling system.
> >
> > Allocations are redirected by overriding `operator new` and `operator
> > delete` on the IRNode class. This allows us to use our existing
> > `unique_ptr` and `make_unique` calls as-is. The Pool class is simple;
> > it holds a fixed number of nodes and recycles them as they are returned.
> >
> > A fixed pool size of 2000 nodes was chosen. That is large enough to hold
> > the contents of `sksl_large` during compilation, but it can be
> > overflowed by very large shaders, or if multiple programs are converted
> > at the same time. Exhausting the pool is not a problem; if this happens,
> > additional nodes will be allocated via the system allocator as usual.
> > More elaborate schemes are possible but might not add a lot of value.
> >
> > Thread safety is accomplished by placing the pool in a `thread_local`
> > static during a Program's creation and destruction; the pool is freed
> > when the program is destroyed. One important consequence of this
> > strategy is that a program must free every node that it allocated during
> > its creation, or else the node will be leaked. In debug, leaking a node
> > will be detected and causes a DEBUGFAIL. In release, the pool will be
> > freed despite having a live node in it, and if that node is later freed,
> > that pointer will be passed to the system `free` (which is likely to
> > cause a crash).
> >
> > In this CL, iOS does not support pooling, since support for
> > `thread_local` was only added on iOS 9. This is fixed in the followup
> > CL, http://review.skia.org/328837, which uses pthread keys on iOS.
> >
> > Nanobench shows ~15% improvement:
> >   (last week) http://screen/5CNBhTaZApcDA8h
> >       (today) http://screen/8ti5Rymvf6LUs8i
> >
> > Change-Id: I559de73606ee1be54e5eae7f82129dc928a63e3c
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/326876
> > Commit-Queue: John Stiles <johnstiles@google.com>
> > Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
> > Auto-Submit: John Stiles <johnstiles@google.com>
>
> Change-Id: I114971e8e7ac0fabaf26216ae8813eeeaad0d4a2
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/329086
> Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
> Commit-Queue: John Stiles <johnstiles@google.com>

TBR=brianosman@google.com,ethannicholas@google.com,johnstiles@google.com

Change-Id: Ie77a23366f2ba52fcbb0a751d11ca2792790a30c
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/329165
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2020-10-22 14:07:45 +00:00
John Stiles
5b09e6a007 Reland "Create a basic IRNode pooling system."
This is a reland of e16eca95f5

Original change's description:
> Create a basic IRNode pooling system.
>
> Allocations are redirected by overriding `operator new` and `operator
> delete` on the IRNode class. This allows us to use our existing
> `unique_ptr` and `make_unique` calls as-is. The Pool class is simple;
> it holds a fixed number of nodes and recycles them as they are returned.
>
> A fixed pool size of 2000 nodes was chosen. That is large enough to hold
> the contents of `sksl_large` during compilation, but it can be
> overflowed by very large shaders, or if multiple programs are converted
> at the same time. Exhausting the pool is not a problem; if this happens,
> additional nodes will be allocated via the system allocator as usual.
> More elaborate schemes are possible but might not add a lot of value.
>
> Thread safety is accomplished by placing the pool in a `thread_local`
> static during a Program's creation and destruction; the pool is freed
> when the program is destroyed. One important consequence of this
> strategy is that a program must free every node that it allocated during
> its creation, or else the node will be leaked. In debug, leaking a node
> will be detected and causes a DEBUGFAIL. In release, the pool will be
> freed despite having a live node in it, and if that node is later freed,
> that pointer will be passed to the system `free` (which is likely to
> cause a crash).
>
> In this CL, iOS does not support pooling, since support for
> `thread_local` was only added on iOS 9. This is fixed in the followup
> CL, http://review.skia.org/328837, which uses pthread keys on iOS.
>
> Nanobench shows ~15% improvement:
>   (last week) http://screen/5CNBhTaZApcDA8h
>       (today) http://screen/8ti5Rymvf6LUs8i
>
> Change-Id: I559de73606ee1be54e5eae7f82129dc928a63e3c
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/326876
> Commit-Queue: John Stiles <johnstiles@google.com>
> Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
> Auto-Submit: John Stiles <johnstiles@google.com>

Change-Id: I114971e8e7ac0fabaf26216ae8813eeeaad0d4a2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/329086
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2020-10-22 02:38:18 +00:00
John Stiles
fb330c2b6b Revert "Create a basic IRNode pooling system."
This reverts commit e16eca95f5.

Reason for revert: ASAN error on fuzzer

https://status.skia.org/logs/snBeMRUkDrwDYbnm2SAG/7ad38736-d579-4e94-bc10-87c002f3f7d6/fd7b6ea1-5d36-4612-85d1-88462a5271f7

Original change's description:
> Create a basic IRNode pooling system.
>
> Allocations are redirected by overriding `operator new` and `operator
> delete` on the IRNode class. This allows us to use our existing
> `unique_ptr` and `make_unique` calls as-is. The Pool class is simple;
> it holds a fixed number of nodes and recycles them as they are returned.
>
> A fixed pool size of 2000 nodes was chosen. That is large enough to hold
> the contents of `sksl_large` during compilation, but it can be
> overflowed by very large shaders, or if multiple programs are converted
> at the same time. Exhausting the pool is not a problem; if this happens,
> additional nodes will be allocated via the system allocator as usual.
> More elaborate schemes are possible but might not add a lot of value.
>
> Thread safety is accomplished by placing the pool in a `thread_local`
> static during a Program's creation and destruction; the pool is freed
> when the program is destroyed. One important consequence of this
> strategy is that a program must free every node that it allocated during
> its creation, or else the node will be leaked. In debug, leaking a node
> will be detected and causes a DEBUGFAIL. In release, the pool will be
> freed despite having a live node in it, and if that node is later freed,
> that pointer will be passed to the system `free` (which is likely to
> cause a crash).
>
> In this CL, iOS does not support pooling, since support for
> `thread_local` was only added on iOS 9. This is fixed in the followup
> CL, http://review.skia.org/328837, which uses pthread keys on iOS.
>
> Nanobench shows ~15% improvement:
>   (last week) http://screen/5CNBhTaZApcDA8h
>       (today) http://screen/8ti5Rymvf6LUs8i
>
> Change-Id: I559de73606ee1be54e5eae7f82129dc928a63e3c
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/326876
> Commit-Queue: John Stiles <johnstiles@google.com>
> Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
> Auto-Submit: John Stiles <johnstiles@google.com>

TBR=brianosman@google.com,ethannicholas@google.com,johnstiles@google.com

Change-Id: I625d95a14057727b297c0bfc5b98bcd78ad8572c
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/328906
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2020-10-21 15:50:13 +00:00
John Stiles
e16eca95f5 Create a basic IRNode pooling system.
Allocations are redirected by overriding `operator new` and `operator
delete` on the IRNode class. This allows us to use our existing
`unique_ptr` and `make_unique` calls as-is. The Pool class is simple;
it holds a fixed number of nodes and recycles them as they are returned.

A fixed pool size of 2000 nodes was chosen. That is large enough to hold
the contents of `sksl_large` during compilation, but it can be
overflowed by very large shaders, or if multiple programs are converted
at the same time. Exhausting the pool is not a problem; if this happens,
additional nodes will be allocated via the system allocator as usual.
More elaborate schemes are possible but might not add a lot of value.

Thread safety is accomplished by placing the pool in a `thread_local`
static during a Program's creation and destruction; the pool is freed
when the program is destroyed. One important consequence of this
strategy is that a program must free every node that it allocated during
its creation, or else the node will be leaked. In debug, leaking a node
will be detected and causes a DEBUGFAIL. In release, the pool will be
freed despite having a live node in it, and if that node is later freed,
that pointer will be passed to the system `free` (which is likely to
cause a crash).

In this CL, iOS does not support pooling, since support for
`thread_local` was only added on iOS 9. This is fixed in the followup
CL, http://review.skia.org/328837, which uses pthread keys on iOS.

Nanobench shows ~15% improvement:
  (last week) http://screen/5CNBhTaZApcDA8h
      (today) http://screen/8ti5Rymvf6LUs8i

Change-Id: I559de73606ee1be54e5eae7f82129dc928a63e3c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/326876
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2020-10-21 14:41:02 +00:00
John Stiles
1c823674d9 Clear the builtin status of SkSL nodes when they are cloned.
This has a slight ripple effect into Enum, as it was using the builtin
status as an indicator that the enum was shared with C++ code. This now
has a dedicated bool flag.

Change-Id: Id03efa902546775666acd031e6d57123e02b6c6e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/328381
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2020-10-20 15:53:41 +00:00
John Stiles
607d36b829 Add a fBuiltin flag to FunctionDefinition.
This is useful because we can clone FunctionDefinitions without cloning
the matching FunctionDeclaration. The FunctionDeclaration will remain a
builtin, but the definition should be a malleable clone.

Change-Id: Icfc1e0855fb8fcd6914a5d657f5098986fcf19ea
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/328396
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2020-10-20 14:21:01 +00:00
Brian Osman
2e25ff436a Directly compute call counts, rather than mutating state
This causes a ~4% regression on sksl_large, but some of that
can be bought back in two ways:

1) Removing (now unnecessary) cloning of program elements
2) Hoisting the new analysis passes, with (nontrivial)
   logic to update/maintain the call counts as we edit IR.

Also, this fixes bugs where we were emitting functions that
had "calls" from no-longer called functions.

Bug: skia:10776
Change-Id: I4f8c29957be2e4233a883c9a1125f363b82ee40c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/327198
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
2020-10-19 16:08:39 +00:00
Ethan Nicholas
eaf4788a75 moved SkSL InterfaceBlock data into IRNode
Change-Id: If85369d978e395502b2169d605c2513a9086b57e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/326916
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
2020-10-15 15:20:06 +00:00
Ethan Nicholas
0a5d096eeb moved SkSL FunctionDefinition data into IRNode
Change-Id: Ia828de0793ee66301ba315f4593b4d7d69222b4e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/326717
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2020-10-14 18:53:41 +00:00
Ethan Nicholas
c51f33e784 moved SkSL VarDeclarations data into IRNode
Change-Id: I03bdef43c79bc3c997f9a9a6aa8fbb1a7194943a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/326437
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2020-10-14 17:37:11 +00:00
Brian Osman
5bf3e20f3a Remove setModifiersHandle, restore const-ness to Symbols
Change-Id: I40ceb5cab0473c08c92fbb6aa9afad6173c0fb37
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/325624
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2020-10-13 17:06:10 +00:00
John Stiles
8f2a0cfdf8 Convert statement arrays from std::vector to SkSTArray.
This will help us avoid allocations for arrays of statements.

Currently, this is a wash in Nanobench (~0% change). In the near
future, we expect to collapse the expression array and statement array
into a single hybrid array, and this helps bring us closer to that end
goal.

Change-Id: Id146907352799c41b568090ab65e454247b294c8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/325625
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2020-10-13 17:06:01 +00:00
John Stiles
8e3b6be33d Convert expression arrays from std::vector to SkSTArray.
This will help us avoid allocations for simple expressions.

Nanobench shows ~5% improvement with an array size of 2:
http://screen/8oDEY7hjrhY8C6k

Other array sizes will show different levels of improvement, but I
haven't done an exhaustive trial. (2 was noticeably better than 1.)

Change-Id: I005a7896a0db83df4e3c2d3c0fa3321203f8a0b3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/325861
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2020-10-13 15:56:41 +00:00
Ethan Nicholas
077050b019 moved SkSL ModifiersDeclaration data into IRNode
Change-Id: Iebe59b32a965e383d2b032258d7731645e0bd1a4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/325622
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
2020-10-13 15:22:26 +00:00
Ethan Nicholas
48b6df4bc0 moved SkSL Section data into IRNode
Change-Id: I255eb58fc4e6e3b08dfd8e962ee8fe22144d4c36
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/325859
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2020-10-13 13:36:05 +00:00
Ethan Nicholas
6b4d5819af moved SkSL Swizzle data into IRNode
Change-Id: Idb10db5cc4fff4f10ce84c5ae021e4c0e7bfc49b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/325662
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2020-10-12 21:18:43 +00:00
Ethan Nicholas
5194a7018a moved SkSL FunctionReference/TypeReference data into IRNode
Change-Id: Ie3982e22c764455f3ae11472f6d1cacf4e9f64ba
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/325458
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
2020-10-12 15:54:13 +00:00
Ethan Nicholas
ceb6214a55 moved SkSL InlineMarker and UnresolvedFunction data into IRNode
Change-Id: I05b940c69b7756d41277626fc3eef06003d133c1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/324886
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2020-10-12 14:29:37 +00:00
Ethan Nicholas
7a95b20733 moved SkSL FieldAccess data into IRNode
Change-Id: Ib2fd8c246799a1bde566395080fe6617754644f9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/324635
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2020-10-09 16:58:33 +00:00
Ethan Nicholas
453f67ff0a SkSL enum changes
Changed a couple of SkSL enums to enum classes and rearranged things to
make their storage within IRNode type safe.

Change-Id: I6509d027d79161c1a09473e90943aae061583f20
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/324624
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2020-10-09 15:54:13 +00:00
Ethan Nicholas
e17b050196 add missing <atomic> include
TBR=brianosman@google.com, johnstiles@google.com

Change-Id: I03f771b39acbeba3d25da97d759ad2f9a8f6f5d3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/324123
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2020-10-08 19:43:12 +00:00
Ethan Nicholas
01ec7e8ec7 moved SkSL Setting data into IRNode and fixed its dehydration/rehydration
Change-Id: Ide129334989890961a46681129672682cf826915
Bug: skia:10819
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/323978
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
2020-10-08 17:23:47 +00:00
Ethan Nicholas
ed84b73797 moved SkSL FunctionDeclaration data into IRNode
Change-Id: I97a59563914c4f75f8cfdc2bd5a9ae430de9bb3c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/323881
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2020-10-08 17:10:12 +00:00
Ethan Nicholas
7868692b9d Moved SkSL VariableReference data into IRNode
As part of this change, broke up IRNode::type() and moved it into
virtual functions where it belongs.

Change-Id: Ib19e99f2e8392e34a20a1887b980225ac4b793f7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/323884
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2020-10-08 15:59:08 +00:00
Ethan Nicholas
8c44ecae4f moved SkSL If data into IRNode
Change-Id: Icccc14019ae5c87a09c8439fa1b1ae324b8e32bf
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/323777
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2020-10-08 14:05:38 +00:00
Ethan Nicholas
1e9f7f36f7 changed various SkSL structs into classes
The goal is to have all of the IR structs be classes when the
rearchitecture is complete. Some of these should have been changed in
earlier CLs, and some of them never contained any data in the first
place and thus won't be affected by the rearchitecture.

Change-Id: Id5a3cebffd59a4c43b79f2195b50106ede7c2f87
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/323882
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2020-10-08 13:53:18 +00:00
Ethan Nicholas
041fd0ad7d moved SkSL Variable data into IRNode
Change-Id: I53af66c1b65971c204ac7c515e0d0e39481b015d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/323097
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2020-10-07 21:29:12 +00:00
John Stiles
49a547f7e2 Separate out SymbolTable aliases from regular Symbols.
SymbolTable::addAlias can be used to create a Symbol that's an alias for
an existing symbol, but uses a different name. (e.g. in Runtime Effects,
a `fragmentProcessor` is a `shader` and `float4` is also `vec4`.)

SymbolTable::addWithoutOwnership will now assert if an attempt is made
to add a Symbol with the wrong name. In a followup CL, the name argument
will be removed entirely and it will simply use the Symbol's name.

Change-Id: I9aee7717e2600a6d84ebe4c3ab7fca40229faa5d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/323106
Commit-Queue: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2020-10-06 21:00:04 +00:00
Ethan Nicholas
0dec9927af moved SkSL FunctionCall data into IRNode
Change-Id: Iefa82eccbba518cbd741b4415ea6340c66eabd9d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/321465
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2020-10-05 20:41:26 +00:00
Ethan Nicholas
0d31ed5068 moved SkSL ForStatement data into IRNode
Change-Id: I87039ae982c7f5b6ed7a4cc236470f049606c45e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/321468
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
2020-10-05 19:27:38 +00:00
Ethan Nicholas
e2c4999ec3 Revert "Revert "moved SkSL Field data into IRNode""
This reverts commit 58384ad0a7.

Change-Id: I18fcf623675cd97224f99c048fd691b4799d2479
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/322396
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2020-10-05 17:29:18 +00:00
Brian Osman
58384ad0a7 Revert "moved SkSL Field data into IRNode"
This reverts commit 556b8bef61.

Reason for revert: TSAN (& ASAN?) bots unhappy

Original change's description:
> moved SkSL Field data into IRNode
>
> Change-Id: Ib119035466a9d5dbd870e5b4e22f45f3b56455c4
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/321120
> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
> Reviewed-by: John Stiles <johnstiles@google.com>

TBR=brianosman@google.com,ethannicholas@google.com,johnstiles@google.com

Change-Id: Ibc6b41c8cfc13d1d7fafc43ff643483da5a5f368
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/321980
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2020-10-02 22:15:37 +00:00
Ethan Nicholas
556b8bef61 moved SkSL Field data into IRNode
Change-Id: Ib119035466a9d5dbd870e5b4e22f45f3b56455c4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/321120
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
2020-10-02 21:54:25 +00:00
Ethan Nicholas
a3f22f1704 Revert "Revert "moved SkSL FloatLiteral data into IRNode""
This reverts commit a0c82f08df.

Change-Id: Ic2e93591c64992ec22e477bd0975d71954bef1c6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/321469
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2020-10-02 19:18:59 +00:00
Brian Osman
a0c82f08df Revert "moved SkSL FloatLiteral data into IRNode"
This reverts commit 135e237656.

No-Tree-Checks: true
Change-Id: I7e9dd2148f7b2a8dee1e49a9a9cc593e0d7ceb6e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/321460
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2020-10-01 13:37:42 +00:00
Ethan Nicholas
6e86ec95f6 moved SkSL ExternalFunctionCall's data into IRNode
Change-Id: Ie953b6486ee2efb4795303f91c154881e8e59dcb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/320767
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
2020-09-30 19:14:23 +00:00
Ethan Nicholas
efb09e2caf moved SkSL Extension data into IRNode
Change-Id: I6689bfc78e407ddd840d81ea56c844da92f3a65a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/320724
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
2020-09-30 15:16:03 +00:00
Ethan Nicholas
d83ded8ff4 Revert "Revert "moved SkSL Enum data into IRNode""
This reverts commit ff22910286.

Change-Id: I86619819aae169a2cb8d59ad7ccecf26423f2aa9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/320764
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Auto-Submit: Ethan Nicholas <ethannicholas@google.com>
2020-09-30 00:08:08 +00:00
John Stiles
ff22910286 Revert "moved SkSL Enum data into IRNode"
This reverts commit 98503f1c57.

Reason for revert: 

../../src/sksl/SkSLDehydrator.cpp:513:28: error: no member named 'fTypeName' in 'SkSL::Enum'
            this->write(en.fTypeName);
                        ~~ ^
../../src/sksl/SkSLDehydrator.cpp:514:56: error: no member named 'fSymbols' in 'SkSL::Enum'
            AutoDehydratorSymbolTable symbols(this, en.fSymbols);
                                                    ~~ ^
../../src/sksl/SkSLDehydrator.cpp:515:62: error: no member named 'fSymbols' in 'SkSL::Enum'
            for (const std::unique_ptr<const Symbol>& s : en.fSymbols->fOwnedSymbols) {
                                                          ~~ ^



Original change's description:
> moved SkSL Enum data into IRNode
>
> Change-Id: I0de52d252715b5f4e10c26ebca3ea1a4f728ea2e
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/320637
> Reviewed-by: Brian Osman <brianosman@google.com>
> Reviewed-by: John Stiles <johnstiles@google.com>
> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>

TBR=brianosman@google.com,ethannicholas@google.com,johnstiles@google.com

Change-Id: I2b78dd5acf4277765b36776a8fb8e435f8b18861
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/320759
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2020-09-29 20:55:59 +00:00
Ethan Nicholas
98503f1c57 moved SkSL Enum data into IRNode
Change-Id: I0de52d252715b5f4e10c26ebca3ea1a4f728ea2e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/320637
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2020-09-29 20:43:39 +00:00
Ethan Nicholas
135e237656 moved SkSL FloatLiteral data into IRNode
Change-Id: Ic39e3e8169218cfdd0e1eee274858cc421abec7e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/320221
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
2020-09-29 16:49:15 +00:00
Ethan Nicholas
e96cdd18ac moved SkSL IntLiteral data into IRNode
Change-Id: I3c6e968af6eba32eae1f1402f7603f27e949c638
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/320067
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Auto-Submit: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
2020-09-28 21:06:43 +00:00
Ethan Nicholas
59d660c075 Revert "Revert "moved SkSL BoolLiteral data into IRNode""
This reverts commit 5648572f4a.

Change-Id: If9b1f46f4d4d94beca6953d0fef3b8d79c88572d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/320059
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2020-09-28 14:13:32 +00:00
Mike Klein
5648572f4a Revert "moved SkSL BoolLiteral data into IRNode"
This reverts commit a05d27b170.

Reason for revert: Google3 roll,

third_party/skia/HEAD/src/sksl/SkSLTestRehydrator.cpp:311:15: error: no type named 'Dehydrator' in namespace 'SkSL'
        SkSL::Dehydrator dehydrator;

Original change's description:
> moved SkSL BoolLiteral data into IRNode
>
> Change-Id: I177b6daf4d6cb024ba20264ab01d0aa68e768a6d
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/319782
> Reviewed-by: John Stiles <johnstiles@google.com>
> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>

TBR=brianosman@google.com,ethannicholas@google.com,johnstiles@google.com

Change-Id: I76bcdc7ef914448b439df81cd382066980e1251e
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/320017
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2020-09-26 14:49:04 +00:00
Ethan Nicholas
a05d27b170 moved SkSL BoolLiteral data into IRNode
Change-Id: I177b6daf4d6cb024ba20264ab01d0aa68e768a6d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/319782
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2020-09-25 22:57:20 +00:00
Ethan Nicholas
7bd6043029 moved SkSL Block's data into IRNode
Change-Id: Id1066c7c2aeffce47fcd6823cb01a58b52e450c2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/319676
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
2020-09-25 19:33:19 +00:00
Ethan Nicholas
c8d9c8ee34 Revert "Revert "moved BinaryExpression's data into IRNode""
This reverts commit b61c3a9a01.

Change-Id: I42d93bdc6455c8ef941a6cbe1339df2ba916bb3c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/318697
Auto-Submit: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2020-09-24 16:34:23 +00:00
Ethan Nicholas
bf66ffbbd4 Reland "Revert "moved BinaryExpression's data into IRNode""
This reverts commit 1d3e0e0054.

Reason for revert: possibly causing https://task-scheduler.skia.org/task/F1DoniJAddPuEkH9ETTE

Original change's description:
> Revert "Revert "moved BinaryExpression's data into IRNode""
> 
> This reverts commit b61c3a9a01.
> 
> Change-Id: I4689e1f4977fab3233ff492cee06fbc301b5c689
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/317386
> Reviewed-by: John Stiles <johnstiles@google.com>
> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>

TBR=brianosman@google.com,ethannicholas@google.com,johnstiles@google.com

# Not skipping CQ checks because this is a reland.

Change-Id: Id0f3f211f09fbf31b626c648ed141fc6154a450c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/317395
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2020-09-16 22:39:08 +00:00
Ethan Nicholas
1d3e0e0054 Revert "Revert "moved BinaryExpression's data into IRNode""
This reverts commit b61c3a9a01.

Change-Id: I4689e1f4977fab3233ff492cee06fbc301b5c689
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/317386
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2020-09-16 20:01:13 +00:00
Ethan Nicholas
b61c3a9a01 Revert "moved BinaryExpression's data into IRNode"
This reverts commit efc8797880.

Reason for revert: breakage due to std::max initializer list

Original change's description:
> moved BinaryExpression's data into IRNode
> 
> This is another step in the process of merging the various IRNodes' data
> into the base class.
> 
> Change-Id: Ide39c240e6178e23bb6fe317dd56addf2ffefcbb
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/317102
> Commit-Queue: John Stiles <johnstiles@google.com>
> Reviewed-by: John Stiles <johnstiles@google.com>

TBR=brianosman@google.com,ethannicholas@google.com,johnstiles@google.com

Change-Id: Ib8ef629ffa0ff8bb0aeddfa4f42b824e79ce72b6
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/317384
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2020-09-16 18:33:29 +00:00