[PATCH] D34245: [PowerPC] Refine the checking for emiting TOC restore nops and Tail-Call eligibility.

Sean Fertile via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Jun 25 12:54:29 PDT 2017


sfertile marked 7 inline comments as done.
sfertile added inline comments.


================
Comment at: lib/Target/PowerPC/PPCISelLowering.cpp:4265
+  // Check if Callee resides in the same section, because for Small codemodel,
+  // we could end up with multiple TOCs in the same module.
+  // ref: https://bugzilla.mozilla.org/show_bug.cgi?id=973977
----------------
hfinkel wrote:
> This does not explain why this cannot happen for the other code models. The ABI is a bit ambiguous here, saying "The medium code model is expected to provide a sufficiently large TOC to provide all data addressing needs of a module with a single TOC." Expected, however, does not mean "must". We need to supplement here with some additional explanation of what existing linkers actually do (e.g. that neither ld.bfd nor ld.gold will create multiple TOCs for anything other than the small code model, regardless of what might be theoretically allowed).
I'm going to send an email to Alan Modra to verify my understanding of the behavior for medium and large code models is correct for both gold and ld. I'll update this comment to reflect that once I get an answer. 


Repository:
  rL LLVM

https://reviews.llvm.org/D34245





More information about the llvm-commits mailing list