Skip to content

Commit

Permalink
Rename TR_DisableTOCForConstants to TR_DisableTOC
Browse files Browse the repository at this point in the history
The previous name for this option doesn't add much value
and the new name can be used to disable the TOC for
any number of reasons.

Signed-off-by: Dhruv Chopra <Dhruv.C.Chopra@ibm.com>
  • Loading branch information
dchopra001 committed Dec 3, 2019
1 parent 7d6908d commit 7ea1fec
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions compiler/arm/codegen/ConstantDataSnippet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ int32_t TR::ARMConstantDataSnippet::addConstantRequest(void *v,
{
fcursor = new (_cg->trHeapMemory()) TR::ARMConstant<float>(_cg, fin.fvalue);
_floatConstants.add(fcursor);
if (TR::Compiler->target.is64Bit() && !comp->getOption(TR_DisableTOCForConsts))
if (TR::Compiler->target.is64Bit() && !comp->getOption(TR_DisableTOC))
{
ret = TR_ARMTableOfConstants::lookUp(fin.fvalue, _cg);
fcursor->setTOCOffset(ret);
Expand Down Expand Up @@ -102,7 +102,7 @@ int32_t TR::ARMConstantDataSnippet::addConstantRequest(void *v,
{
dcursor = new (_cg->trHeapMemory()) TR::ARMConstant<double>(_cg, din.dvalue);
_doubleConstants.add(dcursor);
if (TR::Compiler->target.is64Bit() && !comp->getOption(TR_DisableTOCForConsts))
if (TR::Compiler->target.is64Bit() && !comp->getOption(TR_DisableTOC))
{
ret = TR_ARMTableOfConstants::lookUp(din.dvalue, _cg);
dcursor->setTOCOffset(ret);
Expand Down
2 changes: 1 addition & 1 deletion compiler/control/OMROptions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -539,7 +539,7 @@ TR::OptionTable OMR::Options::_jitOptions[] = {
{"disableTLE", "O\tdisable transactional lock elision", SET_OPTION_BIT(TR_DisableTLE), "F"},
{"disableTlhPrefetch", "O\tdisable software prefetch on allocation", SET_OPTION_BIT(TR_DisableTLHPrefetch), "F"},
{"disableTM", "O\tdisable transactional memory support", SET_OPTION_BIT(TR_DisableTM), "F"},
{"disableTOCForConsts", "O\tdisable use of the TOC for constants and floats materialization", SET_OPTION_BIT(TR_DisableTOCForConsts), "F"},
{"disableTOC", "O\tdisable use of the Table of Contents (TOC) on relevant architectures", SET_OPTION_BIT(TR_DisableTOC), "F"},
{"disableTraceRegDeps", "O\tdisable printing of register dependancies for each instruction in trace file", SET_OPTION_BIT(TR_DisableTraceRegDeps), "F"},
{"disableTraps", "C\tdisable trap instructions", SET_OPTION_BIT(TR_DisableTraps), "F"},
{"disableTreeCleansing", "O\tdisable tree cleansing", TR::Options::disableOptimization, treesCleansing, 0, "P"},
Expand Down
2 changes: 1 addition & 1 deletion compiler/control/OMROptions.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ enum TR_CompilationOptions
TR_TurnOffSelectiveNoOptServerIfNoStartupHint = 0x01000000 + 7,
TR_TraceDominators = 0x02000000 + 7,
TR_EnableHCR = 0x04000000 + 7, // enable hot code replacement
TR_DisableTOCForConsts = 0x08000000 + 7,
TR_DisableTOC = 0x08000000 + 7,
TR_UseLowPriorityQueueDuringCLP = 0x10000000 + 7,
TR_DisableVectorBCD = 0x20000000 + 7,
// Available = 0x40000000 + 7,
Expand Down
4 changes: 2 additions & 2 deletions compiler/p/codegen/OMRConstantDataSnippet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ int32_t OMR::ConstantDataSnippet::addConstantRequest(void *v,
{
fcursor = new (_cg->trHeapMemory()) PPCConstant<float>(_cg, fin.fvalue);
_floatConstants.add(fcursor);
if (TR::Compiler->target.is64Bit() && !comp->getOption(TR_DisableTOCForConsts))
if (TR::Compiler->target.is64Bit() && !comp->getOption(TR_DisableTOC))
{
ret = TR_PPCTableOfConstants::lookUp(fin.fvalue, _cg);
}
Expand Down Expand Up @@ -110,7 +110,7 @@ int32_t OMR::ConstantDataSnippet::addConstantRequest(void *v,
{
dcursor = new (_cg->trHeapMemory()) PPCConstant<double>(_cg, din.dvalue);
_doubleConstants.add(dcursor);
if (TR::Compiler->target.is64Bit() && !comp->getOption(TR_DisableTOCForConsts))
if (TR::Compiler->target.is64Bit() && !comp->getOption(TR_DisableTOC))
{
ret = TR_PPCTableOfConstants::lookUp(din.dvalue, _cg);
}
Expand Down
2 changes: 1 addition & 1 deletion compiler/p/codegen/OMRTreeEvaluator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ TR::Instruction *loadConstant(TR::CodeGenerator *cg, TR::Node * node, int64_t va
int32_t offset = PTOC_FULL_INDEX;

bool canUseTOC = (!TR::isJ9() || !isPicSite) &&
!comp->getOption(TR_DisableTOCForConsts);
!comp->getOption(TR_DisableTOC);
if (canUseTOC && useTOC)
offset = TR_PPCTableOfConstants::lookUp((int8_t *)&value, sizeof(int64_t), true, 0, cg);

Expand Down

0 comments on commit 7ea1fec

Please sign in to comment.