This is the mail archive of the
mailing list for the GCC project.
Re: Multi-version IF-THEN-ELSE conditional
- From: Jeff Law <law at redhat dot com>
- To: Ajit Kumar Agarwal <ajit dot kumar dot agarwal at xilinx dot com>, Richard Biener <richard dot guenther at gmail dot com>, "gcc at gcc dot gnu dot org" <gcc at gcc dot gnu dot org>
- Cc: Vinod Kathail <vinodk at xilinx dot com>, Shail Aditya Gupta <shailadi at xilinx dot com>, Vidhumouli Hunsigida <vidhum at xilinx dot com>, Nagaraju Mekala <nmekala at xilinx dot com>
- Date: Mon, 29 Jun 2015 12:15:37 -0600
- Subject: Re: Multi-version IF-THEN-ELSE conditional
- Authentication-results: sourceware.org; auth=none
- References: <37378DC5BCD0EE48BA4B082E0B55DFAA41F3E5B9 at XAP-PVEXMBX02 dot xlnx dot xilinx dot com>
On 06/27/2015 06:10 AM, Ajit Kumar Agarwal wrote:
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.
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.