[llvm-commits] r55638 - /llvm/trunk/include/llvm/Function.h

Duncan Sands baldrick at free.fr
Mon Oct 6 07:11:26 PDT 2008


> I don't think we want the passes that make use function notes to guess  
> why one function is marked no-see and another is marked sse. It could  
> be for performance reason or for correctness reason. And these notes  
> don't really tell whether using sse is more efficient or not.
> 
> I'd prefer just keeping it simple. If these target function notes  
> don't match, do not try to inline one into another.

That was my suggestion too.  More precisely, I proposed having three
possibilities for a function: sse, no-see, "don't care" (which would
mean that the function wasn't marked either sse or no-sse).
The inliner would refuse to inline an sse function into a no-sse one
and vice-versa.  However a "don't care" can be inlined into any,
while anything can be inlined into a "don't care" (the function would
would then pick up any sse or no-sse attribute from the inlinee).
For example, if a "don't care" function A calls a "no-sse" function B,
and the callsite is inlined, then afterwards A would be marked "no-sse"
too.

The invariant that this scheme preserves is that any instruction that
starts its life in an sse/no-sse function always finishes up in an
sse/no-sse function.  On the other hand, an instruction that starts
in a "don't care" function may end up in a "don't care" function or
a sse or a no-sse function.

Ciao,

Duncan.



More information about the llvm-commits mailing list