[LLVMdev] how to stop intrinsic being deleted

Sam Parker S.Parker3 at lboro.ac.uk
Thu Nov 29 03:48:16 PST 2012


Hi Duncan,

I'm inserting it at the IR level. I know it gets to my ISelLowering class because I've had to modify my INTRINSIC_W_CHAIN function to fix crashes as well as handling the chain value so that the instruction can be selected.

Cheers,
Sam

On 29 Nov 2012, at 10:42, Duncan Sands <baldrick at free.fr>
 wrote:

> Hi Sam,
> 
>> So, I have inserted some calls to my intrinsic functions in a pass but there
>> are being removed.
> 
> is it being deleted by the IR level optimizers or during code generation?
> Are you inserting it at IR level or during code generation?
> 
> Ciao, Duncan.
> 
> The purpose of the intrinsics are to increment a specific
>> register, the intrinsic call is lowered to a node that i have defined with
>> SDNPSideEffect and the instruction also is defined as 'hasSideEffects = 1'.
>> I have defined the instruction to return a i32 but take no arguments. Is
>> there any way to stop my instruction being deleted or do I need to define my
>> intrinsic as taking a register as an argument? And if this is the case, how
>> do I define a target specific register as an argument to the call?
>> 
>> Thanks,
>> 
>> Sam
>> 
>> 
>> 
>> --
>> View this message in context: http://llvm.1065342.n5.nabble.com/how-to-stop-intrinsic-being-deleted-tp51923.html
>> Sent from the LLVM - Dev mailing list archive at Nabble.com.
>> _______________________________________________
>> LLVM Developers mailing list
>> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>> 
> 
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev





More information about the llvm-dev mailing list