Skip to content
This repository has been archived by the owner on Jan 13, 2025. It is now read-only.

Question: multiply takes a different number of cycles based on input #29

Closed
Emoun opened this issue Dec 1, 2020 · 1 comment
Closed

Comments

@Emoun
Copy link
Member

Emoun commented Dec 1, 2020

While looking at which instruction selection optimizations we do, I fell on the following sentence:

// following mul by constant patterns only pay off if mul takes > 2 cycles
// and offers no immediate variant

This implies that the mul instruction requires a different number of cycles depending on the input.
Therefore, I have the following questions:

  1. Does the mul actually take a different number of cycles based on input?
  2. Does WCET analysis know about how many cycles the mul will take depending on input?
@Emoun
Copy link
Member Author

Emoun commented Dec 6, 2020

After talking with @schoeberl, it seems this message was probably copied from a different target when the Patmos target was first implemented. Therefore, it is not relevant for the Patmos target.

The Patmos mul instruction always takes a constant number of cycles (@schoeberl thinks 3 or 4).

@Emoun Emoun closed this as completed Dec 6, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant