don't repeat function names in comments; NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240478 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Sanjay Patel 2015-06-23 23:05:08 +00:00
parent 8dad59bc3e
commit 378001dced

View File

@ -19,9 +19,8 @@ using namespace llvm;
#define DEBUG_TYPE "instcombine" #define DEBUG_TYPE "instcombine"
/// FoldPHIArgBinOpIntoPHI - If we have something like phi [add (a,b), add(a,c)] /// If we have something like phi [add (a,b), add(a,c)] and if a/b/c and the
/// and if a/b/c and the add's all have a single use, turn this into a phi /// adds all have a single use, turn this into a phi and a single binop.
/// and a single binop.
Instruction *InstCombiner::FoldPHIArgBinOpIntoPHI(PHINode &PN) { Instruction *InstCombiner::FoldPHIArgBinOpIntoPHI(PHINode &PN) {
Instruction *FirstInst = cast<Instruction>(PN.getIncomingValue(0)); Instruction *FirstInst = cast<Instruction>(PN.getIncomingValue(0));
assert(isa<BinaryOperator>(FirstInst) || isa<CmpInst>(FirstInst)); assert(isa<BinaryOperator>(FirstInst) || isa<CmpInst>(FirstInst));
@ -238,10 +237,9 @@ Instruction *InstCombiner::FoldPHIArgGEPIntoPHI(PHINode &PN) {
} }
/// isSafeAndProfitableToSinkLoad - Return true if we know that it is safe to /// Return true if we know that it is safe to sink the load out of the block
/// sink the load out of the block that defines it. This means that it must be /// that defines it. This means that it must be obvious the value of the load is
/// obvious the value of the load is not changed from the point of the load to /// not changed from the point of the load to the end of the block it is in.
/// the end of the block it is in.
/// ///
/// Finally, it is safe, but not profitable, to sink a load targeting a /// Finally, it is safe, but not profitable, to sink a load targeting a
/// non-address-taken alloca. Doing so will cause us to not promote the alloca /// non-address-taken alloca. Doing so will cause us to not promote the alloca
@ -385,9 +383,9 @@ Instruction *InstCombiner::FoldPHIArgLoadIntoPHI(PHINode &PN) {
/// FoldPHIArgOpIntoPHI - If all operands to a PHI node are the same "unary" /// If all operands to a PHI node are the same "unary" operator and they all are
/// operator and they all are only used by the PHI, PHI together their /// only used by the PHI, PHI together their inputs, and do the operation once,
/// inputs, and do the operation once, to the result of the PHI. /// to the result of the PHI.
Instruction *InstCombiner::FoldPHIArgOpIntoPHI(PHINode &PN) { Instruction *InstCombiner::FoldPHIArgOpIntoPHI(PHINode &PN) {
Instruction *FirstInst = cast<Instruction>(PN.getIncomingValue(0)); Instruction *FirstInst = cast<Instruction>(PN.getIncomingValue(0));
@ -503,8 +501,7 @@ Instruction *InstCombiner::FoldPHIArgOpIntoPHI(PHINode &PN) {
return NewCI; return NewCI;
} }
/// DeadPHICycle - Return true if this PHI node is only used by a PHI node cycle /// Return true if this PHI node is only used by a PHI node cycle that is dead.
/// that is dead.
static bool DeadPHICycle(PHINode *PN, static bool DeadPHICycle(PHINode *PN,
SmallPtrSetImpl<PHINode*> &PotentiallyDeadPHIs) { SmallPtrSetImpl<PHINode*> &PotentiallyDeadPHIs) {
if (PN->use_empty()) return true; if (PN->use_empty()) return true;
@ -524,8 +521,8 @@ static bool DeadPHICycle(PHINode *PN,
return false; return false;
} }
/// PHIsEqualValue - Return true if this phi node is always equal to /// Return true if this phi node is always equal to NonPhiInVal.
/// NonPhiInVal. This happens with mutually cyclic phi nodes like: /// This happens with mutually cyclic phi nodes like:
/// z = some value; x = phi (y, z); y = phi (x, z) /// z = some value; x = phi (y, z); y = phi (x, z)
static bool PHIsEqualValue(PHINode *PN, Value *NonPhiInVal, static bool PHIsEqualValue(PHINode *PN, Value *NonPhiInVal,
SmallPtrSetImpl<PHINode*> &ValueEqualPHIs) { SmallPtrSetImpl<PHINode*> &ValueEqualPHIs) {
@ -606,10 +603,10 @@ namespace llvm {
} }
/// SliceUpIllegalIntegerPHI - This is an integer PHI and we know that it has an /// This is an integer PHI and we know that it has an illegal type: see if it is
/// illegal type: see if it is only used by trunc or trunc(lshr) operations. If /// only used by trunc or trunc(lshr) operations. If so, we split the PHI into
/// so, we split the PHI into the various pieces being extracted. This sort of /// the various pieces being extracted. This sort of thing is introduced when
/// thing is introduced when SROA promotes an aggregate to large integer values. /// SROA promotes an aggregate to large integer values.
/// ///
/// TODO: The user of the trunc may be an bitcast to float/double/vector or an /// TODO: The user of the trunc may be an bitcast to float/double/vector or an
/// inttoptr. We should produce new PHIs in the right type. /// inttoptr. We should produce new PHIs in the right type.