[llvm-commits] [Fwd: [llvm] r82689 - in /llvm/trunk: lib/Transforms/IPO/IPConstantPropagation.cpp lib/Transforms/Scalar/SCCP.cpp test/Transforms/IPConstantProp/2009-09-24-byval-ptr.ll]

Török Edwin edwintorok at gmail.com
Thu Sep 24 05:07:17 CDT 2009


Hi Tanya,

If there is still time, can you pull this into 2.6?

It fixes a rather serious bug in ipsccp, see PR5038 (modifying a struct
passed byval changed the original struct passed, because IPSCCP constant
propagated the pointer).

It may pessimize the code in some cases (struct passed byval, then read
from it, the pointer is no longer const-propagated), but that is better
than generating wrong code.


P.S.: why are struct passed by value represented as a pointer with byval
attribute, when it is not a pointer in the usual sense, rather a pointer
to a temporary?
Should we introduce a method (for 2.7) in CallSite that tells you wether
you can constant-prop/make assumptions based on the parameter passed at
the callsite
(which would be false for byval).

Best regards,
--Edwin
-------------- next part --------------
An embedded message was scrubbed...
From: Torok Edwin <edwintorok at gmail.com>
Subject: [llvm-commits] [llvm] r82689 - in /llvm/trunk:
	lib/Transforms/IPO/IPConstantPropagation.cpp
	lib/Transforms/Scalar/SCCP.cpp
	test/Transforms/IPConstantProp/2009-09-24-byval-ptr.ll
Date: Thu, 24 Sep 2009 09:47:19 -0000
Size: 7371
Url: http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20090924/2b17362a/attachment.eml 


More information about the llvm-commits mailing list