From 2eb16bc91e472688db93c35f61b9e172c98594ce Mon Sep 17 00:00:00 2001 From: Sanjoy Das Date: Tue, 1 Nov 2016 01:21:57 +0000 Subject: [PATCH] [TBAA] Rename accessors to be more idiomatic; NFC git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@285661 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Analysis/TypeBasedAliasAnalysis.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/lib/Analysis/TypeBasedAliasAnalysis.cpp b/lib/Analysis/TypeBasedAliasAnalysis.cpp index bd2b05c463f..26d7113ff2f 100644 --- a/lib/Analysis/TypeBasedAliasAnalysis.cpp +++ b/lib/Analysis/TypeBasedAliasAnalysis.cpp @@ -159,10 +159,10 @@ public: return TBAANode(P); } - /// TypeIsImmutable - Test if this TBAANode represents a type for objects - /// which are not modified (by any means) in the context where this + /// Test if this TBAANode represents a type for objects which are + /// not modified (by any means) in the context where this /// AliasAnalysis is relevant. - bool TypeIsImmutable() const { + bool isTypeImmutable() const { if (Node->getNumOperands() < 3) return false; ConstantInt *CI = mdconst::dyn_extract(Node->getOperand(2)); @@ -194,10 +194,10 @@ public: uint64_t getOffset() const { return mdconst::extract(Node->getOperand(2))->getZExtValue(); } - /// TypeIsImmutable - Test if this TBAAStructTagNode represents a type for - /// objects which are not modified (by any means) in the context where this + /// Test if this TBAAStructTagNode represents a type for objects + /// which are not modified (by any means) in the context where this /// AliasAnalysis is relevant. - bool TypeIsImmutable() const { + bool isTypeImmutable() const { if (Node->getNumOperands() < 4) return false; ConstantInt *CI = mdconst::dyn_extract(Node->getOperand(3)); @@ -311,8 +311,8 @@ bool TypeBasedAAResult::pointsToConstantMemory(const MemoryLocation &Loc, // If this is an "immutable" type, we can assume the pointer is pointing // to constant memory. - if ((!isStructPathTBAA(M) && TBAANode(M).TypeIsImmutable()) || - (isStructPathTBAA(M) && TBAAStructTagNode(M).TypeIsImmutable())) + if ((!isStructPathTBAA(M) && TBAANode(M).isTypeImmutable()) || + (isStructPathTBAA(M) && TBAAStructTagNode(M).isTypeImmutable())) return true; return AAResultBase::pointsToConstantMemory(Loc, OrLocal); @@ -328,8 +328,8 @@ TypeBasedAAResult::getModRefBehavior(ImmutableCallSite CS) { // If this is an "immutable" type, we can assume the call doesn't write // to memory. if (const MDNode *M = CS.getInstruction()->getMetadata(LLVMContext::MD_tbaa)) - if ((!isStructPathTBAA(M) && TBAANode(M).TypeIsImmutable()) || - (isStructPathTBAA(M) && TBAAStructTagNode(M).TypeIsImmutable())) + if ((!isStructPathTBAA(M) && TBAANode(M).isTypeImmutable()) || + (isStructPathTBAA(M) && TBAAStructTagNode(M).isTypeImmutable())) Min = FMRB_OnlyReadsMemory; return FunctionModRefBehavior(AAResultBase::getModRefBehavior(CS) & Min); -- 2.40.0