mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-24 22:24:54 +00:00
Move getSubRegisterRegClass from ScheduleDagSDNodesEmit.cpp to a TargetRegisterClass method.
Also make the method non-asserting. It will return NULL when given an invalid subreg index. The method is needed by an upcoming patch. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70296 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -148,6 +148,16 @@ public:
|
||||
return I;
|
||||
}
|
||||
|
||||
/// getSubRegisterRegClass - Return the register class of subregisters with
|
||||
/// index SubIdx, or NULL if no such class exists.
|
||||
const TargetRegisterClass* getSubRegisterRegClass(unsigned SubIdx) const {
|
||||
assert(SubIdx>0 && "Invalid subregister index");
|
||||
for (unsigned s = 0; s != SubIdx-1; ++s)
|
||||
if (!SubRegClasses[s])
|
||||
return NULL;
|
||||
return SubRegClasses[SubIdx-1];
|
||||
}
|
||||
|
||||
/// superregclasses_begin / superregclasses_end - Loop over all of
|
||||
/// the superreg register classes of this register class.
|
||||
sc_iterator superregclasses_begin() const {
|
||||
|
Reference in New Issue
Block a user