[llvm-commits] PATCH: BasicBlock metadata
Richard Osborne
richard at xmos.com
Tue May 8 05:07:26 PDT 2012
On 08/05/12 11:29, Ralf Karrenberg wrote:
> On 5/8/12 11:40 AM, Richard Osborne wrote:
>>> Cheers,
>>> Ralf
>>> /// hasAddressTaken - returns true if there are any uses of this basic block
>>> /// other than direct branches, switches, etc. to it.
>>> - bool hasAddressTaken() const { return getSubclassDataFromValue() != 0; }
>>> + bool hasAddressTaken() const {
>>> + return (getSubclassDataFromValue()& ~HasMetadataBit) != 0;
>>> + }
>> I think this will result in basic block metadata effecting
>> optimizations. What would happen if you just ignored metadata here?
> It will always treat a block that has metadata attached as a block
> whose address has been taken, which results in a crash at a later
> point (don't remember exactly where) because the address was never taken.
Ah sorry, I totally misread this bit of the code. It looks fine to me.
--
Richard Osborne | XMOS
http://www.xmos.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20120508/3d412729/attachment.html>
More information about the llvm-commits
mailing list