A compliation target with multiple "profiles"

There is actually only one hardware, but with a lot of so called "profiles".

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.

Hi,

Question I had was if someone has tried executing Mibench or
Mediabench benchmarks using llvm.

I am trying to do simple qsort benchmark in the Mibench benchmark
suite. I substituted llvmc instead of gcc in the makefiles. But I am
getting the following error.

"llvmc qsort_small.c -O3 -o qsort_small -lm
llvmc: Configuration file for 'c' is not available.
make: *** [qsort_small] Error 1"

Can anyone suggest how I can get rid of this?

Thanks a lot for your help.
Murali

Murali Nethi wrote:

Hi,

Question I had was if someone has tried executing Mibench or
Mediabench benchmarks using llvm.

I am trying to do simple qsort benchmark in the Mibench benchmark
suite. I substituted llvmc instead of gcc in the makefiles. But I am
getting the following error.

I'd recommend using llvm-gcc instead of llvmc. llvm-gcc takes the same command line options that gcc does.

BTW, we may have parts of Mediabench inside of our LLVM test suite (although I'm not sure). Please see http://llvm.cs.uiuc.edu/docs/TestingGuide.html for information on getting and using the LLVM test suite.

Our test suite is built to test runtimes of optimizations.

-- John T.

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