Hi,

On Thu, Feb 17 2022, Erick Ochoa wrote:
>> If I understand you correctly, that is indeed the jump function,
>> obtainable through ipa_get_ith_jump_func (args, i) where args is a
>> result of ipa_edge_args_sum->get and i is the index of the parameter.
>>
>
> Thanks Martin!
>
> So then, am I correct in thinking that
>
> callsite foo -> bar
> param 0: PASS THROUGH: 0, op poiner_plus_expr 8
>   value: 0x0, mask 0xffffffffffffffff
>
> should be
>
> callsite foo -> bar
> param 0: PASS THROUGH: 0, op poiner_plus_expr 8
>   value: 0x0, mask 0xfffffffffffffff8
>

Ummm... no, it should not.  Jump functions just describe what can be
inferred about the parameter from the callers body, without any IPA
context (there is a caveat for inlined call graph nodes, but IPA-CP runs
before inlining).  And from the body of foo you do not know anything.

You can of course combine the jump function with the corresponding
lattice of the caller, like propagate_bits_across_jump_function does, to
get a better estimate, and you'll arrive at the value you seem to want.
I'm not sure if you tried your simple example, but it does.

Martin

Reply via email to