search for: emitinstrwithcustomeinsert

Displaying 2 results from an estimated 2 matches for "emitinstrwithcustomeinsert".

2015 Oct 22
2
add intrinsic function support for customized backend
Hi, All, I want to add one intrinsic function for my particular backend. Let's say the intrinsic function is named "foo" which takes two i32 inputs and has one i32 output. First, I add this line "def int_foo : Intrinsic<[llvm_i32_ty], [llvm_i32_ty, llvm_i32_ty], [IntrReadArgMem]>;" in /include/llvm/IR/Intrinsics.td. Then, in my target/InstrInfo.td, I'm supposed
2015 Oct 22
2
add intrinsic function support for customized backend
...ructions, there's some common place to do it. > > You have the ExpandISelPseudos pass which is called at the beginning of > addMachinePasses. Its operation is relatively simple since it browses the > MachineInstr by looking for pseudo-instructions and then calls > TargetLowering::EmitInstrWithCustomeInserter for each of them. This last > method being abstract, it is implemented by each backend that wants it like > in X86TargetLowering for the x86 backend. Due to its location, this > solution offers the advantage that no optimization has already taken place. > Thus, the added machine code...