| Index: src/IceOperand.cpp
|
| diff --git a/src/IceOperand.cpp b/src/IceOperand.cpp
|
| index 540252b64785faa14f8ffecdbc8ef4689f75cea0..3e31c601f5cb77461157fc124038aa43c48e44f8 100644
|
| --- a/src/IceOperand.cpp
|
| +++ b/src/IceOperand.cpp
|
| @@ -208,10 +208,11 @@ const Variable *Variable::asType(const Cfg *Func, Type Ty,
|
| }
|
|
|
| RegWeight Variable::getWeight(const Cfg *Func) const {
|
| - VariablesMetadata *VMetadata = Func->getVMetadata();
|
| - return mustHaveReg() ? RegWeight(RegWeight::Inf)
|
| - : mustNotHaveReg() ? RegWeight(RegWeight::Zero)
|
| - : VMetadata->getUseWeight(this);
|
| + if (mustHaveReg())
|
| + return RegWeight(RegWeight::Inf);
|
| + if (mustNotHaveReg())
|
| + return RegWeight(RegWeight::Zero);
|
| + return Func->getVMetadata()->getUseWeight(this);
|
| }
|
|
|
| void VariableTracking::markUse(MetadataKind TrackingKind, const Inst *Instr,
|
| @@ -540,8 +541,10 @@ void Variable::dump(const Cfg *Func, Ostream &Str) const {
|
| if (Func->isVerbose(IceV_RegOrigins) ||
|
| (!hasReg() && !Func->getTarget()->hasComputedFrame())) {
|
| Str << "%" << getName();
|
| - if (getLinkedTo() != nullptr)
|
| - Str << ":%" << getLinkedTo()->getName();
|
| + for (Variable *Link = getLinkedTo(); Link != nullptr;
|
| + Link = Link->getLinkedTo()) {
|
| + Str << ":%" << Link->getName();
|
| + }
|
| }
|
| if (hasReg()) {
|
| if (Func->isVerbose(IceV_RegOrigins))
|
| @@ -554,7 +557,7 @@ void Variable::dump(const Cfg *Func, Ostream &Str) const {
|
| hasReg() ? getBaseRegNum() : Func->getTarget()->getFrameOrStackReg();
|
| Str << "["
|
| << Func->getTarget()->getRegName(BaseRegisterNumber, IceType_i32);
|
| - if (hasStackOffset()) {
|
| + if (hasKnownStackOffset()) {
|
| int32_t Offset = getStackOffset();
|
| if (Offset) {
|
| if (Offset > 0)
|
|
|