Skip to content

Commit bccc85b

Browse files
committed
Move to AArch64
1 parent fb034f0 commit bccc85b

File tree

3 files changed

+7
-10
lines changed

3 files changed

+7
-10
lines changed

llvm/lib/Target/AArch64/AArch64Subtarget.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,10 @@ static cl::opt<bool> EnableZPRPredicateSpills(
9191
cl::desc(
9292
"Enables spilling/reloading SVE predicates as data vectors (ZPRs)"));
9393

94+
static cl::opt<unsigned>
95+
VScaleForTuningOpt("sve-vscale-for-tuning", cl::Hidden,
96+
cl::desc("Force a vscale for tuning factor for SVE"));
97+
9498
// Subreg liveness tracking is disabled by default for now until all issues
9599
// are ironed out. This option allows the feature to be used in tests.
96100
static cl::opt<bool>
@@ -364,6 +368,8 @@ void AArch64Subtarget::initializeProperties(bool HasMinSize) {
364368

365369
if (AArch64MinimumJumpTableEntries.getNumOccurrences() > 0 || !HasMinSize)
366370
MinimumJumpTableEntries = AArch64MinimumJumpTableEntries;
371+
if (VScaleForTuningOpt.getNumOccurrences() > 0)
372+
VScaleForTuning = VScaleForTuningOpt;
367373
}
368374

369375
AArch64Subtarget::AArch64Subtarget(const Triple &TT, StringRef CPU,

llvm/lib/Transforms/Vectorize/LoopVectorize.cpp

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -294,10 +294,6 @@ static cl::opt<bool> ForceTargetSupportsScalableVectors(
294294
"Pretend that scalable vectors are supported, even if the target does "
295295
"not support them. This flag should only be used for testing."));
296296

297-
static cl::opt<unsigned> VScaleForTuningOpt(
298-
"force-vscale-for-tuning", cl::Hidden,
299-
cl::desc("Force a vscale for tuning factor in the loop vectorizer"));
300-
301297
static cl::opt<unsigned> SmallLoopCost(
302298
"small-loop-cost", cl::init(20), cl::Hidden,
303299
cl::desc(
@@ -1467,11 +1463,6 @@ class LoopVectorizationCostModel {
14671463
/// vscale_range.min == vscale_range.max then return vscale_range.max, else
14681464
/// return the value returned by the corresponding TTI method.
14691465
void initializeVScaleForTuning() {
1470-
if (VScaleForTuningOpt.getNumOccurrences()) {
1471-
VScaleForTuning = VScaleForTuningOpt;
1472-
return;
1473-
}
1474-
14751466
const Function *Fn = TheLoop->getHeader()->getParent();
14761467
if (Fn->hasFnAttribute(Attribute::VScaleRange)) {
14771468
auto Attr = Fn->getFnAttribute(Attribute::VScaleRange);

llvm/test/Transforms/LoopVectorize/AArch64/scalable-vectorization-cost-tuning.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
; RUN: -force-target-instruction-cost=1 -passes=loop-vectorize -S -debug-only=loop-vectorize --disable-output < %s 2>&1 \
88
; RUN: | FileCheck %s --check-prefixes=VSCALEFORTUNING1
99

10-
; RUN: opt -mtriple=aarch64 -mattr=+sve -mcpu=generic -force-vscale-for-tuning=2 \
10+
; RUN: opt -mtriple=aarch64 -mattr=+sve -mcpu=generic -sve-vscale-for-tuning=2 \
1111
; RUN: -force-target-instruction-cost=1 -passes=loop-vectorize -S -debug-only=loop-vectorize --disable-output < %s 2>&1 \
1212
; RUN: | FileCheck %s --check-prefixes=VSCALEFORTUNING2
1313

0 commit comments

Comments
 (0)