This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
In my ongoing quest to remove the VRP bits from DOM, this patch enhances tree-vrp.c so that it can simplify a conditional using range information, even when the conditional is not a compile-time constant. For example, if we have an object with the range [3..INF] and we have a test obj <= 3, then we can simplify the test to obj == 3. This can generate slightly better code and allows us to propagate the value 3 for the object when the condition is true, which can lead to some further simplifications. This patch also removes the distinct IL walk to simplify statements using range information and instead just calls back into the VRP bits during the IL walk in substitute_and_fold. Overall we get ever so slightly better code and a slightly faster compiler. We can't quite remove the equivalent code from DOM yet -- we'd need to run another VRP pass later in the SSA optimization path to pick up the numerous secondary optimization opportunities. The VRP + redundancy elimination + VRP is still currently a significant compile-time hit. Bootstrapped and regression tested on i686-pc-linux-gnu. Jeff
Attachment:
PPP
Description: Text document
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |