On 13/03/14 12:31, [email protected] wrote:
> Ulan just pointed me to https://codereview.chromium.org/169223004/, which
> is a
> subset of this CL. I think that the discussion about pointer aliasing is
> right
> in theory, but very wrong in practice: We do *exactly* the same casts in
> the ARM
> emulator for years, without any problems. Furthermore, we have *tons* of
> casts
> in v8 which are wrong under strict aliasing rules. (You can talk to Mads
> about
> this, he was very passionate about this ;-)

I have had to debug things caused by strict aliasing problems in the
past, and it wasn't easy to track down the cause. Nonetheless, the
problems are rare in practice, as you say.

Also, some of the memcpy uses in the CL are completely optimised away.
In those cases, there's no good reason to use a reinterpret_cast so they
should probably stay.

> If there are no other (mostly theoretical) objections, I very much like to
> land
> this, because it saves a tremendous amount of developer/bot time with a tiny
> change.

If you do this, consider adding -fno-strict-aliasing to the build
configuration. That works for GCC; I don't know if Clang has an equivalent.

Some configuration exists for this already: strictaliasing=off

> The *right* way of doing this is either throwing away the useless
> distinction
> between Instr and Instruction or make Instruction carry an Instr as a member
> field, but this would probably be a bigger change. If somebody has time
> left it
> can be done, but in the meantime let's speed up our daily work.
>
> https://codereview.chromium.org/195873009/
>


-- IMPORTANT NOTICE: The contents of this email and any attachments are 
confidential and may also be privileged. If you are not the intended recipient, 
please notify the sender immediately and do not disclose the contents to any 
other person, use it for any purpose, or store or copy the information in any 
medium.  Thank you.

ARM Limited, Registered office 110 Fulbourn Road, Cambridge CB1 9NJ, Registered 
in England & Wales, Company No:  2557590
ARM Holdings plc, Registered office 110 Fulbourn Road, Cambridge CB1 9NJ, 
Registered in England & Wales, Company No:  2548782

-- 
-- 
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- 
You received this message because you are subscribed to the Google Groups 
"v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to