Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(26)

Unified Diff: src/IceOperand.cpp

Issue 2177033002: Subzero: Local variable splitting. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Code review changes, mostly renaming. Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/IceOperand.h ('k') | src/IceTargetLowering.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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)
« no previous file with comments | « src/IceOperand.h ('k') | src/IceTargetLowering.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698