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]

Re: Value Range Propagation Patch (Version 4)


	I bounced the heuristics issues around with some of the people who
developed IBM's compilers and they had the following comments:

	Would a more compact representation be sufficient for VRP?  In
practice, the most useful cases can be captured by considering only
specific ranges like 0..2^8-1, 0..2^16-1, and 0..2^32-1 (for 64-bit mode).
Range analysis limited to those fields requires only two additional bits
per register or only 3x the space of a simple register liveness analysis
representing the entire register.  Maybe the simple version could be used
at -O2 (-O?) and the expensive version at -O3 (-O2?).

	For the general memory / time consumption of an optimization
heuristic, IBM's compilers use the following method: Each optimization
pass calculates the space requirements needed by its data structures for
the current compilation unit.  If the value exceeds a user-settable upper
bound, then one of two actions are taken:

	1) The optimization is abandoned with a message that an
optimization was not performed.

	2) The optimization is re-tried for each of the next-lower level
strongly connected regions or loops (this focusses attention on loops and
inner loops).

	For anyone familiar with IBM compilers on AIX, this is what the
-bmaxmem=NNN flag represents.  -O sets a useful default value and messages
about optimizations not performed recommend the value for -bmaxmem so that
the user can recompile with the space and time necessary if he or she so
chooses and the system can support that upper bound.

David


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]