[LLVMdev] A compliation target with multiple "profiles"

Chris Lattner sabre at nondot.org
Tue Jul 26 12:41:55 PDT 2005


On Tue, 26 Jul 2005, Tzu-Chien Chiu wrote:
> For example, there are totally 32 hardware registers available, but
> the three profiles, namely:
> * Low register usage profile - use 8 registers at most
> * Medium register usage profile - use 16 registers at most
> * High register useage profile - use 32 registers at most
>
> I could define a "TablGen target" for each of the profile:
>
> llc -march={low,medium,high}
>
> but it's tedious. Is there any alternative way to do it?
>
> The maximum number of registers used is just for example, and there
> are still some minor difference among profiles, e.g. some hardware
> instructions are not supported in some profiles.

I would suggest making one target, and multiple subtargets for each 
variant.  Take a look at how the X86 backend handles the variations among 
the different subtargets it supports.

-Chris

-- 
http://nondot.org/sabre/
http://llvm.org/




More information about the llvm-dev mailing list