[llvm] [ConstantHoisting] Add a TTI hook to prevent hoisting. (PR #69004)
    Nikita Popov via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Wed Dec 13 05:29:51 PST 2023
    
    
  
================
@@ -427,6 +427,11 @@ class TargetTransformInfoImplBase {
     return TTI::TCC_Free;
   }
 
+  bool preferToKeepConstantsAttached(const Instruction &Inst,
+                                     const Function &Fn) const {
+    return true;
----------------
nikic wrote:
Shouldn't this default implementation return false rather than true?
https://github.com/llvm/llvm-project/pull/69004
    
    
More information about the llvm-commits
mailing list