mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-23 22:23:00 +00:00
Add a new TargetInstrInfo MachineInstr opcode, COPY_TO_SUBCLASS.
This will be used to replace things like X86's MOV32to32_. Enhance ScheduleDAGSDNodesEmit to be more flexible and robust in the presense of subregister superclasses and subclasses. It can now cope with the definition of a virtual register being in a subclass of a use. Re-introduce the code for recording register superreg classes and subreg classes. This is needed because when subreg extracts and inserts get coalesced away, the virtual registers are left in the correct subclass. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68961 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -33,8 +33,9 @@ void CodeEmitterGen::reverseBits(std::vector<Record*> &Insts) {
|
||||
R->getName() == "EXTRACT_SUBREG" ||
|
||||
R->getName() == "INSERT_SUBREG" ||
|
||||
R->getName() == "IMPLICIT_DEF" ||
|
||||
R->getName() == "SUBREG_TO_REG") continue;
|
||||
|
||||
R->getName() == "SUBREG_TO_REG" ||
|
||||
R->getName() == "COPY_TO_SUBCLASS") continue;
|
||||
|
||||
BitsInit *BI = R->getValueAsBitsInit("Inst");
|
||||
|
||||
unsigned numBits = BI->getNumBits();
|
||||
@@ -109,7 +110,8 @@ void CodeEmitterGen::run(std::ostream &o) {
|
||||
R->getName() == "EXTRACT_SUBREG" ||
|
||||
R->getName() == "INSERT_SUBREG" ||
|
||||
R->getName() == "IMPLICIT_DEF" ||
|
||||
R->getName() == "SUBREG_TO_REG") {
|
||||
R->getName() == "SUBREG_TO_REG" ||
|
||||
R->getName() == "COPY_TO_SUBCLASS") {
|
||||
o << " 0U,\n";
|
||||
continue;
|
||||
}
|
||||
@@ -146,8 +148,9 @@ void CodeEmitterGen::run(std::ostream &o) {
|
||||
InstName == "EXTRACT_SUBREG" ||
|
||||
InstName == "INSERT_SUBREG" ||
|
||||
InstName == "IMPLICIT_DEF" ||
|
||||
InstName == "SUBREG_TO_REG") continue;
|
||||
|
||||
InstName == "SUBREG_TO_REG" ||
|
||||
InstName == "COPY_TO_SUBCLASS") continue;
|
||||
|
||||
BitsInit *BI = R->getValueAsBitsInit("Inst");
|
||||
const std::vector<RecordVal> &Vals = R->getValues();
|
||||
CodeGenInstruction &CGI = Target.getInstruction(InstName);
|
||||
|
||||
Reference in New Issue
Block a user