On 06/27/2015 06:10 AM, Ajit Kumar Agarwal wrote:
All:
The presence of aliases disables many optimizations like CCP(conditional
constant propagation) , PRE(Partial Redundancy Elimination),
Scalar Replacements for conditional IF-THEN-ELSE. The presence of aliasing
also disables the IF-conversion.
I am proposing the Multi-version IF-THEN-ELSE where the different version of
the IF-THEN-ELSE is one without aliasing and other
versions with the aliasing. Thus converting the different Multi-version
IF-THEN-ELSE enables the CCP, PRE, Scalar replacements
and IF-conversions for the version of the IF-THEN-ELSE that does not have
aliasing on the pointer variables and the versions that
has alias information will not be affected with such optimizations.
I don't have examples on hand currently but I am working on currently to
provide the examples.
Probably the hardest part will be the heuristics around this. The
optimizations you want to improve happen as separate passes, so there
won't necessarily be a good way to predict if the multi-version
if-then-else will enable further optimizations.
Jeff