[PATCH] Add range checking for Thumb2 PC-relative loads

Tim Northover t.p.northover at gmail.com
Mon Jul 22 07:29:26 PDT 2013


Hi Mihail,

Thanks for working on this.

> I fixed the coding style and removed the RTTI usage. Also added two more tests.

I think you missed the "addThumbMemPCOperands" function in the code
style cleanup (it also has a dyn_cast which is really an isa, inside
the assert).

Also, I've just noticed that the "OperandThumbMemPC" class is
unnecessay. You can "def ThumbMemPC : AsmOperandClass" directly.

> Flipping the emit bit doesn't seem to make any difference for some reason,
> so I propose to leave as is.

That's expected; as I said, TableGen is too limited to cope with
ComplexOperands (amongst other things) when printing aliases. Fixing
that is on my list of things to do when I'm bored (it's responsible
for quite a bit of non-canonical output in the AArch64 backend, for
example).

When that happens it would be best to have as few incorrect
InstAliases that need fixing as possible. Certainly it's a bad idea to
knowingly introduce them with incorrect flags.

Cheers.

Tim,



More information about the llvm-commits mailing list