[Lldb-commits] [PATCH] EmulationStateARM: Don't have >= comparisons against dwarf_r0

Todd Fiala tfiala at google.com
Wed Jul 30 13:39:22 PDT 2014


I dunno - this is encoding some logic that makes sure the reg number is
between r0 and cpsr.  The fact that r0 happens to be zero is convenient in
this case, but taking that out is taking out some documentation of what the
code is really doing.

In general I'm not a fan of removing semantic information that is
meaningful to humans even if the compiler can optimize it to a simpler
expression.  If this code were ever copied for another architecture where
the equivalent of r0 was a different number, or if the reg_num was turned
to a typedef and that changed to, say, an int, we've not only lost semantic
info but also real logic.

That's my 2 cents.

-Todd


On Wed, Jul 30, 2014 at 1:33 PM, Zachary Turner <zturner at google.com> wrote:

> For trivial warning fixes you can probably just submit.
>
> http://reviews.llvm.org/D4629
>
>
>


-- 
Todd Fiala | Software Engineer | tfiala at google.com | 650-943-3180
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20140730/3c44ce3a/attachment.html>


More information about the lldb-commits mailing list