Rail Shafigulin via llvm-dev
2015-Dec-04 22:20 UTC
[llvm-dev] InstrStage, Interpretation of getUnits()
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 -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20151204/52867324/attachment-0001.html>
Pierre-André Saulais via llvm-dev
2015-Dec-04 22:36 UTC
[llvm-dev] InstrStage, Interpretation of getUnits()
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>
Rail Shafigulin via llvm-dev
2015-Dec-04 22:51 UTC
[llvm-dev] InstrStage, Interpretation of getUnits()
On Fri, Dec 4, 2015 at 2:36 PM, Pierre-André Saulais < pierre-andre at codeplay.com> wrote:> 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 > > > Thanks.-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20151204/cd0972ef/attachment.html>