From 4d2c6de03cfae24852ec4a804ee8175b9dcc3412 Mon Sep 17 00:00:00 2001 From: Geoff Berry Date: Mon, 16 May 2016 18:51:54 +0000 Subject: [PATCH] [BasicAA] Update comments based on feedback from hfinkel. NFCI. Original change Hal's comments were based on: http://reviews.llvm.org/D19730 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269678 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Analysis/BasicAliasAnalysis.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/Analysis/BasicAliasAnalysis.cpp b/lib/Analysis/BasicAliasAnalysis.cpp index 73dc0457ea8..be4e8e972d0 100644 --- a/lib/Analysis/BasicAliasAnalysis.cpp +++ b/lib/Analysis/BasicAliasAnalysis.cpp @@ -570,6 +570,9 @@ FunctionModRefBehavior BasicAAResult::getModRefBehavior(ImmutableCallSite CS) { /// Returns the behavior when calling the given function. For use when the call /// site is not known. +/// NOTE: Because of the special case handling of llvm.assume below, the result +/// of this function may not match similar results derived from function +/// attributes (e.g. "readnone"). FunctionModRefBehavior BasicAAResult::getModRefBehavior(const Function *F) { // If the function declares it doesn't access memory, we can't do better. if (F->doesNotAccessMemory()) @@ -577,7 +580,7 @@ FunctionModRefBehavior BasicAAResult::getModRefBehavior(const Function *F) { // While the assume intrinsic is marked as arbitrarily writing so that // proper control dependencies will be maintained, it never aliases any - // particular memory location. + // actual memory locations. if (F->getIntrinsicID() == Intrinsic::assume) return FMRB_DoesNotAccessMemory; -- 2.11.0