Losing Attribute information during inlining

Hi,

Since Attributes are related to arguments and return values, inlining of a function causes in some cases to lose information such as NoAlias.

Consequently, this hurts in some cases the precision of alias analysis.

Is there a special reason why this information is not maintained?

Is there a motivation to extend LLVM to maintain this information?

Thanks,

Ohad

Hi Ohad,

Since Attributes are related to arguments and return values, inlining of a
function causes in some cases to lose information such as NoAlias.

Consequently, this hurts in some cases the precision of alias analysis.

Is there a special reason why this information is not maintained?

it's not obvious where to put it. Also, if a function returns a "noalias"
result there should be a reason for that, eg it calls malloc and returns
the result. After inlining the call to malloc will be directly visible,
so alias analysis should still be able to deduce everything that it could
before.

Do you have a specific example that is causing you trouble?

Is there a motivation to extend LLVM to maintain this information?

I don't think so.

Ciao, Duncan.