We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b41b1f9 commit 5156128Copy full SHA for 5156128
src/lib.rs
@@ -242,6 +242,26 @@ impl Iterator for PRegSetIter {
242
}
243
244
245
+impl From<&MachineEnv> for PRegSet {
246
+ fn from(env: &MachineEnv) -> Self {
247
+ let mut res = Self::default();
248
+
249
+ for class in env.preferred_regs_by_class.iter() {
250
+ for preg in class {
251
+ res.add(*preg)
252
+ }
253
254
255
+ for class in env.non_preferred_regs_by_class.iter() {
256
257
258
259
260
261
+ res
262
263
+}
264
265
/// A virtual register. Contains a virtual register number and a
266
/// class.
267
///
0 commit comments