Skip to content

Commit 5192cb7

Browse files
committed
[AArch64] Add hidden option to enable subreg liveness tracking.
Subreg liveness tracking is disabled by default for now until all issues are ironed out. This option allows the feature to be used in tests.
1 parent 0c8e12f commit 5192cb7

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

llvm/lib/Target/AArch64/AArch64Subtarget.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,13 @@ static cl::alias AArch64StreamingStackHazardSize(
8686
cl::desc("alias for -aarch64-streaming-hazard-size"),
8787
cl::aliasopt(AArch64StreamingHazardSize));
8888

89+
// Subreg liveness tracking is disabled by default for now until all issues
90+
// are ironed out. This option allows the feature to be used in tests.
91+
static cl::opt<bool>
92+
EnableSubregLivenessTracking("aarch64-enable-subreg-liveness-tracking",
93+
cl::init(false), cl::Hidden,
94+
cl::desc("Enable subreg liveness tracking"));
95+
8996
unsigned AArch64Subtarget::getVectorInsertExtractBaseCost() const {
9097
if (OverrideVectorInsertExtractBaseCost.getNumOccurrences() > 0)
9198
return OverrideVectorInsertExtractBaseCost;
@@ -380,6 +387,8 @@ AArch64Subtarget::AArch64Subtarget(const Triple &TT, StringRef CPU,
380387
ReserveXRegisterForRA.set(29);
381388

382389
AddressCheckPSV.reset(new AddressCheckPseudoSourceValue(TM));
390+
391+
EnableSubregLiveness = EnableSubregLivenessTracking.getValue();
383392
}
384393

385394
const CallLowering *AArch64Subtarget::getCallLowering() const {

llvm/lib/Target/AArch64/AArch64Subtarget.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,8 @@ class AArch64Subtarget final : public AArch64GenSubtargetInfo {
9090
unsigned VScaleForTuning = 2;
9191
TailFoldingOpts DefaultSVETFOpts = TailFoldingOpts::Disabled;
9292

93+
bool EnableSubregLiveness;
94+
9395
/// TargetTriple - What processor and OS we're targeting.
9496
Triple TargetTriple;
9597

@@ -153,6 +155,7 @@ class AArch64Subtarget final : public AArch64GenSubtargetInfo {
153155
const Triple &getTargetTriple() const { return TargetTriple; }
154156
bool enableMachineScheduler() const override { return true; }
155157
bool enablePostRAScheduler() const override { return usePostRAScheduler(); }
158+
bool enableSubRegLiveness() const override { return EnableSubregLiveness; }
156159

157160
bool enableMachinePipeliner() const override;
158161
bool useDFAforSMS() const override { return false; }

0 commit comments

Comments
 (0)