[Mono-dev] mono / llvm inlining situations (or failures thereof)
Jonathan Shore
jonathan.shore at gmail.com
Mon Jul 16 18:29:33 UTC 2012
On Jul 16, 2012, at 2:11 PM, Rodrigo Kumpera wrote:
>
>
> On Mon, Jul 16, 2012 at 2:45 PM, Jonathan Shore <jonathan.shore at gmail.com> wrote:
> Hi Rodrigo,
>
> I have played with the MONO_INLINELIMIT env variable (just discovered in the mono code a couple of days ago). It solved some of my other inlining issues. The AggressiveInlining option should be helpful for methods in 4.5 (I'm still on 4.0), though I don't believe the attribute can be used on properties, even though they are effectively methods (or am I wrong here).
>
>
> You mentioned "we don't inline methods that call other methods" and suggested might be the case in my code. I am simply indexing the get method in:
>
> public override double this[int i]
> {
> get { return _data[i]; }
> set { _data[i] = value; }
> }
>
> I thought that since this is an override, though on a leaf / sealed class, perhaps mono could not handle this case. Not sure where indexing on this property would hit the "call another method" case.
>
> This should probably inline fine. Can you provide a small and complete sample where this does happen? Your problem sounds really odd.
I did not try the MONO_INLINELIMIT with this particular problem. I manually inlined this one prior to posting and later applied the env variable for a different inlining issue after posting. It seems like the default limit is perhaps too low (or too low for my application, I am OK with using the env variable however).
I'll reverse the change and give the env variable a go with the above. Also, let me check the hierarchy of this class and see whether there is any static construction.
If there is nothing obvious, will try to arrange a test case over the next few days. Will be a bit tricky to arrange test, possibly, due to the class environment. With luck, can demonstrate with a simple test.
Finally, how do I see the generated llvm x86 code. Can I do this with monodis? I know I can see the IL Thus far have been testing by noting the runtime.
>
>
> If I understand this better, I can investigate / suggest some new feature re: inlining.
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ximian.com/pipermail/mono-devel-list/attachments/20120716/b2e4d546/attachment.html>
More information about the Mono-devel-list
mailing list