Skip to content

Commit 5b33fe0

Browse files
committed
Remove isDebugExtension
isDebugExtension was extended in TR_DebugExt to denote that the object was not the traditional TR_Debug object. However, as TR_DebugExt no longer exists, there is no need for this virtual method. Signed-off-by: Irwin D'Souza <dsouzai.gh@gmail.com>
1 parent d299610 commit 5b33fe0

File tree

3 files changed

+88
-127
lines changed

3 files changed

+88
-127
lines changed

compiler/ras/Debug.cpp

Lines changed: 56 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -1006,8 +1006,7 @@ TR_Debug::nodePrintAllFlags(TR::Node *node, TR_PrettyPrinterString &output)
10061006
output.append(format, node->printIsInvalid8BitGlobalRegister());
10071007
output.append(format, node->printIsDirectMemoryUpdate());
10081008
output.append(format, node->printIsTheVirtualCallNodeForAGuardedInlinedCall());
1009-
if (!inDebugExtension())
1010-
output.append(format, node->printIsDontTransformArrayCopyCall());
1009+
output.append(format, node->printIsDontTransformArrayCopyCall());
10111010
output.append(format, node->printIsNodeRecognizedArrayCopyCall());
10121011
output.append(format, node->printCanDesynchronizeCall());
10131012
output.append(format, node->printContainsCompressionSequence());
@@ -1087,8 +1086,7 @@ TR_Debug::nodePrintAllFlags(TR::Node *node, TR_PrettyPrinterString &output)
10871086
output.append(format, node->printUseCallForFloatToFixedConversion());
10881087
#ifdef J9_PROJECT_SPECIFIC
10891088
output.append(format, node->printCleanSignDuringPackedLeftShift());
1090-
if (!inDebugExtension())
1091-
output.append(format, node->printIsInMemoryCopyProp());
1089+
output.append(format, node->printIsInMemoryCopyProp());
10921090
#endif
10931091
output.append(format, node->printAllocationCanBeRemoved());
10941092
output.append(format, node->printArrayTRT());
@@ -1139,8 +1137,7 @@ TR_Debug::print(TR::SymbolReference * symRef, TR_PrettyPrinterString& output, bo
11391137

11401138
if (sym)
11411139
{
1142-
if (!inDebugExtension() &&
1143-
_comp->cg()->getMappingAutomatics() &&
1140+
if (_comp->cg()->getMappingAutomatics() &&
11441141
sym->isRegisterMappedSymbol() &&
11451142
sym->getRegisterMappedSymbol()->getOffset() != 0)
11461143
{
@@ -1210,53 +1207,45 @@ TR_Debug::print(TR::SymbolReference * symRef, TR_PrettyPrinterString& output, bo
12101207
case TR::Symbol::IsMethod:
12111208
{
12121209
TR::MethodSymbol *methodSym = sym->castToMethodSymbol();
1213-
if (!inDebugExtension())
1210+
if (methodSym->isNative())
1211+
symRefKind.append(" native");
1212+
switch (methodSym->getMethodKind())
12141213
{
1215-
if (methodSym->isNative())
1216-
symRefKind.append(" native");
1217-
switch (methodSym->getMethodKind())
1218-
{
1219-
case TR::MethodSymbol::Virtual:
1220-
symRefKind.append(" virtual");
1221-
break;
1222-
case TR::MethodSymbol::Interface:
1223-
symRefKind.append(" interface");
1224-
break;
1225-
case TR::MethodSymbol::Static:
1226-
symRefKind.append(" static");
1227-
break;
1228-
case TR::MethodSymbol::Special:
1229-
symRefKind.append(" special");
1230-
break;
1231-
case TR::MethodSymbol::Helper:
1232-
symRefKind.append(" helper");
1233-
break;
1234-
case TR::MethodSymbol::ComputedStatic:
1235-
symRefKind.append(" computed-static");
1236-
break;
1237-
case TR::MethodSymbol::ComputedVirtual:
1238-
symRefKind.append(" computed-virtual");
1239-
break;
1240-
default:
1241-
symRefKind.append(" UNKNOWN");
1242-
break;
1243-
}
1244-
1245-
symRefKind.append(" Method");
1246-
symRefName.append(" %s", getName(symRef));
1247-
TR_OpaqueClassBlock *clazz = containingClass(symRef);
1248-
if (clazz)
1249-
{
1250-
if (TR::Compiler->cls.isInterfaceClass(_comp, clazz))
1251-
otherInfo.append( " (Interface class)");
1252-
else if (TR::Compiler->cls.isAbstractClass(_comp, clazz))
1253-
otherInfo.append( " (Abstract class)");
1254-
}
1214+
case TR::MethodSymbol::Virtual:
1215+
symRefKind.append(" virtual");
1216+
break;
1217+
case TR::MethodSymbol::Interface:
1218+
symRefKind.append(" interface");
1219+
break;
1220+
case TR::MethodSymbol::Static:
1221+
symRefKind.append(" static");
1222+
break;
1223+
case TR::MethodSymbol::Special:
1224+
symRefKind.append(" special");
1225+
break;
1226+
case TR::MethodSymbol::Helper:
1227+
symRefKind.append(" helper");
1228+
break;
1229+
case TR::MethodSymbol::ComputedStatic:
1230+
symRefKind.append(" computed-static");
1231+
break;
1232+
case TR::MethodSymbol::ComputedVirtual:
1233+
symRefKind.append(" computed-virtual");
1234+
break;
1235+
default:
1236+
symRefKind.append(" UNKNOWN");
1237+
break;
12551238
}
1256-
else
1239+
1240+
symRefKind.append(" Method");
1241+
symRefName.append(" %s", getName(symRef));
1242+
TR_OpaqueClassBlock *clazz = containingClass(symRef);
1243+
if (clazz)
12571244
{
1258-
symRefKind.append(" Method", TR_Debug::getName(symRef));
1259-
symRefName.append(" %s", TR_Debug::getName(symRef));
1245+
if (TR::Compiler->cls.isInterfaceClass(_comp, clazz))
1246+
otherInfo.append( " (Interface class)");
1247+
else if (TR::Compiler->cls.isAbstractClass(_comp, clazz))
1248+
otherInfo.append( " (Abstract class)");
12601249
}
12611250
}
12621251
break;
@@ -2245,24 +2234,21 @@ TR_Debug::printBlockInfo(TR::FILE *pOutFile, TR::Node *node)
22452234
TR_BlockStructure *blockStructure = block->getStructureOf();
22462235
if (_comp->getFlowGraph()->getStructure() && blockStructure)
22472236
{
2248-
if (!inDebugExtension())
2237+
TR_Structure *parent = blockStructure->getParent();
2238+
while (parent)
22492239
{
2250-
TR_Structure *parent = blockStructure->getParent();
2251-
while (parent)
2240+
TR_RegionStructure *region = parent->asRegion();
2241+
if (region->isNaturalLoop() ||
2242+
region->containsInternalCycles())
22522243
{
2253-
TR_RegionStructure *region = parent->asRegion();
2254-
if (region->isNaturalLoop() ||
2255-
region->containsInternalCycles())
2256-
{
2257-
trfprintf(pOutFile, " (in loop %d)", region->getNumber());
2258-
break;
2259-
}
2260-
parent = parent->getParent();
2244+
trfprintf(pOutFile, " (in loop %d)", region->getNumber());
2245+
break;
22612246
}
2262-
TR_BlockStructure *dupBlock = blockStructure->getDuplicatedBlock();
2263-
if (dupBlock)
2264-
trfprintf(pOutFile, " (dup of block_%d)", dupBlock->getNumber());
2247+
parent = parent->getParent();
22652248
}
2249+
TR_BlockStructure *dupBlock = blockStructure->getDuplicatedBlock();
2250+
if (dupBlock)
2251+
trfprintf(pOutFile, " (dup of block_%d)", dupBlock->getNumber());
22662252
}
22672253
}
22682254
else if (node && node->getOpCodeValue() == TR::BBEnd)
@@ -3543,8 +3529,7 @@ TR_Debug::dump(TR::FILE *pOutFile, TR_CHTable * chTable)
35433529
trfprintf(pOutFile, " Class Hierarchy Assumption Table\n");
35443530
trfprintf(pOutFile, "----------------------------------------------------------------------------------------\n");
35453531

3546-
if (!inDebugExtension() &&
3547-
!vguards.empty())
3532+
if (!vguards.empty())
35483533
{
35493534
uint8_t *startPC = _comp->cg()->getCodeStart();
35503535

@@ -3753,7 +3738,7 @@ TR_Debug::getRuntimeHelperName(int32_t index)
37533738
}
37543739
}
37553740
#ifdef TR_TARGET_X86
3756-
else if ((_comp->target().cpu.isI386() || _comp->target().cpu.isAMD64()) && !inDebugExtension())
3741+
else if (_comp->target().cpu.isI386() || _comp->target().cpu.isAMD64())
37573742
{
37583743
if (index < TR_LXRH)
37593744
{
@@ -3843,7 +3828,7 @@ TR_Debug::getRuntimeHelperName(int32_t index)
38433828
}
38443829
}
38453830
#elif defined (TR_TARGET_POWER)
3846-
else if (_comp->target().cpu.isPower() && !inDebugExtension())
3831+
else if (_comp->target().cpu.isPower())
38473832
{
38483833
switch (index)
38493834
{
@@ -3954,7 +3939,7 @@ TR_Debug::getRuntimeHelperName(int32_t index)
39543939
}
39553940
}
39563941
#elif defined (TR_TARGET_S390)
3957-
else if (_comp->target().cpu.isZ() && !inDebugExtension())
3942+
else if (_comp->target().cpu.isZ())
39583943
{
39593944
switch (index)
39603945
{
@@ -4041,7 +4026,7 @@ TR_Debug::getRuntimeHelperName(int32_t index)
40414026
}
40424027
}
40434028
#elif defined (TR_TARGET_ARM)
4044-
else if (_comp->target().cpu.isARM() && !inDebugExtension())
4029+
else if (_comp->target().cpu.isARM())
40454030
{
40464031
switch (index)
40474032
{
@@ -4175,7 +4160,7 @@ TR_Debug::getRuntimeHelperName(int32_t index)
41754160
}
41764161
}
41774162
#elif defined (TR_TARGET_ARM64)
4178-
else if (_comp->target().cpu.isARM64() && !inDebugExtension())
4163+
else if (_comp->target().cpu.isARM64())
41794164
{
41804165
switch (index)
41814166
{
@@ -4222,9 +4207,6 @@ TR_Debug::getRuntimeHelperName(int32_t index)
42224207
#endif
42234208
#endif // J9_PROJECT_SPECIFIC
42244209

4225-
if (inDebugExtension())
4226-
return "platform specific - not implemented";
4227-
42284210
return "unknown helper";
42294211
}
42304212

compiler/ras/Debug.hpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -674,7 +674,6 @@ class TR_Debug
674674
virtual void print(TR::FILE *, TR_RegionStructure * regionStructure, uint32_t indentation);
675675
virtual void printSubGraph(TR::FILE *, TR_RegionStructure * regionStructure, uint32_t indentation);
676676
virtual void print(TR::FILE *, TR_InductionVariable * inductionVariable, uint32_t indentation);
677-
virtual bool inDebugExtension() { return false; }
678677
virtual void* dxMallocAndRead(uintptr_t size, void *remotePtr, bool dontAddToMap = false){return remotePtr;}
679678
virtual void* dxMallocAndReadString(void *remotePtr, bool dontAddToMap = false){return remotePtr;}
680679
virtual void dxFree(void * localPtr){return;}

0 commit comments

Comments
 (0)