Skip to content

Commit

Permalink
Remove unused applyUserOptions
Browse files Browse the repository at this point in the history
Removing the unused implementation of applyUserOptions.
applyUserOptions was implemented only on Power so that on startup it was possible to disable P10 support when TR_EnableExperimentalPower10Support is not set.
applyUserOptions was ultimately implemented but never used.
Since the method is not implemented on any other platform, it should be removed from the class.

Signed-off-by: AlenBadel <Alen.Badel@ibm.com>
  • Loading branch information
AlenBadel authored and AlenBadel committed Feb 1, 2021
1 parent 7b4155a commit 318cb74
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 21 deletions.
3 changes: 1 addition & 2 deletions compiler/env/OMRCPU.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2000, 2020 IBM Corp. and others
* Copyright (c) 2000, 2021 IBM Corp. and others
*
* This program and the accompanying materials are made available under
* the terms of the Eclipse Public License 2.0 which accompanies this
Expand Down Expand Up @@ -166,7 +166,6 @@ class OMR_EXTENSIBLE CPU
void setMinorArch(TR::MinorArchitecture a) { _minorArch = a; }
bool isI386() { return _minorArch == TR::m_arch_i386; }
bool isAMD64() { return _minorArch == TR::m_arch_amd64; }
void applyUserOptions() {}

/**
* @brief Determines whether the Transactional Memory (TM) facility is available on the current processor.
Expand Down
18 changes: 1 addition & 17 deletions compiler/p/env/OMRCPU.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2000, 2020 IBM Corp. and others
* Copyright (c) 2000, 2021 IBM Corp. and others
*
* This program and the accompanying materials are made available under
* the terms of the Eclipse Public License 2.0 which accompanies this
Expand Down Expand Up @@ -192,19 +192,3 @@ OMR::Power::CPU::getOldProcessorTypeFromNewProcessorType(OMRProcessorArchitectur
return TR_FirstPPCProcessor;
}

void
OMR::Power::CPU::applyUserOptions()
{
// P10 support is not yet well-tested, so it's currently gated behind an environment
// variable to prevent it from being used by accident by users who use old versions of
// OMR once P10 chips become available.
if (_processorDescription.processor == OMR_PROCESSOR_PPC_P10)
{
static bool enableP10 = feGetEnv("TR_EnableExperimentalPower10Support");
if (!enableP10)
{
_processorDescription.processor = OMR_PROCESSOR_PPC_P9;
_processorDescription.physicalProcessor = OMR_PROCESSOR_PPC_P9;
}
}
}
3 changes: 1 addition & 2 deletions compiler/p/env/OMRCPU.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2000, 2020 IBM Corp. and others
* Copyright (c) 2000, 2021 IBM Corp. and others
*
* This program and the accompanying materials are made available under
* the terms of the Eclipse Public License 2.0 which accompanies this
Expand Down Expand Up @@ -130,7 +130,6 @@ class OMR_EXTENSIBLE CPU : public OMR::CPU
bool is(OMRProcessorArchitecture p);
bool isAtLeast(OMRProcessorArchitecture p);
bool isAtMost(OMRProcessorArchitecture p);
void applyUserOptions();

private:

Expand Down

0 comments on commit 318cb74

Please sign in to comment.