[llvm] [AArch64] Add getStreamingHazardSize() to AArch64Subtarget (PR #113679)

Sander de Smalen via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 25 09:07:54 PDT 2024


================
@@ -472,7 +482,8 @@ AArch64TargetMachine::getSubtargetImpl(const Function &F) const {
     resetTargetOptions(F);
     I = std::make_unique<AArch64Subtarget>(
         TargetTriple, CPU, TuneCPU, FS, *this, isLittle, MinSVEVectorSize,
-        MaxSVEVectorSize, IsStreaming, IsStreamingCompatible, HasMinSize);
+        MaxSVEVectorSize, IsStreaming, IsStreamingCompatible,
+        StreamingHazardSize, HasMinSize);
----------------
sdesmalen-arm wrote:

The streaming and vector size properties come from function attributes, so they need to be passed to the subtarget when constructing it in `AArch64TargetMachine::getSubtargetImpl(const Function &)`.
For the option in this PR there is no corresponding function attribute and therefore no need for the indirection, so it makes sense to move the option to AArch64Subtarget.cpp.

https://github.com/llvm/llvm-project/pull/113679


More information about the llvm-commits mailing list