summaryrefslogtreecommitdiff
path: root/src/jit/compiler.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/jit/compiler.hpp')
-rw-r--r--src/jit/compiler.hpp135
1 files changed, 0 insertions, 135 deletions
diff --git a/src/jit/compiler.hpp b/src/jit/compiler.hpp
index 88c082d499..959db68a94 100644
--- a/src/jit/compiler.hpp
+++ b/src/jit/compiler.hpp
@@ -4686,141 +4686,6 @@ inline char* regMaskIntToString(regMaskTP mask, Compiler* context)
#endif // DEBUG
-inline void BasicBlock::InitVarSets(Compiler* comp)
-{
- VarSetOps::AssignNoCopy(comp, bbVarUse, VarSetOps::MakeEmpty(comp));
- VarSetOps::AssignNoCopy(comp, bbVarDef, VarSetOps::MakeEmpty(comp));
- VarSetOps::AssignNoCopy(comp, bbLiveIn, VarSetOps::MakeEmpty(comp));
- VarSetOps::AssignNoCopy(comp, bbLiveOut, VarSetOps::MakeEmpty(comp));
- VarSetOps::AssignNoCopy(comp, bbScope, VarSetOps::MakeEmpty(comp));
-
- bbMemoryUse = emptyMemoryKindSet;
- bbMemoryDef = emptyMemoryKindSet;
- bbMemoryLiveIn = emptyMemoryKindSet;
- bbMemoryLiveOut = emptyMemoryKindSet;
-}
-
-// Returns true if the basic block ends with GT_JMP
-inline bool BasicBlock::endsWithJmpMethod(Compiler* comp)
-{
- if (comp->compJmpOpUsed && (bbJumpKind == BBJ_RETURN) && (bbFlags & BBF_HAS_JMP))
- {
- GenTree* lastNode = this->lastNode();
- assert(lastNode != nullptr);
- return lastNode->OperGet() == GT_JMP;
- }
-
- return false;
-}
-
-// Returns true if the basic block ends with either
-// i) GT_JMP or
-// ii) tail call (implicit or explicit)
-//
-// Params:
-// comp - Compiler instance
-// fastTailCallsOnly - Only consider fast tail calls excluding tail calls via helper.
-inline bool BasicBlock::endsWithTailCallOrJmp(Compiler* comp, bool fastTailCallsOnly /*=false*/)
-{
- GenTreePtr tailCall = nullptr;
- bool tailCallsConvertibleToLoopOnly = false;
- return endsWithJmpMethod(comp) ||
- endsWithTailCall(comp, fastTailCallsOnly, tailCallsConvertibleToLoopOnly, &tailCall);
-}
-
-//------------------------------------------------------------------------------
-// endsWithTailCall : Check if the block ends with a tail call.
-//
-// Arguments:
-// comp - compiler instance
-// fastTailCallsOnly - check for fast tail calls only
-// tailCallsConvertibleToLoopOnly - check for tail calls convertible to loop only
-// tailCall - a pointer to a tree that will be set to the call tree if the block
-// ends with a tail call and will be set to nullptr otherwise.
-//
-// Return Value:
-// true if the block ends with a tail call; false otherwise.
-//
-// Notes:
-// At most one of fastTailCallsOnly and tailCallsConvertibleToLoopOnly flags can be true.
-
-inline bool BasicBlock::endsWithTailCall(Compiler* comp,
- bool fastTailCallsOnly,
- bool tailCallsConvertibleToLoopOnly,
- GenTree** tailCall)
-{
- assert(!fastTailCallsOnly || !tailCallsConvertibleToLoopOnly);
- *tailCall = nullptr;
- bool result = false;
-
- // Is this a tail call?
- // The reason for keeping this under RyuJIT is so as not to impact existing Jit32 x86 and arm
- // targets.
- if (comp->compTailCallUsed)
- {
- if (fastTailCallsOnly || tailCallsConvertibleToLoopOnly)
- {
- // Only fast tail calls or only tail calls convertible to loops
- result = (bbFlags & BBF_HAS_JMP) && (bbJumpKind == BBJ_RETURN);
- }
- else
- {
- // Fast tail calls, tail calls convertible to loops, and tails calls dispatched via helper
- result = (bbJumpKind == BBJ_THROW) || ((bbFlags & BBF_HAS_JMP) && (bbJumpKind == BBJ_RETURN));
- }
-
- if (result)
- {
- GenTree* lastNode = this->lastNode();
- if (lastNode->OperGet() == GT_CALL)
- {
- GenTreeCall* call = lastNode->AsCall();
- if (tailCallsConvertibleToLoopOnly)
- {
- result = call->IsTailCallConvertibleToLoop();
- }
- else if (fastTailCallsOnly)
- {
- result = call->IsFastTailCall();
- }
- else
- {
- result = call->IsTailCall();
- }
-
- if (result)
- {
- *tailCall = call;
- }
- }
- else
- {
- result = false;
- }
- }
- }
-
- return result;
-}
-
-//------------------------------------------------------------------------------
-// endsWithTailCallConvertibleToLoop : Check if the block ends with a tail call convertible to loop.
-//
-// Arguments:
-// comp - compiler instance
-// tailCall - a pointer to a tree that will be set to the call tree if the block
-// ends with a tail call convertible to loop and will be set to nullptr otherwise.
-//
-// Return Value:
-// true if the block ends with a tail call convertible to loop.
-
-inline bool BasicBlock::endsWithTailCallConvertibleToLoop(Compiler* comp, GenTree** tailCall)
-{
- bool fastTailCallsOnly = false;
- bool tailCallsConvertibleToLoopOnly = true;
- return endsWithTailCall(comp, fastTailCallsOnly, tailCallsConvertibleToLoopOnly, tailCall);
-}
-
inline static bool StructHasOverlappingFields(DWORD attribs)
{
return ((attribs & CORINFO_FLG_OVERLAPPING_FIELDS) != 0);