[Mono-devel-list] [PATCH] Constant folding signed div

Torstensson, Patrik patrik.torstensson at intel.com
Tue Nov 23 16:06:54 EST 2004


>> The reason why I say tries is because I have only tested the patch on
>> x86 (only platform I have access to) but it should work on all
platforms
>> because it uses ops that is needed on all platforms. But to be sure
the
>> define MONO_ARCH_SUPPORT_DIV_CFOLD needs to define to enable this
patch,
>> when all platforms have been tested alt. fixed we can remove this
>> define.

>Havent we gotten bugs before with branches inside burg rules due to
>regalloc? How does this avoid them?

Good point, not sure, it depends on the complexity of the branch so
maybe this needs to go into a own tree. Paolo, comments?

>Also, gcc generates some nice code using cmov, branchless. What does
the
>intel c++ compiler generate?

I don't know what the intel compiler generates, I would guess it uses
cmov for pentium. Again, let's get the patch in then optimize for
specific archs. I have a x86 version but it would be nicer to get a arch
generic version, then implement optimized versions.

-- Patrik



More information about the Mono-devel-list mailing list