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

Unified Diff: src/IceOperand.cpp

Issue 1197863003: Subzero: Reduce the amount of #ifdef'd code. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Cleanup Created 5 years, 6 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
« src/IceAssembler.h ('K') | « src/IceAssemblerX8632.cpp ('k') | no next file » | 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 2d2c8cf2c3276fbf3ce89d28d116a74cdca3f54b..b08710b68dea71855be39b6252d6f7bea986dd7e 100644
--- a/src/IceOperand.cpp
+++ b/src/IceOperand.cpp
@@ -91,13 +91,17 @@ bool LiveRange::overlapsInst(InstNumberT OtherBegin, bool UseTrimmed) const {
break;
}
}
-#if 0
- // An equivalent but less inefficient implementation:
- LiveRange Temp;
- Temp.addSegment(OtherBegin, OtherBegin + 1);
- bool Validation = overlaps(Temp);
- assert(Result == Validation);
-#endif
+ // This is an equivalent but less inefficient implementation. It's
+ // expensive enough that we wouldn't want to run it under any build,
+ // but it could be enabled if e.g. the LiveRange implementation
+ // changes and extra testing is needed.
+ if (false) {
John 2015/06/22 17:13:46 Can this be a constexpr bool somewhere, perhaps mo
Jim Stichnoth 2015/06/23 21:42:07 Done.
+ LiveRange Temp;
+ Temp.addSegment(OtherBegin, OtherBegin + 1);
+ bool Validation = overlaps(Temp);
+ (void)Validation;
+ assert(Result == Validation);
+ }
return Result;
}
« src/IceAssembler.h ('K') | « src/IceAssemblerX8632.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698