Chromium Code Reviews| 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; |
| } |