Description[turbofan] Introduce node regions for protection from scheduling.
This CL re-purposes ValueEffect and Finish as delimiters for regions
that are scheduled atomically (renamed to BeginRegion, FinishRegion).
The BeginRegion node takes and produces an effect. For the uses that do
not care about the placement in the effect chain, it is ok to feed
graph->start() as an effect input.
The FinishRegion takes a value and an effect and produces a value and
an effect. It is important that any value or effect produced inside the
region is not used outside the region. The FinishRegion node is the only
way to smuggle an effect and a value out.
At the moment, this does not support control flow inside the region. Control flow would be hard.
During scheduling we do some sanity check, but the checks are not exhaustive. Here is what we check:
- the effect chain between begin and finish is linear (no splitting,
single effect input and output).
- any value produced is consumed by the FinishRegion node.
- no control flow outputs.
Committed: https://crrev.com/59c616ccd7f9d707f6129c5f726aa652e7bc5f22
Cr-Commit-Position: refs/heads/master@{#31265}
Patch Set 1 #Patch Set 2 : No control output inside the region check #Patch Set 3 : Tweaks #
Total comments: 11
Patch Set 4 : Address review comments. #
Total comments: 2
Patch Set 5 : Move RelaxControls #
Messages
Total messages: 15 (6 generated)
|