[Webkit-unassigned] [Bug 104638] Support op_switch_imm bytecode on DFG.
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Dec 11 01:24:32 PST 2012
https://bugs.webkit.org/show_bug.cgi?id=104638
Filip Pizlo <fpizlo at apple.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #178731|review? |review-
Flag| |
--- Comment #2 from Filip Pizlo <fpizlo at apple.com> 2012-12-11 01:26:56 PST ---
(From update of attachment 178731)
I don't think this is the right approach. For large switch statements, this will perform worse. I also fear that your way of creating multiple basic blocks is fragile - I can't see any obvious bugs in it, but it's kind of a dangerous approach that requires a mutable context to be held in place while you repeatedly revisit the same bytecode. A better way of handling Switch in an optimizing compiler is to (a) have a Switch node in the DFG IR and (b) perform transformations on the Switch later in compilation if you find that it's a trivial one. Writing a phase to handle (b) would give you the ability to have a more straight-forward handling of basic block creation. Using (a) and allowing the Switch to sometimes survive into the backend (particularly when it's a Switch with a lot of cases) would take care of pathologies for large switch statements.
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list