[LLVMdev] Turning sub-target features on/off (e.g. Altivec on PowerPC)

Sergei Dyshel qyron.private at gmail.com
Thu Mar 18 07:38:30 PDT 2010


Hello,

I'm using Mono with experimental LLVM backend support on PowerPC. I noticed
that although LLVM's IR contains SIMD instructions the assembly produced
doesn't contain any Altivec instructions and my PowerPC970 machine of course
has Altivec support. Isn't there some kind of autodetection? I searched in
Target sources but only found out that Altivec is disabled by default.

Can I turn Altivec support on (and off, I need both cases) from the code?
Some info: Mono's utilizes LLVM in this way:

LLVMInitializePowerPCTarget ();
LLVMInitializePowerPCTargetInfo ();
ExecutionEngine *EE = ExecutionEngine::createJIT ( ... );
fpm = new FunctionPassManager ( ... );
fpm->add(new TargetData(*EE->getTargetData()));

and then uses ExecutionEngine object for compiling functions.
-- 
Regards,
Sergei Dyshel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20100318/b33eeb0c/attachment.html>


More information about the llvm-dev mailing list