Decouple IonBuilder from the Ion backend
Categories
(Core :: JavaScript Engine: JIT, task, P2)
Tracking
()
People
(Reporter: jandem, Assigned: jandem)
References
(Blocks 1 open bug)
Details
Attachments
(9 files, 1 obsolete file)
(deleted),
text/x-phabricator-request
|
Details | |
(deleted),
text/x-phabricator-request
|
Details | |
(deleted),
text/x-phabricator-request
|
Details | |
(deleted),
text/x-phabricator-request
|
Details | |
(deleted),
text/x-phabricator-request
|
Details | |
(deleted),
text/x-phabricator-request
|
Details | |
(deleted),
text/x-phabricator-request
|
Details | |
(deleted),
text/x-phabricator-request
|
Details | |
(deleted),
text/x-phabricator-request
|
Details |
IonBuilder is used for MIR building but also represents the off-thread compilation job. We should decouple this so IonBuilder is just the MIR builder (stack-allocated) so that we can more easily add a second builder.
There's a similar issue with MIRGenerator: it's IonBuilder's base class (and used for Wasm compilation) and is also used by the backend.
Updated•5 years ago
|
Updated•5 years ago
|
Assignee | ||
Comment 1•5 years ago
|
||
IonBuilder is a better fit for this data. MIRGenerator is used by the backend
and is also used for Wasm compilation and WarpBuilder in the future.
Updated•5 years ago
|
Assignee | ||
Comment 2•5 years ago
|
||
This MIRGenerator flag is not used for inline builders so there's no need to set
it. With later patches in this stack there will be a single MIRGenerator per
compilation so this will become a bit more obvious.
Depends on D62007
Assignee | ||
Comment 3•5 years ago
|
||
For now MIRGenerator and IonBuilder still have the same lifetime, but later
parts will change IonBuilder to a stack-allocated class with a much shorter
lifetime than MIRGenerator.
Some MIRGenerator fields that are accessed frequently by IonBuilder are now
cached in IonBuilder to avoid an extra dereference.
Depends on D62008
Assignee | ||
Comment 4•5 years ago
|
||
We now no longer allocate a new MIRGenerator for each inline builder. This was
pretty confusing because only the outermost one survived and was used by the
backend.
MIRGenerator's CompileInfo field was renamed from info_ to outerInfo_ to make
this a bit clearer.
Depends on D62009
Assignee | ||
Comment 5•5 years ago
|
||
For now IonCompileTask just forwards to IonBuilder, but that will change in a
later patch.
Depends on D62010
Assignee | ||
Comment 6•5 years ago
|
||
This will let us shorten the IonBuilder lifetime later.
Depends on D62011
Assignee | ||
Comment 7•5 years ago
|
||
The pendingEdges_ field no longer has to use Maybe<> because we now always
call IonBuilder's destructor.
Depends on D62012
Assignee | ||
Comment 8•5 years ago
|
||
Depends on D62014
Assignee | ||
Comment 9•5 years ago
|
||
There's some follow-up work left: make stack-allocated IonBuilder scope even shorter and move IonCompileTask out of IonBuilder.h/cpp, but let's get this part done first.
Assignee | ||
Comment 10•5 years ago
|
||
This way we're also guaranteed to get a consistent value per compilation.
Comment 11•5 years ago
|
||
Assignee | ||
Comment 12•5 years ago
|
||
Comment 13•5 years ago
|
||
Comment 14•5 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/146518d1ebf2
https://hg.mozilla.org/mozilla-central/rev/f396891236a0
https://hg.mozilla.org/mozilla-central/rev/c5029fed3987
https://hg.mozilla.org/mozilla-central/rev/854f4d27a3f1
https://hg.mozilla.org/mozilla-central/rev/7b925b0d13e8
https://hg.mozilla.org/mozilla-central/rev/50402c669262
https://hg.mozilla.org/mozilla-central/rev/1bc78d155678
https://hg.mozilla.org/mozilla-central/rev/fb651fbf6aaa
https://hg.mozilla.org/mozilla-central/rev/64c6f3ce6465
https://hg.mozilla.org/mozilla-central/rev/0e498dfd4119
Updated•5 years ago
|
Updated•5 years ago
|
Description
•