[LLVMdev] Instruction scheduling barrier

Andrew Trick atrick at apple.com
Fri Mar 8 18:54:26 PST 2013


On Feb 26, 2013, at 4:01 PM, Mark Schimmel <Mark.Schimmel at synopsys.com> wrote:

> I found myself wanting a “scheduling barrier” in LLVM.  In my specific circumstances I only want it to mean that TargetInstrInfoImpl::isSchedulingBoundary() would return true.
>  
> I added SchedulingBarrier to MCID in MCInstrDesc.h and pushed it through TD attributes down to isSchedulingBoundary().  Is this something of general interest, or is there another mechanism for implementing barriers that I missed?

 I don't think you need both a SchedulingBarrier MCID and a special TargetInstrInfo hook. isSchedulingBoundary is a currently target hook because it's fairly specific to a CodeGen pass, we want to make general queries here like isTerminator and isCall, and the answer may vary depending on some attribute of the function. You can always add a target specific barrier opcode and check for it within the target hook without changing the MC API.

-Andy
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130308/e00e352e/attachment.html>


More information about the llvm-dev mailing list