[llvm-commits] [llvm] r118417 - in /llvm/trunk: lib/Transforms/IPO/FunctionAttrs.cpp test/Analysis/TypeBasedAliasAnalysis/functionattrs.ll

Duncan Sands baldrick at free.fr
Mon Nov 8 11:51:10 PST 2010


Hi Dan,

>>> @@ -140,10 +141,14 @@
>>>             for (CallSite::arg_iterator CI = CS.arg_begin(), CE = CS.arg_end();
>>>                  CI != CE; ++CI) {
>>>               Value *Arg = *CI;
>>> -            if (Arg->getType()->isPointerTy()&&
>>> -                !AA->pointsToConstantMemory(Arg, /*OrLocal=*/true))
>>> -              // Writes memory.  Just give up.
>>> -              return false;
>>> +            if (Arg->getType()->isPointerTy()) {
>>> +              AliasAnalysis::Location Loc(Arg,
>>> +                                          AliasAnalysis::UnknownSize,
>>> +                                          I->getMetadata(LLVMContext::MD_tbaa));
>>> +              if (!AA->pointsToConstantMemory(Arg, /*OrLocal=*/true))
>>
>> Shouldn't it be Loc not Arg in the call to pointsToConstantMemory?
>
> Oops, yes. Fixed.

since the test was passing in spite of this, maybe it could do with a stronger
testcase?

Ciao,

Duncan.



More information about the llvm-commits mailing list