cpu: Add an iterator type to RegClass.

This will enable it to be used in range based for loops, to iterate over
all the RegIds which are part of a RegClass. This cleans up that sort of
loop a bit, and also makes it less necessary to construct a RegId
directly.

Change-Id: Ia3c2aa5cf4d842465bd0948d174f51a1b92e5e3f
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/49780
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Maintainer: Gabe Black <gabe.black@gmail.com>
Maintainer: Giacomo Travaglini <giacomo.travaglini@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
1 file changed