whitespace cleanup, tidying

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89664 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2009-11-23 16:45:27 +00:00
parent b34b82e9d1
commit 5d56b2d47d

View File

@ -217,13 +217,13 @@ namespace {
// VisitedPHIs - Track PHI nodes visited by a aliasCheck() call. // VisitedPHIs - Track PHI nodes visited by a aliasCheck() call.
SmallPtrSet<const Value*, 16> VisitedPHIs; SmallPtrSet<const Value*, 16> VisitedPHIs;
// aliasGEP - Provide a bunch of ad-hoc rules to disambiguate a GEP instruction // aliasGEP - Provide a bunch of ad-hoc rules to disambiguate a GEP
// against another. // instruction against another.
AliasResult aliasGEP(const Value *V1, unsigned V1Size, AliasResult aliasGEP(const Value *V1, unsigned V1Size,
const Value *V2, unsigned V2Size); const Value *V2, unsigned V2Size);
// aliasPHI - Provide a bunch of ad-hoc rules to disambiguate a PHI instruction // aliasPHI - Provide a bunch of ad-hoc rules to disambiguate a PHI
// against another. // instruction against another.
AliasResult aliasPHI(const PHINode *PN, unsigned PNSize, AliasResult aliasPHI(const PHINode *PN, unsigned PNSize,
const Value *V2, unsigned V2Size); const Value *V2, unsigned V2Size);
@ -236,7 +236,7 @@ namespace {
// CheckGEPInstructions - Check two GEP instructions with known // CheckGEPInstructions - Check two GEP instructions with known
// must-aliasing base pointers. This checks to see if the index expressions // must-aliasing base pointers. This checks to see if the index expressions
// preclude the pointers from aliasing... // preclude the pointers from aliasing.
AliasResult AliasResult
CheckGEPInstructions(const Type* BasePtr1Ty, CheckGEPInstructions(const Type* BasePtr1Ty,
Value **GEP1Ops, unsigned NumGEP1Ops, unsigned G1Size, Value **GEP1Ops, unsigned NumGEP1Ops, unsigned G1Size,
@ -269,11 +269,10 @@ bool BasicAliasAnalysis::pointsToConstantMemory(const Value *P) {
} }
// getModRefInfo - Check to see if the specified callsite can clobber the /// getModRefInfo - Check to see if the specified callsite can clobber the
// specified memory object. Since we only look at local properties of this /// specified memory object. Since we only look at local properties of this
// function, we really can't say much about this query. We do, however, use /// function, we really can't say much about this query. We do, however, use
// simple "address taken" analysis on local objects. /// simple "address taken" analysis on local objects.
//
AliasAnalysis::ModRefResult AliasAnalysis::ModRefResult
BasicAliasAnalysis::getModRefInfo(CallSite CS, Value *P, unsigned Size) { BasicAliasAnalysis::getModRefInfo(CallSite CS, Value *P, unsigned Size) {
const Value *Object = P->getUnderlyingObject(); const Value *Object = P->getUnderlyingObject();
@ -534,8 +533,8 @@ BasicAliasAnalysis::aliasGEP(const Value *V1, unsigned V1Size,
return MayAlias; return MayAlias;
} }
// aliasSelect - Provide a bunch of ad-hoc rules to disambiguate a Select instruction /// aliasSelect - Provide a bunch of ad-hoc rules to disambiguate a Select
// against another. /// instruction against another.
AliasAnalysis::AliasResult AliasAnalysis::AliasResult
BasicAliasAnalysis::aliasSelect(const SelectInst *SI, unsigned SISize, BasicAliasAnalysis::aliasSelect(const SelectInst *SI, unsigned SISize,
const Value *V2, unsigned V2Size) { const Value *V2, unsigned V2Size) {
@ -701,10 +700,12 @@ BasicAliasAnalysis::aliasCheck(const Value *V1, unsigned V1Size,
// isNonEscapingLocalObject considers all stores to be escapes (it // isNonEscapingLocalObject considers all stores to be escapes (it
// passes true for the StoreCaptures argument to PointerMayBeCaptured). // passes true for the StoreCaptures argument to PointerMayBeCaptured).
if (O1 != O2) { if (O1 != O2) {
if ((isa<CallInst>(O1) || isa<InvokeInst>(O1) || isa<LoadInst>(O1)) && if ((isa<CallInst>(O1) || isa<InvokeInst>(O1) || isa<LoadInst>(O1) ||
isa<Argument(O1)) &&
isNonEscapingLocalObject(O2)) isNonEscapingLocalObject(O2))
return NoAlias; return NoAlias;
if ((isa<CallInst>(O2) || isa<InvokeInst>(O2) || isa<LoadInst>(O2)) && if ((isa<CallInst>(O2) || isa<InvokeInst>(O2) || isa<LoadInst>(O2) ||
isa<Argument(O2)) &&
isNonEscapingLocalObject(O1)) isNonEscapingLocalObject(O1))
return NoAlias; return NoAlias;
} }
@ -752,7 +753,7 @@ static bool IndexOperandsEqual(Value *V1, Value *V2) {
/// CheckGEPInstructions - Check two GEP instructions with known must-aliasing /// CheckGEPInstructions - Check two GEP instructions with known must-aliasing
/// base pointers. This checks to see if the index expressions preclude the /// base pointers. This checks to see if the index expressions preclude the
/// pointers from aliasing... /// pointers from aliasing.
AliasAnalysis::AliasResult AliasAnalysis::AliasResult
BasicAliasAnalysis::CheckGEPInstructions( BasicAliasAnalysis::CheckGEPInstructions(
const Type* BasePtr1Ty, Value **GEP1Ops, unsigned NumGEP1Ops, unsigned G1S, const Type* BasePtr1Ty, Value **GEP1Ops, unsigned NumGEP1Ops, unsigned G1S,
@ -1079,5 +1080,5 @@ BasicAliasAnalysis::CheckGEPInstructions(
return MayAlias; return MayAlias;
} }
// Make sure that anything that uses AliasAnalysis pulls in this file... // Make sure that anything that uses AliasAnalysis pulls in this file.
DEFINING_FILE_FOR(BasicAliasAnalysis) DEFINING_FILE_FOR(BasicAliasAnalysis)