Details
-
Type:
Improvement
-
Status:
Closed
-
Priority:
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 :
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()
...
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
| Field | Original Value | New Value |
|---|---|---|
| Assignee | Ian Rogers [ ianrogers ] |
| Resolution | Fixed [ 1 ] | |
| Status | Open [ 1 ] | Closed [ 6 ] |
Fix in r13184, optimization run as part of Simple.