Details

    • Type: Improvement Improvement
    • Status: Closed Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.9.0, 2.9.0.1, 2.9.1
    • Fix Version/s: None
    • Component/s: Compiler: Optimizing
    • Labels:
      None
    • Environment:
      IA32 optimizing compiler builds
    • Number of attachments :
      0

      Description

      Currently expression folding is performed on SSA. This is so that, for example:
      x = y + c1
      z = x + c2
      becoming:
      z = y + (c1 +c2)
      we know x won't have a different value other than the expression we're looking at. We can perform the same optimization locally (on a BB) if we track that the last assignment of x. This should mean we can cheaply run expression folding on low optimization levels.

      This is important as we often see cases of:
      boolean foo()

      { return x > 0; }

      ...
      if (foo())

      {....}

      whilst we convert foo into a "booleancmp_int x > 0" the subsequent ifcmp isn't folded. Expression folding would fold this example. Having reasonable expression folding would mean we could remove similar operations from BURS (these rules are often missing from PPC BURS to avoid having non-terminals).

        Activity

        Ian Rogers made changes -
        Field Original Value New Value
        Assignee Ian Rogers [ ianrogers ]
        Hide
        Ian Rogers added a comment -

        Fix in r13184, optimization run as part of Simple.

        Show
        Ian Rogers added a comment - Fix in r13184, optimization run as part of Simple.
        Ian Rogers made changes -
        Resolution Fixed [ 1 ]
        Status Open [ 1 ] Closed [ 6 ]

          People

          • Assignee:
            Ian Rogers
            Reporter:
            Ian Rogers
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Time Tracking

              Estimated:
              Original Estimate - 4 hours
              4h
              Remaining:
              Remaining Estimate - 4 hours
              4h
              Logged:
              Time Spent - Not Specified
              Not Specified