Skip to content

Commit

Permalink
Remove references to OpenJ9 private linkage
Browse files Browse the repository at this point in the history
J9 private linkage has been largely isolated to OpenJ9 and moved
into the J9 namespace.  Remove unused references in OMR and for
code guarded in project-specific macros reference the appropriate
private linkage class in the J9 namespace.

Signed-off-by: Daryl Maier <maier@ca.ibm.com>
  • Loading branch information
0xdaryl committed Nov 5, 2019
1 parent 3986037 commit c6cd450
Show file tree
Hide file tree
Showing 7 changed files with 3 additions and 45 deletions.
1 change: 0 additions & 1 deletion compiler/arm/codegen/OMRCodeGenerator.cpp
Expand Up @@ -22,7 +22,6 @@
#include <stdint.h>
#include "arm/codegen/ARMInstruction.hpp"
#ifdef J9_PROJECT_SPECIFC
#include "arm/codegen/ARMPrivateLinkage.hpp"
#include "arm/codegen/ARMRecompilation.hpp"
#endif
#include "arm/codegen/ARMSystemLinkage.hpp"
Expand Down
3 changes: 0 additions & 3 deletions compiler/arm/codegen/OMRLinkage.cpp
Expand Up @@ -22,9 +22,6 @@
#include "arm/codegen/Linkage.hpp"

#include "arm/codegen/ARMInstruction.hpp"
#ifdef J9_PROJECT_SPECIFIC
#include "arm/codegen/ARMPrivateLinkage.hpp"
#endif
#include "arm/codegen/ARMSystemLinkage.hpp"
#ifdef J9_PROJECT_SPECIFIC
#include "codegen/CallSnippet.hpp"
Expand Down
20 changes: 0 additions & 20 deletions compiler/x/i386/codegen/IA32SystemLinkage.hpp
Expand Up @@ -53,26 +53,6 @@ class IA32SystemLinkage : public TR::X86SystemLinkage
virtual uint32_t getAlignment(TR::DataType);
};

#if 0
class IA32SystemLinkage : public TR::IA32PrivateLinkage
{
public:

IA32SystemLinkage(TR::CodeGenerator *cg);

virtual TR::Register *buildDirectDispatch(TR::Node *callNode, bool spillFPRegs);
virtual TR::Register *buildIndirectDispatch(TR::Node *callNode);
virtual TR::Register *buildAlloca(TR::Node *callNode);
virtual TR::Register *pushStructArg(TR::Node* child);
virtual void notifyHasalloca(){}

protected:

TR::Register *buildDispatch(TR::Node *callNode);

};
#endif

}

#endif
4 changes: 2 additions & 2 deletions compiler/x/i386/codegen/OMRTreeEvaluator.cpp
Expand Up @@ -1516,7 +1516,7 @@ TR::Register *OMR::X86::I386::TreeEvaluator::integerPairDivEvaluator(TR::Node *n
TR::RegisterDependencyConditions *dependencies = generateRegisterDependencyConditions((uint8_t)0, 2, cg);
dependencies->addPostCondition(lowRegister, TR::RealRegister::eax, cg);
dependencies->addPostCondition(highRegister, TR::RealRegister::edx, cg);
TR::IA32PrivateLinkage *linkage = TR::toIA32PrivateLinkage(cg->getLinkage(TR_Private));
J9::IA32PrivateLinkage *linkage = static_cast<J9::IA32PrivateLinkage>(cg->getLinkage(TR_Private));
TR::IA32LinkageUtils::pushLongArg(secondChild, cg);
TR::IA32LinkageUtils::pushLongArg(firstChild, cg);
TR::X86ImmSymInstruction *instr =
Expand Down Expand Up @@ -1630,7 +1630,7 @@ TR::Register *OMR::X86::I386::TreeEvaluator::integerPairRemEvaluator(TR::Node *n
dependencies->addPostCondition(firstRegister->getLowOrder(), TR::RealRegister::NoReg, cg);
dependencies->addPostCondition(secondRegister->getLowOrder(), TR::RealRegister::NoReg, cg);

TR::IA32PrivateLinkage *linkage = TR::toIA32PrivateLinkage(cg->getLinkage(TR_Private));
J9::IA32PrivateLinkage *linkage = static_cast<J9::IA32PrivateLinkage>(cg->getLinkage(TR_Private));
TR::IA32LinkageUtils::pushLongArg(secondChild, cg);
TR::IA32LinkageUtils::pushLongArg(firstChild, cg);
TR::X86ImmSymInstruction *instr =
Expand Down
3 changes: 0 additions & 3 deletions compiler/z/codegen/OMRCodeGenerator.cpp
Expand Up @@ -134,12 +134,10 @@
#if J9_PROJECT_SPECIFIC
#include "z/codegen/S390Recompilation.hpp"
#include "z/codegen/S390Register.hpp"
#include "z/codegen/J9S390PrivateLinkage.hpp"
#endif

class TR_IGNode;
namespace TR { class DebugCounterBase; }
namespace TR { class S390PrivateLinkage; }
namespace TR { class SimpleRegex; }

#define OPT_DETAILS "O^O CODE GENERATION: "
Expand Down Expand Up @@ -810,7 +808,6 @@ bool OMR::Z::CodeGenerator::prepareForGRA()
}

TR::Linkage * OMR::Z::CodeGenerator::getS390Linkage() {return (self()->getLinkage());}
TR::S390PrivateLinkage * OMR::Z::CodeGenerator::getS390PrivateLinkage() {return TR::toS390PrivateLinkage(self()->getLinkage());}

TR::RealRegister * OMR::Z::CodeGenerator::getStackPointerRealRegister(TR::Symbol *symbol)
{
Expand Down
2 changes: 0 additions & 2 deletions compiler/z/codegen/OMRCodeGenerator.hpp
Expand Up @@ -95,7 +95,6 @@ namespace TR { class S390ConstantInstructionSnippet; }
namespace TR { class S390EyeCatcherDataSnippet; }
namespace TR { class S390ImmInstruction; }
class TR_S390OutOfLineCodeSection;
namespace TR { class S390PrivateLinkage; }
class TR_S390ScratchRegisterManager;
namespace TR { class S390WritableDataSnippet; }
class TR_StorageReference;
Expand Down Expand Up @@ -368,7 +367,6 @@ class OMR_EXTENSIBLE CodeGenerator : public OMR::CodeGenerator

//Convenience accessor methods
TR::Linkage *getS390Linkage();
TR::S390PrivateLinkage *getS390PrivateLinkage();

TR::RealRegister *getStackPointerRealRegister(TR::Symbol *symbol = NULL);
TR::RealRegister *getEntryPointRealRegister();
Expand Down
15 changes: 1 addition & 14 deletions compiler/z/codegen/OMRLinkage.hpp
Expand Up @@ -50,7 +50,6 @@ namespace OMR { typedef OMR::Z::Linkage LinkageConnector; }

class TR_FrontEnd;
namespace TR { class S390JNICallDataSnippet; }
namespace TR { class S390PrivateLinkage; }
namespace TR { class AutomaticSymbol; }
namespace TR { class Compilation; }
namespace TR { class Instruction; }
Expand Down Expand Up @@ -178,18 +177,6 @@ enum TR_S390LinkageConventions
*/
#define TR_FirstSpecialLinkageIndex 0x10

namespace TR {

/**
* Pseudo-safe downcast function, since all linkages must be S390 linkages
*/
inline TR::S390PrivateLinkage *
toS390PrivateLinkage(TR::Linkage * l)
{
return (TR::S390PrivateLinkage *) l;
}

}

////////////////////////////////////////////////////////////////////////////////
// TR::S390Linkage Definition
Expand Down Expand Up @@ -370,7 +357,7 @@ enum TR_DispatchType
virtual bool isAggregateReturnedInRegistersCall(TR::Node *callNode) { return false; }
virtual bool isAggregateReturnedInIntRegistersAndMemory(int32_t aggregateLenth) { return false; }
virtual bool isAggregateReturnedInRegistersAndMemoryCall(TR::Node *callNode) { return false; }

int32_t isForceSaveIncomingParameters() { return _properties & ForceSaveIncomingParameters; }
int32_t isLongDoubleReturnedOnStorage() { return _properties & LongDoubleReturnedOnStorage; }
int32_t isLongDoublePassedOnStorage() { return _properties & LongDoublePassedOnStorage; }
Expand Down

0 comments on commit c6cd450

Please sign in to comment.