Specify cycles in the instruction stage at compile time

I’m trying to figure out if it is possible to specify number of cycles for a given instruction stage (instruction stages are used in conjunction with itineraries) at compile time. When I say compile time, I mean code compilation for my target.

Currently to specify for a given instruction stage a value has to be hardcoded. Take a look at the InstrStage definition below. The cycles parameter is the one I’m talking about.

class InstrStage<int cycles, list units,
int timeinc = -1,
ReservationKind kind = Required> {
int Cycles = cycles; // length of stage in machine cycles
list Units = units; // choice of functional units
int TimeInc = timeinc; // cycles till start of next stage
int Kind = kind.Value; // kind of FU reservation
}

Does anybody know if it is possible to specify the cycles parameter dynamically, say through a compiler option. I’m trying to explore what happens to the schedule when number of cycles for various instructions is varied. If I could specify cycles value dynamically, without llvm recompilation it would significantly simplify (as well as reduce time) my exploration.

Any help is appreciated.