Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-127654

Findings for Dead-Code-Elimination on the Bytecode

XMLWordPrintable

      The chain of commits ending with https://codereview.qt-project.org/c/qt/qtdeclarative/+/574946 adds DCE on the bytecode. It implements part of the logic of the compiler to find dead reads and writes that have no side effects to remove them from the generated bytecode. It does this solely by tracking read/written registers and without utilizing any type information.

      The hope was to optimize bytecode that is generated AOT (runtime generation remained unchanged) to reduce code size and maybe even improve performance.

      The results are disappointing:

       

      Potential causes for the poor results are be the nature of JavaScript. Many instructions that at first glance seem safe can actually have side effects due to user-specified code in their execution.
      Examples:

      • A get lookup on an id can produce side effects due a symbol that can be overriden by the user
      • Same deal for the seemingly benign bitwise operators. They can coerce their operands which through user-overrideable symbols can again produce arbitrary side effects.

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            qtqmlteam Qt Qml Team User
            olivier.decanniere Olivier De Cannière
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes