mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-02-04 11:17:31 +00:00
fix formatting/typos; NFC
llvm-svn: 281214
This commit is contained in:
parent
b950dd0a32
commit
069f823990
@ -3027,7 +3027,7 @@ static bool swapMayExposeCSEOpportunities(const Value * Op0,
|
||||
}
|
||||
|
||||
/// \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(const Instruction *DI,
|
||||
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 SelectInst *SI) {
|
||||
/// 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::replacedSelectWithOperand(SelectInst *SI,
|
||||
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
|
||||
|
@ -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);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user