search for: pairmap

Displaying 1 result from an estimated 1 matches for "pairmap".

2017 Oct 25
2
[PATCH/RFC] Modifying reassociate for improved CSE: fairly large perf gains
...ration. This map represents how common a given operand pair occurs in the source code for a given BinaryOperation. But in addition to counting each actual instruction, we also count each possible O(N^2) pair of each linear operand chain. So for example, if the operand chain is this: a*b*c we do: PairMap[Multiply][{a, b}]++; PairMap[Multiply][{b, c}]++; PairMap[Multiply][{a, c}]++; Obviously if runtime is an issue we can prohibit this on extremely long chains or such that are unlikely to occur in real programs to avoid asymptotically quadratic behavior. 3. Run reassociate again. All the informatio...