[PATCH] D22870: [AArch64] Return the correct size for TLSDESC_CALLSEQ

Tim Northover via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 27 09:15:11 PDT 2016


t.p.northover accepted this revision.
t.p.northover added a comment.
This revision is now accepted and ready to land.

> It would be nice if we could identify other situations where this might happen - I'm not convinced GetInstSizeInBytes is catching all the special cases.


I'm convinced it doesn't. Its heuristic for inline asm is flat-out wrong from what I remember (count the number of lines and multiply by 4).

Anyway, the patch looks fine with just one minor comment change in case anyone has to read it again:


================
Comment at: test/CodeGen/MIR/AArch64/inst-size-tlsdesc-callseq.mir:27-28
@@ +26,4 @@
+# If the size of TLSDESC_CALLSEQ is computed correctly, that will push
+# the bb.2.false block too far away from the TBNZW, so the branch will
+# have to be relaxed.
+# CHECK: TBZW killed %w0, 0, %bb.1.true
----------------
Could you reiterate that you're using aarch64-tbz-offset-bits here. I was thoroughly confused, and spent 5 minutes looking for the massive space-consuming instruction below.


https://reviews.llvm.org/D22870





More information about the llvm-commits mailing list