[PATCH] D28731: [PATCH] Fix warning about parentheses in boolean expression.
Gonsolo via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Jan 14 10:24:53 PST 2017
gonsolo removed rL LLVM as the repository for this revision.
gonsolo updated this revision to Diff 84456.
gonsolo added a comment.
Clang-formatted. I think it was more readable before that.
https://reviews.llvm.org/D28731
Files:
lib/Transforms/Scalar/NewGVN.cpp
Index: lib/Transforms/Scalar/NewGVN.cpp
===================================================================
--- lib/Transforms/Scalar/NewGVN.cpp
+++ lib/Transforms/Scalar/NewGVN.cpp
@@ -1076,13 +1076,12 @@
// dominator tree, or the new class leader should dominate the new member
// instruction. We simply check that the member instruction does not properly
// dominate the new class leader.
- assert(
- !isa<Instruction>(NewClass->RepLeader) || !NewClass->RepLeader ||
- I == NewClass->RepLeader ||
- !DT->properlyDominates(
- I->getParent(),
- cast<Instruction>(NewClass->RepLeader)->getParent()) &&
- "New class for instruction should not be dominated by instruction");
+ assert((!isa<Instruction>(NewClass->RepLeader) || !NewClass->RepLeader ||
+ I == NewClass->RepLeader ||
+ !DT->properlyDominates(
+ I->getParent(),
+ cast<Instruction>(NewClass->RepLeader)->getParent())) &&
+ "New class for instruction should not be dominated by instruction");
if (NewClass->RepLeader != I) {
auto DFSNum = InstrDFS.lookup(I);
@@ -1558,7 +1557,8 @@
// Verify the that the memory equivalence table makes sense relative to the
// congruence classes. Note that this checking is not perfect, and is currently
-// subject to very rare false negatives. It is only useful for testing/debugging.
+// subject to very rare false negatives. It is only useful for
+// testing/debugging.
void NewGVN::verifyMemoryCongruency() const {
// Anything equivalent in the memory access table should be in the same
// congruence class.
@@ -1587,11 +1587,11 @@
auto *SecondMUD = dyn_cast<MemoryUseOrDef>(KV.second);
if (FirstMUD && SecondMUD)
assert((singleReachablePHIPath(FirstMUD, SecondMUD) ||
- ValueToClass.lookup(FirstMUD->getMemoryInst()) ==
- ValueToClass.lookup(SecondMUD->getMemoryInst())) &&
- "The instructions for these memory operations should have "
- "been in the same congruence class or reachable through"
- "a single argument phi");
+ ValueToClass.lookup(FirstMUD->getMemoryInst()) ==
+ ValueToClass.lookup(SecondMUD->getMemoryInst())) &&
+ "The instructions for these memory operations should have "
+ "been in the same congruence class or reachable through"
+ "a single argument phi");
} else if (auto *FirstMP = dyn_cast<MemoryPhi>(KV.first)) {
// We can only sanely verify that MemoryDefs in the operand list all have
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D28731.84456.patch
Type: text/x-patch
Size: 2642 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170114/62903bc4/attachment-0001.bin>
More information about the llvm-commits
mailing list