Closed Bug 1689990 Opened 3 months ago Closed 3 months ago

Remove more unused Ion code

Categories

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

task

Tracking

()

RESOLVED FIXED
87 Branch
Tracking Status
firefox87 --- fixed

People

(Reporter: anba, Assigned: anba)

Details

Attachments

(23 files)

48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review

Remove more unused code under js/src/jit.

Also move LNode tracking under TRACK_SNAPSHOTS, so the compiler can more
easily optimise this code away when TRACK_SNAPSHOTS isn't set.

Use LInstruction* instead of LNode* for clarity and to match the method
name of LElementVisitor::instruction().

Depends on D103637

This method isn't used anymore after part 1.

Depends on D103638

Both methods are only used within a single assertion in CodeGeneratorShared::addOutOfLineCode().

Depends on D103639

Another unused method.

Depends on D103640

Currently never overridden in any sub-classes, so we can it remove again.

Depends on D103641

Int64 wasn't allowed because typesets couldn't represent this type.

Depends on D103645

MToInt64 seems to allow Int64 inputs based on the comments in
LIRGenerator::visitToInt64().

Also remove MIRType::String from the list of non-throwing types, because
ToBigInt(string) can actually throw a SyntaxError. This change can't be
tested, because we currently create neither MToBigInt nor MToInt64 in a
context where the input is a string and the result isn't observed.

Depends on D103646

The copy constructors call MNode(const MNode&) which copies over the
blockAndKind_ member, so the block information is actually copied, too.

Depends on D103647

Both methods are no longer used. Also move the comment from updateTrackedSite()
to trackedSite_.

Depends on D103648

MBasicBlock::pc_ is initialised with MBasicBlock::trackedSite_'s pc and
after the last part MBasicBlock::trackedSite_ is never changed after the
constructor, so we can replace pc_ with trackedSite_->pc().

Depends on D103650

After part 13, MBasicBlock::trackedSite_ is never modified outside of the
constructor. And because all call-sites pass a non-nullptr, we can assert this
and remove the nullptr check in trackedTree().

Depends on D103651

These assertions should hold even when profiling isn't enabled.

Depends on D103652

This method is never called.

Depends on D103653

Add a separate MDefinition::setInstructionBlock() method which also sets the
tracked bytecode site. setTrackedSite() is now only called from within
MDefinition, so its visibility can be changed to private.

With this change it's easier to see that all definitions attached to a block
also have a tracked bytecode site. We will use this property in the next parts.

Depends on D103654

Remove MDefinition::tracked{Tree, Pc}() in preparation for the next parts.

Depends on D103655

Part 18 ensured each definition which is attached to a block has a non-nullptr
tracked bytecode site. (This is ensured through setTrackedSite() which asserts
the tracked bytecode site isn't a nullptr.)

Drive-by change:

  • Change CodeGeneratorShared::encode() to store ins->mirRaw() in a variable.

Depends on D103656

Warp compilation always has a tracked bytecode site, so instead of testing if
the bytecode site's tree is non-null, test if we're currently Warp (= not Wasm)
compiling. This should make it easier to understand this code.

Depends on D103657

A MDefinition's tracked bytecode site is always equal to the bytecode site
of its block. Assert this property so we can remove MDefinition::trackedSite_
in a follow-up bug.

Depends on D103658

Empty bytecode sites are typically only used for Wasm compilation. Assert this
in MBasicBlock::NewPopN() and document this in BytecodeSite.

(*) The only exception are fake OSR blocks in GVN.

Depends on D103659

Severity: -- → N/A
Priority: -- → P1
Pushed by archaeopteryx@coole-files.de:
https://hg.mozilla.org/integration/autoland/rev/0c302cf266af
Part 1: Remove jsbytecode tracking from LElementVisitor. r=jandem
https://hg.mozilla.org/integration/autoland/rev/d0b6b6a300d3
Part 2: Use LInstruction* for LElementVisitor::ins_. r=jandem
https://hg.mozilla.org/integration/autoland/rev/d95e9dc8a51f
Part 3: Remove MDefinition::profilerLeavePc(). r=jandem
https://hg.mozilla.org/integration/autoland/rev/d6d6478ee425
Part 4: Remove OutOfLineCode::{pc,script}(). r=jandem
https://hg.mozilla.org/integration/autoland/rev/9fcb21192e76
Part 5: Remove InlineScriptTree::outermostCaller(). r=jandem
https://hg.mozilla.org/integration/autoland/rev/965bf571b3b7
Part 6: Remove MDefinition::neverHoist(). r=jandem
https://hg.mozilla.org/integration/autoland/rev/c1936750ac10
Part 7: Remove unused AbortReason enum constants. r=jandem
https://hg.mozilla.org/integration/autoland/rev/370e1fdf98b4
Part 8: Remove unused CompileInfo methods. r=jandem
https://hg.mozilla.org/integration/autoland/rev/e3710469f54c
Part 9: Remove unused enums BarrierKind and ReprotectCode. r=jandem
https://hg.mozilla.org/integration/autoland/rev/f0fce4e9915b
Part 10: Remove no longer necessary limitation around Int64 in MDefinition::definitelyType(). r=jandem
https://hg.mozilla.org/integration/autoland/rev/92bcf8f1fd35
Part 11: Align type checks in MToInt64 with MToBigInt. r=jandem
https://hg.mozilla.org/integration/autoland/rev/858bf28d8e69
Part 12: Update a comment for MDefinition/MInstruction copy constructors. r=jandem
https://hg.mozilla.org/integration/autoland/rev/d6c57f1a802d
Part 13: Remove MBasicBlock::{updateTrackedSite,trackedPc}(). r=jandem
https://hg.mozilla.org/integration/autoland/rev/3bb03e24de3e
Part 14: Remove MBasicBlock::pc_. r=jandem
https://hg.mozilla.org/integration/autoland/rev/075ac212397a
Part 15: Assert "MBasicBlock::trackedSite_" is non-nullptr. r=jandem
https://hg.mozilla.org/integration/autoland/rev/02840fd96046
Part 16: Move assertions to the top of addNativeToBytecodeEntry(). r=jandem
https://hg.mozilla.org/integration/autoland/rev/0dfd7f0cdf5e
Part 17: Remove MResumePoint::setBlock(). r=jandem
https://hg.mozilla.org/integration/autoland/rev/163b5b1f8399
Part 18: Split MDefinition::setBlock() into separate methods for instructions and phi nodes. r=jandem
https://hg.mozilla.org/integration/autoland/rev/50392f353921
Part 19: Remove MDefinition::tracked{Tree, Pc}() in favour of keeping just MDefinition::trackedSite(). r=jandem
https://hg.mozilla.org/integration/autoland/rev/94daf625a31e
Part 20: Assert MDefinition::trackedSite() returns a non-nullptr. r=jandem
https://hg.mozilla.org/integration/autoland/rev/0c975085c571
Part 21: Tracked inline script trees are always present when Warp-compiling. r=jandem
https://hg.mozilla.org/integration/autoland/rev/d2590808f1ae
Part 22: Ensure tracked bytecode sites are consistent. r=jandem
https://hg.mozilla.org/integration/autoland/rev/5a4c3de02537
Part 23: Assert MBasicBlock::NewPopN() is only used for Warp compilation. r=jandem
You need to log in before you can comment on or make changes to this bug.