Closed Bug 2022580 Opened 8 months ago Closed 8 months ago

Support alias-sets in GenerateMIRFiles and more improvements

Categories

(Core :: JavaScript Engine: JIT, task)

task

Tracking

()

RESOLVED FIXED
150 Branch
Tracking Status
firefox150 --- fixed

People

(Reporter: anba, Assigned: anba)

Details

Attachments

(12 external files)

  • Add support to define alias-sets directly in "MIROps.yaml", so we need fewer alias_set: custom definitions.
  • Add type assertions to the generated constructors to ensure no-type policy operands have the correct type.
  • And generate more MIR/LIR boilerplate for handwritten MIR definitions.

Allowing string in addition to list types for the alias sets allows a more
compact representation. (And avoids extra brackets when compared to using inline
YAML list types.)

This is used in part 2.

Moves the alias-set definitions from MIR.cpp to MIROps.yaml for all simple cases.

Split from part 2 because this getAliasSet() method had an extra assertion.

The assertion seems unnecessary, because slots is already typed as MIRType::Slots
in the MIROps.yaml.

Drive-by change:

  • Use enumerate built-in function to provide the current index in iteration.

The assertion removed in part 3 reminded me that it probably doesn't hurt to ensure
no-type-policy operands have the correct type.

And also fix the four definitions which were using the wrong operand type, because
this is now an assertion.

Using the MIR generator improvements from this patch stack and from bug 2021831

  • To compare arguments in congruentTo.
  • To use custom alias-sets.
  • To check operand types in constructors.

allows to gnerate more MIR boilerplate.

The next part adds generate_lir, so we don't need additional entries in LIROps.yaml.

Use generate_lir for the MIR definitions changend in part 8.

Necessary for the next part to generate more boilerplate.

Most of these typedefs aren't used anymore, so we might as well remove them.

Pushed by andre.bargull@gmail.com: https://github.com/mozilla-firefox/firefox/commit/0fbd1f32a639 https://hg.mozilla.org/integration/autoland/rev/9b04867ca0c2 Part 1: Add support to generate getAliasSet() methods. r=jandem https://github.com/mozilla-firefox/firefox/commit/f9b86528e4e9 https://hg.mozilla.org/integration/autoland/rev/a27e36e48e89 Part 2: Replace custom alias_set definitions. r=jandem https://github.com/mozilla-firefox/firefox/commit/c2a335b74cf2 https://hg.mozilla.org/integration/autoland/rev/2bf1c4726c29 Part 3: Replace MLoadDynamicSlotFromOffset::getAliasSet(). r=jandem https://github.com/mozilla-firefox/firefox/commit/98a8e1e76523 https://hg.mozilla.org/integration/autoland/rev/abc9add86594 Part 4: Remove unused type policy kind "NoTypePolicy". r=jandem https://github.com/mozilla-firefox/firefox/commit/e9ea43d4e7e1 https://hg.mozilla.org/integration/autoland/rev/244e61897588 Part 5: Assert no-type-policy operands have the correct type. r=jandem https://github.com/mozilla-firefox/firefox/commit/2df1787ac556 https://hg.mozilla.org/integration/autoland/rev/65a97d68c4c8 Part 6: Generate MIR and LIR boilerplate for CreateArgumentsObject. r=jandem https://github.com/mozilla-firefox/firefox/commit/52d73214593e https://hg.mozilla.org/integration/autoland/rev/c5a290cf262a Part 7: Add explicit method to create MWrapInt64ToInt32. r=jandem https://github.com/mozilla-firefox/firefox/commit/47dd996ae239 https://hg.mozilla.org/integration/autoland/rev/296cdb6d9dcf Part 8: Generate more MIR boilerplate. r=jandem https://github.com/mozilla-firefox/firefox/commit/492cd5694c75 https://hg.mozilla.org/integration/autoland/rev/28478a362219 Part 9: Generate LIR definitions from MIR. r=jandem https://github.com/mozilla-firefox/firefox/commit/3eebee0c7241 https://hg.mozilla.org/integration/autoland/rev/aaf279a1d8c3 Part 10: Add a jit::StringCase enum. r=jandem https://github.com/mozilla-firefox/firefox/commit/f727c6a76654 https://hg.mozilla.org/integration/autoland/rev/b25110b45930 Part 11: Generate boilerplate for string case conversion instructions. r=jandem https://github.com/mozilla-firefox/firefox/commit/0072f96666cf https://hg.mozilla.org/integration/autoland/rev/3e7ec64f6266 Part 12: Remove typedefs for CompilerGCPointer. r=jandem
QA Whiteboard: [qa-triage-done-c151/b150]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: