From 5c4f17d0a1ddcf441222809b3f51735825eb4894 Mon Sep 17 00:00:00 2001 From: Brian Bohe Date: Mon, 24 Feb 2020 10:15:17 -0800 Subject: [PATCH] =?utf8?q?Renaming=20functions=20and=20updating=20comments?= =?utf8?q?=C2=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- src/coreclr/src/jit/codegencommon.cpp | 6 +++--- src/coreclr/src/jit/emit.cpp | 12 ++++++------ src/coreclr/src/jit/emit.h | 2 +- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/coreclr/src/jit/codegencommon.cpp b/src/coreclr/src/jit/codegencommon.cpp index 703b8e6..ac14335 100644 --- a/src/coreclr/src/jit/codegencommon.cpp +++ b/src/coreclr/src/jit/codegencommon.cpp @@ -11466,11 +11466,11 @@ void CodeGenInterface::VariableLiveKeeper::VariableLiveDescriptor::startLiveRang // Is the first "VariableLiveRange" or the previous one has been closed so its "m_EndEmitLocation" is valid noway_assert(m_VariableLiveRanges->empty() || m_VariableLiveRanges->back().m_EndEmitLocation.Valid()); - if (!m_VariableLiveRanges->empty() && m_VariableLiveRanges->back().m_EndEmitLocation.IsPreviousIns(emit) && + if (!m_VariableLiveRanges->empty() && m_VariableLiveRanges->back().m_EndEmitLocation.IsPreviousInsNum(emit) && siVarLoc::Equals(&varLocation, &(m_VariableLiveRanges->back().m_VarLocation))) { - // The variable is being born at the exactly same place just one assembly instructtion. - // We assume it never died. + // The variable is being born just after the instruction at which it died. + // In this case, i.e. an update of the variable's value, we coalesce the live ranges. m_VariableLiveRanges->back().m_EndEmitLocation.Init(); } else diff --git a/src/coreclr/src/jit/emit.cpp b/src/coreclr/src/jit/emit.cpp index 0fc99a6..65e6886 100644 --- a/src/coreclr/src/jit/emit.cpp +++ b/src/coreclr/src/jit/emit.cpp @@ -66,18 +66,18 @@ UNATIVE_OFFSET emitLocation::GetFuncletPrologOffset(emitter* emit) const } //------------------------------------------------------------------------ -// IsPreviousIns: Returns true if the emitter is on the next instruction -// of the same group than this emitLocation. +// IsPreviousInsNum: Returns true if the emitter is on the next instruction +// of the same group as this emitLocation. // // Arguments: // emit - an emitter* instance // -bool emitLocation::IsPreviousIns(const emitter* emit) const +bool emitLocation::IsPreviousInsNum(const emitter* emit) const { assert(Valid()); - bool sameGroup = ig == emit->emitCurIG; - bool sameInsNum = emitGetInsNumFromCodePos(codePos) == emitGetInsNumFromCodePos(emit->emitCurOffset()) - 1; - return sameGroup && sameInsNum; + bool isSameGroup = (ig == emit->emitCurIG); + bool isSameInsNum = (emitGetInsNumFromCodePos(codePos) == emitGetInsNumFromCodePos(emit->emitCurOffset()) - 1); + return isSameGroup && isSameInsNum; } #ifdef DEBUG diff --git a/src/coreclr/src/jit/emit.h b/src/coreclr/src/jit/emit.h index 89d09e3..622d6d6 100644 --- a/src/coreclr/src/jit/emit.h +++ b/src/coreclr/src/jit/emit.h @@ -191,7 +191,7 @@ public: UNATIVE_OFFSET GetFuncletPrologOffset(emitter* emit) const; - bool emitLocation::IsPreviousIns(const emitter* emit) const; + bool emitLocation::IsPreviousInsNum(const emitter* emit) const; #ifdef DEBUG void Print() const; -- 2.7.4