[llvm] r285661 - [TBAA] Rename accessors to be more idiomatic; NFC
Sanjoy Das via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 31 18:21:57 PDT 2016
Author: sanjoy
Date: Mon Oct 31 20:21:57 2016
New Revision: 285661
URL: http://llvm.org/viewvc/llvm-project?rev=285661&view=rev
Log:
[TBAA] Rename accessors to be more idiomatic; NFC
Modified:
llvm/trunk/lib/Analysis/TypeBasedAliasAnalysis.cpp
Modified: llvm/trunk/lib/Analysis/TypeBasedAliasAnalysis.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/TypeBasedAliasAnalysis.cpp?rev=285661&r1=285660&r2=285661&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/TypeBasedAliasAnalysis.cpp (original)
+++ llvm/trunk/lib/Analysis/TypeBasedAliasAnalysis.cpp Mon Oct 31 20:21:57 2016
@@ -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<ConstantInt>(Node->getOperand(2));
@@ -194,10 +194,10 @@ public:
uint64_t getOffset() const {
return mdconst::extract<ConstantInt>(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<ConstantInt>(Node->getOperand(3));
@@ -311,8 +311,8 @@ bool TypeBasedAAResult::pointsToConstant
// 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(Imm
// 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);
More information about the llvm-commits
mailing list