[llvm-dev] InstrStage, Interpretation of getUnits()

Pierre-André Saulais via llvm-dev llvm-dev at lists.llvm.org
Fri Dec 4 14:36:28 PST 2015


Hi Rail,

This is a bitfield, each bit represents one functional unit. Unit 0 
would be the LSB (1 << 0), unit 1 one bit above LSB (1 << 1),  and so on 
until unit N (1 << N). For example a return value of 9 means that units 
0 and 3 are used.

Cheers,
Pierre-Andre

On 04/12/15 22:20, Rail Shafigulin via llvm-dev wrote:
> Here is the code 
> <https://github.com/llvm-mirror/llvm/blob/c68dcdb413079d92118839dbd835e125293f411a/include/llvm/MC/MCInstrItineraries.h#L75> 
> for InstrStage::getUnits()
>
> /// \brief Returns the choice of FUs.
> unsigned getUnits() const { return Units_; }
>
> This method returns an integer. How does one interpret it? As far as I 
> see it it should tell me what resources are used by a given stage but 
> I can't figure out what a return value means. Would anyone care to help?
>
> Thanks,
>
> -- 
> Rail Shafigulin
> Software Engineer
> Esencia Technologies
>
>
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20151204/bd6f738a/attachment.html>


More information about the llvm-dev mailing list