<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">See following, <br>
<br>
Also, I decide to make less attention to this issue. I cannot
afford the time. <br>
Not only triaging the problem exposed by your commit took me lots
of time, it also took me <br>
some time to let you pay attention to potential problem I figured
out, and now I try to<br>
convince you breaking assumption would open a big can of worm,
and you certainly <br>
have alternative to avoid. <br>
<br>
<font color="#ff0000"><big>I would ask the list members to share
insight on this issue. </big></font>Since this original
checkin<br>
break bootstrap book with LTO, it may break the build in the
future. <br>
<br>
On 03/03/2013 09:30 AM, Nuno Lopes wrote:<br>
</div>
<blockquote cite="mid:F3FCFA88CD9F4E9BBE9CD0C0CAD30973@pc07654"
type="cite">
<blockquote type="cite">I emphasize that your problematic should
not resurrected without addressing my concerns I put
<br>
in PR14988. I'm rather disappointed that you still go ahead
resurrect your change.
<br>
<br>
The ObjectSizeOffsetVisitor::visitPhiNode() dosen't guarantee if
all operands points to the same
<br>
objects. While it would not lead to problem if the function is
called in the context of alias analysis.
<br>
It would cause problem when instcombine try to replace
llvm.objectsize() to constant.
<br>
</blockquote>
<br>
I don't think that's true.
<br>
It is correct that visitPhiNode() can return a known size if the
phi node may point to multiple objects. But that will only happen
if *all* those objects have exactly the same size.
<br>
When instcombine folds llvm.objectsize() to a constant, it doesn't
need to know *exactly* to which objects its argument is pointing
to. </blockquote>
<br>
How do you know all potential uses of this llvm.objectsize(p). One
might use this function to figure out if p is pointing to single
object. <br>
Your function break the assumption of ObjectSizeOffset class. While
the class dose not explicitly claim the assumption is "single
object", <br>
the reader and the client of this class tend to take that for
granted. <br>
<br>
Can you guarantee that breaking such assumption is 100% safe for
what we have today, and 100% for the future.<br>
<br>
<br>
<br>
<blockquote cite="mid:F3FCFA88CD9F4E9BBE9CD0C0CAD30973@pc07654"
type="cite">But if all the pointed-to objects have the same size,
then you can still fold llvm.objectsize() to a constant, since
you're sure that whaetever object it will point to at run time, it
will have the size you computed.
<br>
<br>
But please send an example if you believe I'm wrong.
<br>
<br>
</blockquote>
I repeat over and over again, it is potential problem. Breaking an
assumption tend to open a big can of worm. <br>
Apparently, I believe you have alternative to solve this problem,
by walking phi operand in getUnderlyingObject(), to <br>
rewind the pointer to the base address of underlying object, this
way, you obviate the need to break the assumption <br>
in ObjectSizeOffsetVisitor::visitPhiNode(). <br>
<br>
Also, in r176407, how about bring the comment to the "Object" back.
I think that comment is useful for reader. <br>
<br>
<br>
<br>
<br>
</body>
</html>