On 9/19/26 10:54 PM, Liu, Hongtao wrote:
aff_combination_scale (aff_var, rat);
return true;
@@ -8246,6 +8247,8 @@ tree_ssa_iv_optimize (void)
tree_ssa_iv_optimize_init (&data);
mark_ssa_maybe_undefs ();
+ enable_ranger (cfun, false);
This looks good now, but I'm curious why you (need to?) pass false to the
use_imm_uses parameter? I'm not really sure what this guards inside ranger.
My rough understanding is enable_ranger (cfun, true) will enable inferred range
to get more precise range and cost more compile time.
With false for use_imm_users, there're no correctness issue, just wider range
for some values, but it's enough for the issue.
This is more or less true. The on-demand model will look up any
definitions it needs as well as any uses that feed control flow. It
wouldn't be able to see other uses such as a dereference at some point
in the program that causes a range to be non-null later in the program.
When TRUE is passed in, ranger will zip along all the immediate use's
of a name as well to see if there are any statements that cause an
inferred range.
Andrew