Closed Bug 1673553 Opened 4 years ago Closed 4 years ago

Remove IonBuilder and TI

Categories

(Core :: JavaScript Engine: JIT, task, P2)

task

Tracking

()

RESOLVED FIXED
85 Branch
Tracking Status
firefox85 --- fixed
firefox86 --- fixed

People

(Reporter: jandem, Assigned: jandem)

References

(Depends on 1 open bug)

Details

Attachments

(104 files)

(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
(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
(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
(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
(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
(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
(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
(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
(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
(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
(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
(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

The plan is to go ahead with this in the next cycle (Firefox 85), after Warp hits the release channel.

This will unblock a lot of cleanup and optimization work.

Blocks: 1673557

Fortunately most of the tests that used --no-warp now work with Warp. Likely
because we now bailout more on the first execution, similar to the Ion behavior.

Assignee: nobody → jdemooij
Status: NEW → ASSIGNED

A bit counterintuitive because we're keeping Warp and not Ion, but it's easiest
to make this change and later potentially rename the Ion prefs to Warp prefs.

Depends on D96987

Depends on D96988

15 files changed, 26 insertions(+), 21287 deletions(-)

This also marks some methods that are defined in InlineScriptTree-inl.h as inline
to fix a linker error.

The patch stack uses TODO(no-TI) to mark places that need follow-up cleanup.

Depends on D96989

This also removes resultTypeSet_ from MIR instructions.

Depends on D96990

GetAliasedVar and GetImport are no longer marked as JOF_IC and JOF_TYPESET.

Depends on D96991

Depends on D96992

The previous patch removed the TI code from Instance::callImport so we no longer
need the bidirectional link. JS functions always have a JIT entry point.

Depends on D96993

Keywords: leave-open

These patches remove about 28,000 lines of code so far. Mostly on the JIT side. There's still a ton of TI code to remove.

Pushed by jdemooij@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/03b35d575361
part 1 - Fix jit-tests to not rely on --warp and --no-warp. r=iain
https://hg.mozilla.org/integration/autoland/rev/d26e4dd982da
part 2 - Remove Warp shell flags and Treeherder jobs. r=iain,jmaher
https://hg.mozilla.org/integration/autoland/rev/2f491d873cdf
part 3 - Remove Warp browser pref. r=iain,preferences-reviewers
https://hg.mozilla.org/integration/autoland/rev/a6d6dfbdcc2b
part 4 - Remove main IonBuilder code. r=iain
https://hg.mozilla.org/integration/autoland/rev/64dd0e96866f
part 5 - Remove TemporaryTypeSet, HeapTypeSetKey and uses. r=iain
https://hg.mozilla.org/integration/autoland/rev/7a6413cb45c4
part 6 - Remove Baseline type monitor and update ICs. r=iain
https://hg.mozilla.org/integration/autoland/rev/4ec475e94461
part 7 - Remove TI code from JitScript. r=iain
https://hg.mozilla.org/integration/autoland/rev/cb856cdf7a0c
part 8 - Remove WasmInstance/JitScript link. r=lth,iain
Blocks: 1677284

Depends on D97134

ObjectGroup::finalize is now an empty function so define it in the header.

The objectGroupsMallocHeap memory reporter can also be removed.

Depends on D97291

Because this removes a word from ObjectGroup, we have to change ZeroBits in
TenureCountCache::hash from 4 to 3 (for 64-bit platforms) or we get assertion
failures. ObjectGroup is now 40 bytes instead of 48 bytes so bit 4 can be non-zero.

Depends on D97292

The MacroAssembler had some delayed-read-barrier code for this that we no longer
need.

This leaves some empty shells in the TI code that we can sweep up in later patches.

Depends on D97293

Groups are now determined by proto and class so we no longer need to try to
combine them based on property types.

Depends on D97294

Depends on D97295

Depends on D97297

Without TI all groups have unknown properties and aren't using pre-tenuring, so
remove code based on that.

Depends on D97298

At this point ObjectGroup::sweep is a no-op, so remove AutoSweepObjectGroup and
ObjectGroup's generation flag.

Depends on D97299

Depends on D97300

Parts 9-21 have a combined diffstat of:

80 files changed, 341 insertions(+), 8005 deletions(-)

So we're at 35,000+ deleted lines of code.

At this point the core TI code is mostly gone, but there's still a lot of cleanup left around JitScript sweeping, ObjectGroup/singletons. Also some JSOps and MIR instructions are no longer needed...

Regressions: 1677794

Now that we have just one addendum kind, we don't need the abstraction anymore.

Depends on D97301

Also remove now-unused removeDefaultNewGroup and replaceDefaultNewGroup.

Depends on D97435

Depends on D97439

Depends on D97442

Pushed by jdemooij@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/490f4f157ea6
part 9 - Resurrect some IonBuilder comments, move some code from MIRBuilderShared.h to WarpBuilder. r=iain
https://hg.mozilla.org/integration/autoland/rev/9298d2de2813
part 10 - Remove CompilerConstraintList. r=iain
https://hg.mozilla.org/integration/autoland/rev/dbcc16d84227
part 11 - Remove TypeConstraint, DPAConstraintInfo. r=iain
https://hg.mozilla.org/integration/autoland/rev/678cf10d9be3
part 12 - Remove TypeNewScript, PreliminaryObjectArray. r=iain
https://hg.mozilla.org/integration/autoland/rev/d114b0ebe5f0
part 13 - Remove ObjectGroup::propertySet. r=iain
https://hg.mozilla.org/integration/autoland/rev/7e6e7e3e5fed
part 14 - Remove TypeSet. r=iain
https://hg.mozilla.org/integration/autoland/rev/9a53df9a977e
part 15 - Remove CombinePlainObjectPropertyTypes and CombineArrayElementTypes. r=iain
https://hg.mozilla.org/integration/autoland/rev/aa3d200b6f98
part 16 - Remove some allocation site code. r=iain
https://hg.mozilla.org/integration/autoland/rev/d6cdc2a48fa7
part 17 - Remove ObjectGroup interpreted function addendum. r=iain
https://hg.mozilla.org/integration/autoland/rev/66c92d861375
part 18 - Remove some ObjectGroup flags. r=iain
https://hg.mozilla.org/integration/autoland/rev/fc68cf76fcfc
part 19 - Remove more ObjectGroup flags. r=iain
https://hg.mozilla.org/integration/autoland/rev/21a1840ffa4b
part 20 - Remove TI ObjectGroup sweeping. r=iain,jonco
https://hg.mozilla.org/integration/autoland/rev/38d83f497e6b
part 21 - Remove more code. r=iain
Pushed by jdemooij@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/3d4a6e960e75
part 22 - Replace ObjectGroup addendum with just the TypeDescr. r=iain
https://hg.mozilla.org/integration/autoland/rev/11103564a384
part 23 - Remove NEW_GROUP_UNKNOWN flag. r=iain
https://hg.mozilla.org/integration/autoland/rev/8a4458c03edf
part 24 - Remove ObjectGroup::useSingletonForClone. r=iain
https://hg.mozilla.org/integration/autoland/rev/3a3723ac0152
part 25 - Remove JOF_TYPESET and numBytecodeTypeSets. r=tcampbell
https://hg.mozilla.org/integration/autoland/rev/fd704328f3e4
part 26 - Remove PropertyTypeCheckInfo and guardGroupForTypeBarrier. r=iain
https://hg.mozilla.org/integration/autoland/rev/7aed8af44e9c
part 27 - Remove more unused JitScript fields. r=iain
https://hg.mozilla.org/integration/autoland/rev/5c55c464dcfc
part 28 - Remove TI OOM handling code now that setOOMSweepingTypes is unused. r=iain
https://hg.mozilla.org/integration/autoland/rev/22c752fc5172
part 29 - Remove InlinePropertyTable and some dead MIR instructions. r=iain
https://hg.mozilla.org/integration/autoland/rev/521391ead6f0
part 30 - Remove more dead code and IC flags. r=iain

This also gets rid of LStart and the unused entrySnapshot_ field.

Depends on D97576

Depends on D97577

At this point JitScript::sweepTypes is only used to sweep the inlinedCompilations
Vector, a list of Ion/Warp compilations that inlined the script. This patch replaces
that with a HashMap per JitZone so that we can then remove the type sweeping mechanism
in the next patch.

This also moves the TI invalidation code into jit/. This can be cleaned up more later.

Depends on D97578

Warp doesn't store nursery pointers in MIR instructions so we can remove some
code to support that.

Depends on D97580

Attachment #9188837 - Attachment description: Bug 1673553 part 36 - Remove more Ion/GC cocde. r?iain!,jonco! → Bug 1673553 part 36 - Remove more Ion/GC code. r?iain!,jonco!
Pushed by jdemooij@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/136f05c1bbc4
part 31 - Remove IsTypeInferenceEnabled. r=iain
https://hg.mozilla.org/integration/autoland/rev/c876a180dd57
part 32 - Remove ArgumentCheck bailout code. r=iain
https://hg.mozilla.org/integration/autoland/rev/fa9fd7ddf903
part 33 - Simplify some MIRGraph and MPhi code. r=iain
https://hg.mozilla.org/integration/autoland/rev/b651b7cf9447
part 34 - Replace JitScript's inlinedCompilations vector with a HashMap. r=iain,jonco
https://hg.mozilla.org/integration/autoland/rev/94ca532df695
part 35 - Remove remaining type sweeping code. r=iain,jonco
https://hg.mozilla.org/integration/autoland/rev/7e5bcf9488dd
part 36 - Remove more Ion/GC code. r=iain,jonco
  • Move DOMObjectKind to MIR.h
  • Move ObjectGroupFlags to ObjectGroup.h. This can be cleaned up more later.
  • Remove now-unnecessary assertion in BaselineFrame.h so we don't need to include JitOptions.h

Warp uses a different implementation shared with CacheIR. It always returns a Value
so remove LArrayPopShiftT and rename LArrayPopShiftV to LArrayPopShift.

Depends on D97764

Depends on: 1678675
Pushed by jdemooij@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/3f962e400b39
part 37 - Remove TypeSet.h. r=iain
https://hg.mozilla.org/integration/autoland/rev/31c588b8277d
part 38 - Simplify pop/shift code. r=iain

Depends on D98144

There's one caller left.

Depends on D98145

Depends on D98148

The constructors that take a zone instead of context are no longer used.

Depends on D98149

The TypeInference-inl.h include in ObjectOperations-inl.h had to be removed to
break an include cycle. Unfortunately that was a load bearing include (the
TypeInference files pull in a lot of headers) so this adds various missing includes.

Depends on D98150

Replace with AutoSuppressGC, except in JSObject::makeLazyGroup where it's
not needed. It's not very obvious whether GC-suppression is needed in the
ObjectGroup code but for now leave it to be safe.

It's also not very clear where AutoSuppressAllocationMetadataBuilder is needed.
Leaving it out in most places seems to be fine. It's a debugger-only feature so
missing one shouldn't be too bad.

Depends on D98151

Regressions: 1678442
Pushed by jdemooij@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/14c1c7511765
part 39 - Simplify Ion GetProp IC code now that it always returns a boxed Value. r=iain
https://hg.mozilla.org/integration/autoland/rev/5f7017f04d91
part 40 - Remove AutoDetectInvalidation and return-override mechanism. r=iain
https://hg.mozilla.org/integration/autoland/rev/fd4b722e7239
part 41 - Remove some dead code. r=iain
https://hg.mozilla.org/integration/autoland/rev/3b38a02992e6
part 42 - Move ClassCanHaveExtraProperties to CacheIR.cpp. r=iain
https://hg.mozilla.org/integration/autoland/rev/3022fe71dfb0
part 43 - Move ObjectGroup ubi code from TypeInference to ObjectGroup files. r=iain
https://hg.mozilla.org/integration/autoland/rev/767b3496feae
part 44 - Remove TypeZone, move remaining fields to JitZone. r=iain
https://hg.mozilla.org/integration/autoland/rev/a156856e89df
part 45 - Remove TypeInference.cpp. r=iain
https://hg.mozilla.org/integration/autoland/rev/361a437dd1db
part 46 - Simplify AutoSuppressAllocationMetadataBuilder and AutoEnterAnalysis. r=iain
https://hg.mozilla.org/integration/autoland/rev/d27b03f6a30e
part 47 - Move AutoSuppressAllocationMetadataBuilder from TypeInference-inl.h to JSObject-inl.h. r=iain
https://hg.mozilla.org/integration/autoland/rev/a5d27c1f1a79
part 48 - Remove AutoEnterAnalysis. r=iain
https://hg.mozilla.org/integration/autoland/rev/edb1bb069772
part 49 - Remove TypeInference.h and TypeInference-inl.h. r=iain

There's no need to change the group anymore. Later patches will make more changes
in this area.

Depends on D98322

These do exactly the same thing without TI.

Depends on D98323

NewDenseFullyAllocatedArray now does the same thing. The group was only used to
get the proto so it shouldn't be slower either.

Pass nullptr for proto to use Array.prototype as proto.

Delete the IonBuilder-specific template object code in CacheIR.cpp

Depends on D98324

Depends on D98328

Depends on D98329

Do some manual inlining for the NewArray_Fallback group, so that we can also
remove the ObjectGroup::defaultNewGroup overload that takes a JSProtoKey.

Simplify NewObjectOperation by deleting the group-related code.

Depends on D98332

A TI optimization to ensure there were no int32 values in certain double arrays.

Depends on D98333

Depends on D98334

Note that the SetAliasedVar and InitAliasedLexical code in jit::SetProperty is
dead since bug 1522051. These ops are now always inlined without ICs or VM calls.

Depends on D98335

COW elements are harder to implement efficiently without TI and were always pretty
complicated.

This also lets us remove the freeLaterList in JSFreeOp and the allowWrite_ flag in
HeapSlotArray.

Depends on D98336

Depends on D98337

Pushed by jdemooij@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/45a4af9d1ae1
part 50 - Remove ObjectGroup::newPlainObject. r=iain
https://hg.mozilla.org/integration/autoland/rev/ba4fd183d46b
part 51 - Simplify some code in NewArrayTryUseGroup. r=iain
https://hg.mozilla.org/integration/autoland/rev/cddfd7d73037
part 52 - Merge ArrayObject::setLength and ArrayObject::setLengthInt32. r=iain
https://hg.mozilla.org/integration/autoland/rev/7790c66276d5
part 53 - Remove NewFullyAllocatedArrayTryReuseGroup. r=iain
https://hg.mozilla.org/integration/autoland/rev/7299f2bc562a
part 54 - Replace NewPartlyAllocatedArrayTryReuseGroup with NewDensePartlyAllocatedArray. r=iain
https://hg.mozilla.org/integration/autoland/rev/71ff3283acec
part 55 - Remove NewFullyAllocatedArrayForCallingAllocationSite and NewPartlyAllocatedArrayForCallingAllocationSite. r=iain
https://hg.mozilla.org/integration/autoland/rev/562027bf7f82
part 56 - Remove NewCopiedArrayForCallingAllocationSite. r=iain
https://hg.mozilla.org/integration/autoland/rev/a53ca1c2e350
part 57 - Remove ShouldUpdateTypes enum. r=iain
https://hg.mozilla.org/integration/autoland/rev/b7de2bdc92ee
part 58 - Remove NewCopiedArrayTryUseGroup. r=iain
https://hg.mozilla.org/integration/autoland/rev/d106ad322efc
part 59 - Remove NewFullyAllocatedArrayTryUseGroup and NewPartlyAllocatedArrayTryUseGroup. r=iain
https://hg.mozilla.org/integration/autoland/rev/29d82cbb70c0
part 60 - Remove ObjectGroup::callingAllocationSiteGroup. r=iain
https://hg.mozilla.org/integration/autoland/rev/162b97e5fa7f
part 61 - Remove ObjectGroup::allocationSiteGroup. r=iain
https://hg.mozilla.org/integration/autoland/rev/1d96d8c000f1
part 62 - Remove CONVERT_DOUBLE_ELEMENTS. r=iain
https://hg.mozilla.org/integration/autoland/rev/96be391e2370
part 63 - Clean up some dense element methods. r=iain
https://hg.mozilla.org/integration/autoland/rev/8d0bce86dcda
part 64 - Remove NativeObject::setSlotWithType. r=iain
https://hg.mozilla.org/integration/autoland/rev/5c49647b616b
part 65 - Remove VM and JIT code for copy-on-write arrays. r=iain
https://hg.mozilla.org/integration/autoland/rev/4fc932c5974e
part 66 - Remove ObjectGroup::newArrayObject. r=iain

We no longer need this API to create singleton objects. It was used to prevent
polluting type information.

Goal of these patches is to get to the point where only the global object is a
singleton. The global object is more tricky due to splicePrototype, but after
fixing that we can then remove singleton groups completely.

Depends on D98499

There are no singleton functions at this point, so CanReuseFunctionForClone
always returned false.

This means we can also remove SetPrototypeForClonedFunction, the HasBeenCloned
flag, and clearInferredName.

Rename CloneFunctionObjectIfNotSingleton to CloneFunctionObject because it always
clones now.

Depends on D98503

CanReuseScriptForClone returned false for singleton functions, but these are gone now.

Depends on D98504

Depends on D98505

To save memory, singleton objects started out with a lazy group. The actual (unique)
group was created lazily by JSObject::getGroup. Now that only global objects are
singletons (and groups store no property type information) we can remove this.

  • In JSObject::setSingleton assert the object is a global object.
  • Create the non-lazy singleton group directly in JSObject::setSingleton.
  • Remove the lazyTable from ObjectGroupRealm now that all groups are non-lazy.
  • Merge JSObject::groupRaw and JSObject::group into JSObject::group.

After fixing the prototype splicing code for the global object we can remove singletons
completely.

Depends on D98506

Depends on D98507

Pushed by jdemooij@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/36e6de3161a0
part 67 - Remove JS_NewObjectWithUniqueType. r=iain
https://hg.mozilla.org/integration/autoland/rev/5068eea4c7e9
part 68 - Replace calls to NewSingletonObjectWithGivenProto with NewTenuredObjectWithGivenProto. r=iain
https://hg.mozilla.org/integration/autoland/rev/5cd837398fb5
part 69 - Remove NewSingletonObjectWithGivenTaggedProtoAndKind. r=iain
https://hg.mozilla.org/integration/autoland/rev/4b4f4f9e09e3
part 70 - Pass TenuredObject instead of SingletonObject in most places. r=iain
https://hg.mozilla.org/integration/autoland/rev/7653eac7a4a5
part 71 - Remove some calls to JSObject::setSingleton. r=iain
https://hg.mozilla.org/integration/autoland/rev/75a4e21372bf
part 72 - Clean up some code for singleton functions. r=iain,tcampbell
https://hg.mozilla.org/integration/autoland/rev/76e6a7631a63
part 73 - Turn CanReuseScriptForClone check in CloneFunctionObject into an assertion. r=tcampbell
https://hg.mozilla.org/integration/autoland/rev/9539b156ac4f
part 74 - Remove NewSingletonProxyObject. r=iain
https://hg.mozilla.org/integration/autoland/rev/4fb9feabc15a
part 75 - Remove lazy (singleton) groups. r=iain
https://hg.mozilla.org/integration/autoland/rev/c7ad1bc20c8a
part 76 - Remove most remaining setGroup calls. r=iain

Now that all callers are in ObjectGroup.cpp we can make this private to that file.

Also remove the realm argument, all callers now passed cx->realm() so use that directly.

Depends on D98581

Depends on D98582

Depends on D98583

At this point it's equivalent to JSOp::NewObject.

Depends on D98584

Once upon a time GetElem and CallElem had different semantics, for example for the
non-standard noSuchMethod extension. IonBuilder/TI then relied on this for some
heuristics.

Depends on D98585

Depends on D98586

JSOp::Length was an alias for JSOp::GetProp "length". The two places that checked
for JSOp::Length can just compare the atom instead. This simplifies the frontend a bit.

Note that this doesn't affect bytecode size: JSOp::Length also included the "length" atom.

Depends on D98587

This was a hint for IonBuilder to prevent loop restarts. Although this still lets
us do an infallible unbox in Warp, there's not much of a perf improvement on a for-in
micro-benchmark so it's probably fine to remove this now.

Depends on D98588

Attachment #9191005 - Attachment description: Bug 1673553 part 80 - Remove JSOp::NewObjectWithGroup. r?iain! → Bug 1673553 part 81 - Remove JSOp::NewObjectWithGroup. r?iain!
Attachment #9191006 - Attachment description: Bug 1673553 part 81 - Remove JSOp::CallElem. r?iain! → Bug 1673553 part 82 - Remove JSOp::CallElem. r?iain!
Attachment #9191007 - Attachment description: Bug 1673553 part 82 - Remove JSOp::CallProp. r?iain! → Bug 1673553 part 83 - Remove JSOp::CallProp. r?iain!
Attachment #9191008 - Attachment description: Bug 1673553 part 83 - Remove JSOp::Length. r?iain! → Bug 1673553 part 84 - Remove JSOp::Length. r?iain!
Attachment #9191009 - Attachment description: Bug 1673553 part 84 - Remove JSOp::IterNext. r?iain! → Bug 1673553 part 85 - Remove JSOp::IterNext. r?iain!
Pushed by jdemooij@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/5e446294f555
part 77 - Turn ObjectGroupRealm::makeGroup into a static MakeGroup function. r=iain
https://hg.mozilla.org/integration/autoland/rev/092e052d6a89
part 78 - Remove ObjectGroup-inl.h. r=iain
https://hg.mozilla.org/integration/autoland/rev/6385df444ca2
part 79 - Remove now dead TI memory reporters. r=iain
https://hg.mozilla.org/integration/autoland/rev/d86afd2049ae
part 80 - Remove JSOp::NewArrayCopyOnWrite. r=iain
https://hg.mozilla.org/integration/autoland/rev/46de1e58eefd
part 81 - Remove JSOp::NewObjectWithGroup. r=iain
https://hg.mozilla.org/integration/autoland/rev/2be103c43560
part 82 - Remove JSOp::CallElem. r=iain
https://hg.mozilla.org/integration/autoland/rev/0163808b985e
part 83 - Remove JSOp::CallProp. r=iain
https://hg.mozilla.org/integration/autoland/rev/dd69e5f3c4f9
part 84 - Remove JSOp::Length. r=iain
https://hg.mozilla.org/integration/autoland/rev/30953134ae14
part 85 - Remove JSOp::IterNext. r=iain

We no longer do argument type checks.

ICCacheIR_Regular should probably be renamed in later patches.

Depends on D98916

The pre-CacheIR IC infrastructure is no longer used since the type monitor/update stubs
were removed.

Depends on D98917

Also turn the availableGeneralRegs method into a stand-alone BaselineICAvailableGeneralRegs
function.

Removing the SharedICRegisters.h include from BaselineIC.h required adding some missing #includes.

Depends on D98918

Blocks: 1681272
Pushed by jdemooij@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/d2cb2d8ce8d1
part 86 - Remove the skip-arg-check entry point. r=iain
https://hg.mozilla.org/integration/autoland/rev/0956250445d3
part 87 - Remove ICCacheIR_Trait base class. r=iain
https://hg.mozilla.org/integration/autoland/rev/e853a7c293b7
part 88 - Remove ICStubCompiler class. r=iain
https://hg.mozilla.org/integration/autoland/rev/b072ba215e24
part 89 - Merge ICStubCompilerBase into FallbackICCodeCompiler. r=iain

Fun, a build failure on one platform due to a now-missing #include.

Flags: needinfo?(jdemooij)
Pushed by jdemooij@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/6195a108b15d
part 86 - Remove the skip-arg-check entry point. r=iain
https://hg.mozilla.org/integration/autoland/rev/077503eafee6
part 87 - Remove ICCacheIR_Trait base class. r=iain
https://hg.mozilla.org/integration/autoland/rev/a5c7c19a25ed
part 88 - Remove ICStubCompiler class. r=iain
https://hg.mozilla.org/integration/autoland/rev/d5c93dbdf613
part 89 - Merge ICStubCompilerBase into FallbackICCodeCompiler. r=iain

Warp has let us remove the Baseline Type Monitor stubs that triggered the bug.
The workarounds also didn't stop the crashes.

With TI the preliminary-object handling made this more difficult.

In the IonIC code we can also remove TryAttachIonStub's IC template parameter.

Depends on D99218

Drive-by change: add a MOZ_UNLIKELY for the OOM path as this code is somewhat hot.

Depends on D99219

The callers no longer need fixed registers, which should improve codegen a little.

In emitStoreDenseElementHole we can simplify the handleAdd case by merging the
"before type update IC" and "after type update IC" code.

In emitArrayPush use AutoOutputRegister, the old code loaded the value in R0 and
then relied on that register matching the IC's output register.

Depends on D99221

Depends on D99222

We can bring this back in the future if needed.

Depends on D99224

Pushed by jdemooij@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/3380fdb08357
part 90 - Remove remaining code for AMD Bobcat workaround. r=tcampbell
https://hg.mozilla.org/integration/autoland/rev/fdd89bf36294
part 91 - De-duplicate more GetProp IC code. r=iain
https://hg.mozilla.org/integration/autoland/rev/302908606fc8
part 92 - Inline AddICImpl into its caller. r=iain
https://hg.mozilla.org/integration/autoland/rev/3eaf6aee7d31
part 93 - Remove group-changing code from AddSlot ops. r=iain
https://hg.mozilla.org/integration/autoland/rev/f441d73f176f
part 94 - Remove callTypeUpdateIC, clean up callers. r=iain
https://hg.mozilla.org/integration/autoland/rev/b66fdf5d9cb8
part 95 - Remove BaselineCacheIRStubKind. r=iain
https://hg.mozilla.org/integration/autoland/rev/c23de324fa69
part 96 - Remove unused GuardGroupHasUnanalyzedNewScript CacheIR op. r=iain
https://hg.mozilla.org/integration/autoland/rev/a228c5d96260
part 97 - Remove more object pre-tenuring code. r=jonco

Now that every stub is a fallback stub except for CacheIR_Regular, we don't need
this trait value anymore. Later patches will make more changes in this area.

Depends on D99339

If a stub has a non-null next_, it's a CacheIR stub. Else it's a fallback stub.
This means the Kind is only relevant for fallback stubs and we can move it there,
removing a word from each CacheIR stub.

The use of CacheIR_Regular here is a bit awkward, a later patch will rename this to
ICCacheIRStub to make this more natural.

This also removes the extra_ field that's no longer used.

Depends on D99340

Drive-by change: remove dead ICStub::updateCode.

Depends on D99341

Depends on D99342

Attachment #9192382 - Attachment description: Bug 1673553 part 100 - Move kind_ field from ICStub to ICFallbackStub. r?iain! → Bug 1673553 part 100 - Move kind field from ICStub to ICFallbackStub. r?iain!
Pushed by jdemooij@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/d443615acd94
part 98 - Remove some dead code from alias analysis. r=iain
https://hg.mozilla.org/integration/autoland/rev/30837f20df57
part 99 - Remove trait enum. r=iain
https://hg.mozilla.org/integration/autoland/rev/516536a2d9a2
part 100 - Move kind field from ICStub to ICFallbackStub. r=iain
https://hg.mozilla.org/integration/autoland/rev/dfa21600860e
part 101 - Split up ICStub::trace for fallback vs CacheIR stubs. r=iain
https://hg.mozilla.org/integration/autoland/rev/c34c5f277dcc
part 102 - Rename CacheIR_Regular to CacheIRStub. r=iain

This makes it more explicit where we're using fallback stubs vs CacheIR stubs.

It also lets us remove the cacheIRStubInfo and cacheIRStubData from ICStub.

  • Move the next_ field to ICCacheIRStub; fallback stubs don't have a next stub.
  • Move the enteredCount_ field to the base class instead of duplicating in derived classes.
  • Use uint8_t instead of uint32_t for small bit fields in ICState to shrink sizeof(ICState)
  • Shrink Kind from uint16_t to uint8_t. Remove the magic-value bits to simplify the code and we don't have many bits available.

This gets all Baseline IC stubs down to 4 words on 64-bit:

  1. code_
  2. enteredCount_ + isFallback_ flag
  3. next_ (CacheIR stubs) or icEntry_ (fallback stubs)
  4. stubInfo_ (CacheIR stubs) or state_ + kind_ (fallback stubs)

static_asserts are added to document/check the size of fallback and CacheIR stubs.

This should be pretty optimal. The second word has some padding so gives us space
to add more data/flags to each ICStub in the future without increasing the size.

Depends on D99464

Blocks: 1682504

There's more to do but I'm going to continue this in a new bug.

Keywords: leave-open
Pushed by jdemooij@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/6537b704ed64
part 103 - Use ICCacheIRStub in more places. r=iain
https://hg.mozilla.org/integration/autoland/rev/0a977402aec1
part 104 - Change ICStub layout a bit more. r=iain
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 86 Branch

Changing this from 86 to 85 because that's where the vast majority of changes landed.

Target Milestone: 86 Branch → 85 Branch
Blocks: 1682767
Blocks: 1683093

We're seeing a considerable improvement to GC_SLICE_DURING_IDLE(_CONTENT) that seems to be the result of this work! This is great news.

== Change summary for alert #28294 (as of Wed, 30 Dec 2020 06:21:36 GMT) ==

Improvements:

Ratio Suite Test Platform Options Absolute values (old vs new)
2% six-speed-sm linux64-shippable 15,070.64 -> 14,765.83
2% six-speed-sm linux64-shippable 15,067.25 -> 14,771.00

For up to date results, see: https://treeherder.mozilla.org/perfherder/alerts?id=28294

== Change summary for alert #27956 (as of Thu, 03 Dec 2020 22:57:56 GMT) ==

Improvements:

Ratio Suite Test Platform Options Absolute values (old vs new)
4% raptor-tp6-office-firefox-cold loadtime windows10-64-shippable-qr webrender 2,261.46 -> 2,172.33

For up to date results, see: https://treeherder.mozilla.org/perfherder/alerts?id=27956

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: