[Bug ipa/90401] Missed propagation of by-ref constant argument to callee function
fxue at os dot amperecomputing.com
gcc-bugzilla@gcc.gnu.org
Thu May 9 07:07:00 GMT 2019
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90401
--- Comment #2 from Feng Xue <fxue at os dot amperecomputing.com> ---
(In reply to Richard Biener from comment #1)
> Huh. IPA-CP dump difference:
>
> @@ -26,6 +26,8 @@
> Unknown VR
> callsite int caller(int, int&)/2 -> int callee(int&)/1 :
> param 0: UNKNOWN
> + Aggregate passed by reference:
> + offset: 0, cst: 1
> value: 0x0, mask: 0xfffffffffffffffc
> VR ~[0, 0]
> Jump functions of caller int callee(int&)/1:
This jump function is for the 2nd call. For the 1st call, IPA-CP can not deduce
that. So there is no enough benefit to convince IPA-CP to clone the "callee()".
>
> I guess somehow IPA-CP walks stmts for defs instead of virtual operands?
Yes, it is. IPA-CP only walks stmts in callsite basic block.
More information about the Gcc-bugs
mailing list