[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
Fri Jun 16 11:03:40 PDT 2017


sfertile added inline comments.


================
Comment at: lib/Target/PowerPC/PPCISelLowering.cpp:4254
+static bool
+shouldAssumeDifferentTOC(const Function *Caller, SDValue Callee,
+                                     const TargetMachine &TM) {
----------------
gyiu wrote:
> Should we just move the code from this function to the existing resideInSameSection() function and rename the function itself?  I see in there we're also checking 
> 
>     GlobalAddressSDNode *G = dyn_cast<GlobalAddressSDNode>(Callee);
>     if (!G)
>       return true;
I think that is a good suggestion. I can't think of any other reason we would want to see if 2 symbols reside in the same section other then if they share a TOC base. I'll update it.


Repository:
  rL LLVM

https://reviews.llvm.org/D34245





More information about the llvm-commits mailing list