mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-25 13:24:46 +00:00
move target-independent opcodes out of TargetInstrInfo
into TargetOpcodes.h. #include the new TargetOpcodes.h into MachineInstr. Add new inline accessors (like isPHI()) to MachineInstr, and start using them throughout the codebase. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95687 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -801,7 +801,7 @@ void SelectionDAGISel::SelectAllBasicBlocks(Function &Fn,
|
||||
// landing pad can thus be detected via the MachineModuleInfo.
|
||||
unsigned LabelID = MMI->addLandingPad(BB);
|
||||
|
||||
const TargetInstrDesc &II = TII.get(TargetInstrInfo::EH_LABEL);
|
||||
const TargetInstrDesc &II = TII.get(TargetOpcode::EH_LABEL);
|
||||
BuildMI(BB, SDB->getCurDebugLoc(), II).addImm(LabelID);
|
||||
|
||||
// Mark exception register as live in.
|
||||
@@ -953,7 +953,7 @@ SelectionDAGISel::FinishBasicBlock() {
|
||||
SDB->BitTestCases.empty()) {
|
||||
for (unsigned i = 0, e = SDB->PHINodesToUpdate.size(); i != e; ++i) {
|
||||
MachineInstr *PHI = SDB->PHINodesToUpdate[i].first;
|
||||
assert(PHI->getOpcode() == TargetInstrInfo::PHI &&
|
||||
assert(PHI->isPHI() &&
|
||||
"This is not a machine PHI node that we are updating!");
|
||||
PHI->addOperand(MachineOperand::CreateReg(SDB->PHINodesToUpdate[i].second,
|
||||
false));
|
||||
@@ -1000,7 +1000,7 @@ SelectionDAGISel::FinishBasicBlock() {
|
||||
for (unsigned pi = 0, pe = SDB->PHINodesToUpdate.size(); pi != pe; ++pi) {
|
||||
MachineInstr *PHI = SDB->PHINodesToUpdate[pi].first;
|
||||
MachineBasicBlock *PHIBB = PHI->getParent();
|
||||
assert(PHI->getOpcode() == TargetInstrInfo::PHI &&
|
||||
assert(PHI->isPHI() &&
|
||||
"This is not a machine PHI node that we are updating!");
|
||||
// This is "default" BB. We have two jumps to it. From "header" BB and
|
||||
// from last "case" BB.
|
||||
@@ -1056,7 +1056,7 @@ SelectionDAGISel::FinishBasicBlock() {
|
||||
for (unsigned pi = 0, pe = SDB->PHINodesToUpdate.size(); pi != pe; ++pi) {
|
||||
MachineInstr *PHI = SDB->PHINodesToUpdate[pi].first;
|
||||
MachineBasicBlock *PHIBB = PHI->getParent();
|
||||
assert(PHI->getOpcode() == TargetInstrInfo::PHI &&
|
||||
assert(PHI->isPHI() &&
|
||||
"This is not a machine PHI node that we are updating!");
|
||||
// "default" BB. We can go there only from header BB.
|
||||
if (PHIBB == SDB->JTCases[i].second.Default) {
|
||||
@@ -1079,7 +1079,7 @@ SelectionDAGISel::FinishBasicBlock() {
|
||||
// need to update PHI nodes in that block.
|
||||
for (unsigned i = 0, e = SDB->PHINodesToUpdate.size(); i != e; ++i) {
|
||||
MachineInstr *PHI = SDB->PHINodesToUpdate[i].first;
|
||||
assert(PHI->getOpcode() == TargetInstrInfo::PHI &&
|
||||
assert(PHI->isPHI() &&
|
||||
"This is not a machine PHI node that we are updating!");
|
||||
if (BB->isSuccessor(PHI->getParent())) {
|
||||
PHI->addOperand(MachineOperand::CreateReg(SDB->PHINodesToUpdate[i].second,
|
||||
@@ -1116,7 +1116,7 @@ SelectionDAGISel::FinishBasicBlock() {
|
||||
// BB may have been removed from the CFG if a branch was constant folded.
|
||||
if (ThisBB->isSuccessor(BB)) {
|
||||
for (MachineBasicBlock::iterator Phi = BB->begin();
|
||||
Phi != BB->end() && Phi->getOpcode() == TargetInstrInfo::PHI;
|
||||
Phi != BB->end() && Phi->isPHI();
|
||||
++Phi) {
|
||||
// This value for this PHI node is recorded in PHINodesToUpdate.
|
||||
for (unsigned pn = 0; ; ++pn) {
|
||||
@@ -1410,15 +1410,14 @@ SDNode *SelectionDAGISel::Select_INLINEASM(SDNode *N) {
|
||||
}
|
||||
|
||||
SDNode *SelectionDAGISel::Select_UNDEF(SDNode *N) {
|
||||
return CurDAG->SelectNodeTo(N, TargetInstrInfo::IMPLICIT_DEF,
|
||||
N->getValueType(0));
|
||||
return CurDAG->SelectNodeTo(N, TargetOpcode::IMPLICIT_DEF,N->getValueType(0));
|
||||
}
|
||||
|
||||
SDNode *SelectionDAGISel::Select_EH_LABEL(SDNode *N) {
|
||||
SDValue Chain = N->getOperand(0);
|
||||
unsigned C = cast<LabelSDNode>(N)->getLabelID();
|
||||
SDValue Tmp = CurDAG->getTargetConstant(C, MVT::i32);
|
||||
return CurDAG->SelectNodeTo(N, TargetInstrInfo::EH_LABEL,
|
||||
return CurDAG->SelectNodeTo(N, TargetOpcode::EH_LABEL,
|
||||
MVT::Other, Tmp, Chain);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user