<div dir="ltr"><div>Hello all,</div><div><br></div><div>I want to add a custom intrinsic to the LLVM IR which would be lowered into a pseudo instruction since it doesn't correspond to any real instruction defined by the architecture. The speciality of this intrinsic/pseudo instruction that it should behave like a scheduling barrier: every instruction before the intrinsic has to be emitted before the intrinsic, the same goes for all instructions after the intrinsic, and this should hold after any optimization in opt and llc.</div><div><br></div><div>Can anyone tell me if this is something available in the current LLVM infrastructure and if so, what should be the correct way to create this intrinsic/pseudo instruction? Which bit should be set to 1? isBarrier or hasSideEffects or both? I cannot find the documentation for these 2 bits other than the comments in Target.td, so I'd like to have some explanation here.</div><div><br></div><div>Thank you so much for your help,</div><div><br></div><div><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">Son Tuan Vu</div></div></div></div></div>