Hi Andrew,
Thanks for your explain! And sorry for later reply. Andrew MacLeod <amacl...@redhat.com> writes: > On 9/14/23 22:07, Jiufu Guo wrote: >>> >>> undefined is a perfectly acceptable range. It can be used to >>> represent either values which has not been initialized, or more >>> frequently it identifies values that cannot occur due to >>> conflicting/unreachable code. VARYING means it can be any range, >>> UNDEFINED means this is unusable, so treat it accordingly. Its >>> propagated like any other range. >> "undefined" means the ranger is unusable. So, for this ranger, it >> seems only "undefined_p ()" can be checked, and it seems no other >> functions of this ranger can be called. > > not at all. It means ranger has determined that there is no valid > range for the item you are asking about probably due to conflicting > conditions, which imparts important information about the range.. or > lack of range :-) > > Quite frequently it means you are looking at a block of code that > ranger knows is unreachable, but a pass of the compiler which removes > such blocks has not been called yet.. so the awareness imparted is > that there isn't much point in doing optimizations on it because its > probably going to get thrown away by a following pass. > >> >> I'm thinking that it may be ok to let "range_of_expr" return false >> if the "vr" is "undefined_p". I know this may change the meaning >> of "range_of_expr" slightly :) > > No. That would be like saying NULL is not a valid value for a > pointer. undefined_p has very specific meaning that we use.. it just > has no type. Oh, get it.:) BR, Jeff (Jiufu Guo) > > Andrew