[LLVMdev] Get Maximum Instruction Index

Fernando Magno Quintao Pereira fernando at CS.UCLA.EDU
Tue Jan 27 05:35:16 PST 2009


Hi, guys,

     sometimes it would be good if I could get the maximum instruction 
index from the set of live intervals. In my local version I have added 
this method to LiveIntervals:

/// Return the maximum index among the instruction indices.
inline unsigned getMaxInstrIndex() const {
   return i2miMap_.size() * InstrSlots::NUM;
}

Is there something like this already in LiveIntervals? Do you guys think 
it could be added as a patch?

All the best,

Fernando



More information about the llvm-dev mailing list