Specify an allocation order with a register class. This is used by register
allocators with a greedy heuristic. This is usefull as it is sometimes
beneficial to color more constrained classes first.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
Comment Actions
Ok. The comment is misleading though. It makes it sounds as though getClassPriority can be used to prioritize "big" live ranges. I think it instead allows register class order to take precedence over live range size.
Also, this really puts the burden on the target to assign priorities that make sense in the context of the regalloc algorithm. I think it's ok to have that back door, but it seems like there should be a use-at-your-own risk disclaimer, no? I would indicate that the default implementation should be used unless the hook is really needed to improve allocation.
Comment Actions
Agreed with Andy.
Also, I believe it would make sense to have that tablegen driven (like the allocation order), we possibly a hook to override.
Q.