[llvm] [GlobalOpt] Add TTI interface useFastCCForInternalCall for FASTCC (PR #164768)
    Nikita Popov via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Thu Oct 23 01:13:36 PDT 2025
    
    
  
================
@@ -319,6 +319,10 @@ class X86TTIImpl final : public BasicTTIImplBase<X86TTIImpl> {
   unsigned getStoreMinimumVF(unsigned VF, Type *ScalarMemTy,
                              Type *ScalarValTy) const override;
 
+  bool useFastCCForInternalCall(Function &F) const override {
+    return !ST->is64Bit() || ST->hasEGPR();
+  }
----------------
nikic wrote:
Hm, I don't really follow.
If we have no-EGPR -> EGPR, then the EGPR function may expect arguments to be passed in EGPR registers, while the no-EGPR function will push them to the stack.
If we have EGPR -> no-EGPR, then the EGPR function may pass arguments in EGPR registers, while the no-EGPR function will expect them to be on the stack.
Am I missing something here?
https://github.com/llvm/llvm-project/pull/164768
    
    
More information about the llvm-commits
mailing list