- Split RegisterClass::getSize() into two functions:
- TargetRegisterInfo::getRegSizeInBits(const TargetRegisterClass &RC) const;
- TargetRegisterInfo::getSpillSize(const TargetRegisterClass &RC) const;
- Replace RegisterClass::getAlignment() with:
- TargetRegisterInfo::getSpillAlignment(const TargetRegisterClass &RC) const;
This will allow making those values depend on subtarget features in the future.
The plan for this is that the TargetRegisterInfo object would contain an extra member, indicating the ID of the hardware configuration associated with the subtarget. The ID would have a default value indicating a "default configuration". The target-specific <Xyz>GenRegisterInfo object, would take an optional argument indicating the ID of the hardware configuration and pass it to TargetRegisterInfo.
The TargetRegisterInfo object would then use the the ID to access the corresponding data describing register and spill sizes, spill alignments, and machine value types (coming in another patch after this). Since the ID would not be available to <Abc>RegisterClass objects, the API to access this information is being moved to TRI.
Edit: change the types from * to &.
Edit: explain the plan
This takes a register class not a register.