[LLVMdev] how to set -pre-ra-sched from code?

Sanjiv Gupta sanjiv.gupta at microchip.com
Thu Apr 15 07:42:37 PDT 2010

On Wed, 2010-04-14 at 11:33 -0400, Andrew Friedley wrote:
> I've found that I need to set the -pre-RA-sched parameter when using 
> tools like llc to get the kind of instruction scheduling I want.
> However I'm normally generating and running code on the fly using the 
> JIT, and can't figure out how to set the -pre-RA-sched option anywhere 
> other than on the command line for the provided tools.  So what code 
> would I write (or where is the API?) to change the pre-regalloc 
> instruction scheduler algorithm?

Does this thing below in TargetLowering help?

/// setSchedulingPreference - Specify the target scheduling preference.
  void setSchedulingPreference(SchedPreference Pref) 

- Sanjiv

> I've been unable to find this in the documentation or reading source 
> code; a pointer would be really useful.
> Thanks,
> Andrew
> _______________________________________________
> 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