[llvm] r281214 - fix formatting/typos; NFC
Sanjay Patel via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 12 07:25:46 PDT 2016
Author: spatel
Date: Mon Sep 12 09:25:46 2016
New Revision: 281214
URL: http://llvm.org/viewvc/llvm-project?rev=281214&view=rev
Log:
fix formatting/typos; NFC
Modified:
llvm/trunk/lib/Transforms/InstCombine/InstCombineCompares.cpp
llvm/trunk/lib/Transforms/InstCombine/InstCombineInternal.h
Modified: llvm/trunk/lib/Transforms/InstCombine/InstCombineCompares.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/InstCombine/InstCombineCompares.cpp?rev=281214&r1=281213&r2=281214&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/InstCombine/InstCombineCompares.cpp (original)
+++ llvm/trunk/lib/Transforms/InstCombine/InstCombineCompares.cpp Mon Sep 12 09:25:46 2016
@@ -3027,7 +3027,7 @@ static bool swapMayExposeCSEOpportunitie
}
/// \brief Check that one use is in the same block as the definition and all
-/// other uses are in blocks dominated by a given block
+/// other uses are in blocks dominated by a given block.
///
/// \param DI Definition
/// \param UI Use
@@ -3040,13 +3040,13 @@ bool InstCombiner::dominatesAllUses(cons
const Instruction *UI,
const BasicBlock *DB) const {
assert(DI && UI && "Instruction not defined\n");
- // ignore incomplete definitions
+ // Ignore incomplete definitions.
if (!DI->getParent())
return false;
- // DI and UI must be in the same block
+ // DI and UI must be in the same block.
if (DI->getParent() != UI->getParent())
return false;
- // Protect from self-referencing blocks
+ // Protect from self-referencing blocks.
if (DI->getParent() == DB)
return false;
for (const User *U : DI->users()) {
@@ -3110,8 +3110,7 @@ static bool isChainSelectCmpBranch(const
/// are equal, the optimization can work only for EQ predicates. This is not a
/// major restriction since a NE compare should be 'normalized' to an equal
/// compare, which usually happens in the combiner and test case
-/// select-cmp-br.ll
-/// checks for it.
+/// select-cmp-br.ll checks for it.
bool InstCombiner::replacedSelectWithOperand(SelectInst *SI,
const ICmpInst *Icmp,
const unsigned SIOpd) {
@@ -3119,7 +3118,7 @@ bool InstCombiner::replacedSelectWithOpe
if (isChainSelectCmpBranch(SI) && Icmp->getPredicate() == ICmpInst::ICMP_EQ) {
BasicBlock *Succ = SI->getParent()->getTerminator()->getSuccessor(1);
// The check for the unique predecessor is not the best that can be
- // done. But it protects efficiently against cases like when SI's
+ // done. But it protects efficiently against cases like when SI's
// home block has two successors, Succ and Succ1, and Succ1 predecessor
// of Succ. Then SI can't be replaced by SIOpd because the use that gets
// replaced can be reached on either path. So the uniqueness check
Modified: llvm/trunk/lib/Transforms/InstCombine/InstCombineInternal.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/InstCombine/InstCombineInternal.h?rev=281214&r1=281213&r2=281214&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/InstCombine/InstCombineInternal.h (original)
+++ llvm/trunk/lib/Transforms/InstCombine/InstCombineInternal.h Mon Sep 12 09:25:46 2016
@@ -289,16 +289,16 @@ public:
Instruction *visitVAStartInst(VAStartInst &I);
Instruction *visitVACopyInst(VACopyInst &I);
- // visitInstruction - Specify what to return for unhandled instructions...
+ /// Specify what to return for unhandled instructions.
Instruction *visitInstruction(Instruction &I) { return nullptr; }
- // True when DB dominates all uses of DI execpt UI.
- // UI must be in the same block as DI.
- // The routine checks that the DI parent and DB are different.
+ /// True when DB dominates all uses of DI except UI.
+ /// UI must be in the same block as DI.
+ /// The routine checks that the DI parent and DB are different.
bool dominatesAllUses(const Instruction *DI, const Instruction *UI,
const BasicBlock *DB) const;
- // Replace select with select operand SIOpd in SI-ICmp sequence when possible
+ /// Try to replace select with select operand SIOpd in SI-ICmp sequence.
bool replacedSelectWithOperand(SelectInst *SI, const ICmpInst *Icmp,
const unsigned SIOpd);
More information about the llvm-commits
mailing list