[PATCH] D106277: [SVE] Remove the interface for getMaxVScale in favour of the IR attributes
    Craig Topper via Phabricator via cfe-commits 
    cfe-commits at lists.llvm.org
       
    Thu Jul 22 11:47:53 PDT 2021
    
    
  
craig.topper added inline comments.
================
Comment at: clang/lib/CodeGen/CodeGenFunction.cpp:507
+    CurFn->addFnAttr(
+        llvm::Attribute::getWithVScaleRangeArgs(getLLVMContext(), 0, 16));
   }
----------------
Thinking about this more, maybe these values should be returned from a new interface on TargetInfo? Maybe using Optional so you can default to None for other targets? This way you don't have AArch64 specific numbers hardcoded in a file that doesn't belong to AArch64? But maybe the damage was already done with the "/ 128" in the ArmSveVectorBits code above. Maybe you can unify both into a new TargetInfo function? Does TargetInfo have access to LangOpts?
Repository:
  rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D106277/new/
https://reviews.llvm.org/D106277
    
    
More information about the cfe-commits
mailing list