Stream: general

Topic: ✔ Regalloc2 Question


view this post on Zulip CompilerSmith (Apr 04 2024 at 17:46):

Hi, I have a quick question about regalloc2. The library operates over VReg structures however there seems to be no way to specify a bitwidth in VReg.

I want to use regalloc2 to do register allocation for me in my IR. However I can specify bitwidth of virtual registers in my IR and i want to convey that to regalloc2.

How can regalloc2 do register allocation on different sized registers...?

https://docs.rs/regalloc2/0.9.3/regalloc2/struct.VReg.html

^ docs for VReg

view this post on Zulip CompilerSmith (Apr 04 2024 at 17:52):

If i build a MachineEnv for x86 would i only specify the full width registers and then the register allocator would allow me to use the full width of the register?

view this post on Zulip Chris Fallin (Apr 04 2024 at 17:56):

@CompilerSmith this question was moved to the #cranelift topic, please see my answer there

view this post on Zulip Chris Fallin (Apr 04 2024 at 17:56):

(it looks like it was asked twice and only one copy of the question was moved)

view this post on Zulip Notification Bot (Apr 04 2024 at 18:02):

CompilerSmith has marked this topic as resolved.


Last updated: Oct 23 2024 at 20:03 UTC