Closed Bug 1635431 Opened 4 years ago Closed 4 years ago

Add MDefinition::definitelyType

Categories

(Core :: JavaScript Engine: JIT, enhancement)

enhancement

Tracking

()

RESOLVED FIXED
mozilla78
Tracking Status
firefox78 --- fixed

People

(Reporter: anba, Assigned: anba)

Details

Attachments

(6 files)

As suggested in https://phabricator.services.mozilla.com/D72641, add MDefinition::definitelyType() to change some MDefinition::mightBeType() callers to use whitelists instead of blacklists to guide optimisations.

Part 3 adds another caller to this function.

TypeSet::unknownObject() checks if TYPE_FLAG_UNKNOWN or TYPE_FLAG_ANYOBJECT
is set, but since the previous call to TypeSet::unknown() already filters
TYPE_FLAG_UNKNOWN, we only need to care about TYPE_FLAG_ANYOBJECT here. When
we additionally set TYPE_FLAG_ANYOBJECT for the baseObjectCount() != 0 case,
we can conflate the whole operation into a single bit-and instruction.

This will also simplify part 3.

Depends on D73884

Add definitelyType() as an alternative to mightBeType() when we need to
find out if a MDefinition's types are guaranteed to be a subset of certain
types.

Depends on D73885

Pushed by rgurzau@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/7b0041e310fb
Part 1: Move MIRType to TypeFlags conversion into a helper function. r=jandem
https://hg.mozilla.org/integration/autoland/rev/375db7943c69
Part 2: Handle MIRType::Object through TypeFlags in MIRTypeToTypeFlags. r=jandem
https://hg.mozilla.org/integration/autoland/rev/9dd4ec80877b
Part 3: Add MIRType::definitelyType. r=jandem
https://hg.mozilla.org/integration/autoland/rev/309a51f48fa6
Part 4: Use positive instead of negative filter lists for non-effectful MIR nodes. r=jandem
https://hg.mozilla.org/integration/autoland/rev/f205812a4516
Part 5: Use definitelyType in MCallOptimize. r=jandem
https://hg.mozilla.org/integration/autoland/rev/da4ef62948b7
Part 6: Use definitelyType in IonBuilder. r=jandem
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: