/external/llvm/lib/Target/MSP430/ |
D | MSP430MCInstLower.cpp | 30 GetGlobalAddressSymbol(const MachineOperand &MO) const { in GetGlobalAddressSymbol() 31 switch (MO.getTargetFlags()) { in GetGlobalAddressSymbol() 36 return Printer.Mang->getSymbol(MO.getGlobal()); in GetGlobalAddressSymbol() 40 GetExternalSymbolSymbol(const MachineOperand &MO) const { in GetExternalSymbolSymbol() 41 switch (MO.getTargetFlags()) { in GetExternalSymbolSymbol() 46 return Printer.GetExternalSymbolSymbol(MO.getSymbolName()); in GetExternalSymbolSymbol() 50 GetJumpTableSymbol(const MachineOperand &MO) const { in GetJumpTableSymbol() 54 << MO.getIndex(); in GetJumpTableSymbol() 56 switch (MO.getTargetFlags()) { in GetJumpTableSymbol() 66 GetConstantPoolIndexSymbol(const MachineOperand &MO) const { in GetConstantPoolIndexSymbol() [all …]
|
/external/llvm/lib/Target/MBlaze/ |
D | MBlazeMCInstLower.cpp | 33 GetGlobalAddressSymbol(const MachineOperand &MO) const { in GetGlobalAddressSymbol() 34 switch (MO.getTargetFlags()) { in GetGlobalAddressSymbol() 39 return Printer.Mang->getSymbol(MO.getGlobal()); in GetGlobalAddressSymbol() 43 GetExternalSymbolSymbol(const MachineOperand &MO) const { in GetExternalSymbolSymbol() 44 switch (MO.getTargetFlags()) { in GetExternalSymbolSymbol() 49 return Printer.GetExternalSymbolSymbol(MO.getSymbolName()); in GetExternalSymbolSymbol() 53 GetJumpTableSymbol(const MachineOperand &MO) const { in GetJumpTableSymbol() 57 << MO.getIndex(); in GetJumpTableSymbol() 58 switch (MO.getTargetFlags()) { in GetJumpTableSymbol() 68 GetConstantPoolIndexSymbol(const MachineOperand &MO) const { in GetConstantPoolIndexSymbol() [all …]
|
D | MBlazeAsmPrinter.cpp | 211 const MachineOperand &MO = MI->getOperand(opNum); in printOperand() local 213 switch (MO.getType()) { in printOperand() 215 O << MBlazeInstPrinter::getRegisterName(MO.getReg()); in printOperand() 219 O << (int32_t)MO.getImm(); in printOperand() 223 const ConstantFP *fp = MO.getFPImm(); in printOperand() 230 O << *MO.getMBB()->getSymbol(); in printOperand() 234 O << *Mang->getSymbol(MO.getGlobal()); in printOperand() 238 O << *GetExternalSymbolSymbol(MO.getSymbolName()); in printOperand() 243 << '_' << MO.getIndex(); in printOperand() 248 << getFunctionNumber() << "_" << MO.getIndex(); in printOperand() [all …]
|
/external/llvm/lib/Target/PowerPC/ |
D | PPCCodeEmitter.cpp | 56 MachineRelocation GetRelocation(const MachineOperand &MO, 61 const MachineOperand &MO) const; 140 const MachineOperand &MO = MI.getOperand(OpNo); in get_crbitm_encoding() local 143 (MO.getReg() >= PPC::CR0 && MO.getReg() <= PPC::CR7)); in get_crbitm_encoding() 144 return 0x80 >> getPPCRegisterNumbering(MO.getReg()); in get_crbitm_encoding() 147 MachineRelocation PPCCodeEmitter::GetRelocation(const MachineOperand &MO, in GetRelocation() argument 160 if (MO.isGlobal()) in GetRelocation() 162 const_cast<GlobalValue *>(MO.getGlobal()), in GetRelocation() 163 Cst, isa<Function>(MO.getGlobal())); in GetRelocation() 164 if (MO.isSymbol()) in GetRelocation() [all …]
|
D | PPCMCInstLower.cpp | 31 static MCSymbol *GetSymbolFromOperand(const MachineOperand &MO, AsmPrinter &AP){ in GetSymbolFromOperand() argument 35 if (!MO.isGlobal()) { in GetSymbolFromOperand() 36 assert(MO.isSymbol() && "Isn't a symbol reference"); in GetSymbolFromOperand() 38 Name += MO.getSymbolName(); in GetSymbolFromOperand() 40 const GlobalValue *GV = MO.getGlobal(); in GetSymbolFromOperand() 42 if (MO.getTargetFlags() == PPCII::MO_DARWIN_STUB || in GetSymbolFromOperand() 43 (MO.getTargetFlags() & PPCII::MO_NLP_FLAG)) in GetSymbolFromOperand() 51 if (MO.getTargetFlags() == PPCII::MO_DARWIN_STUB) { in GetSymbolFromOperand() 59 if (MO.isGlobal()) { in GetSymbolFromOperand() 62 StubValueTy(AP.Mang->getSymbol(MO.getGlobal()), in GetSymbolFromOperand() [all …]
|
/external/llvm/lib/Target/PowerPC/MCTargetDesc/ |
D | PPCMCCodeEmitter.cpp | 55 unsigned getMachineOpValue(const MCInst &MI,const MCOperand &MO, 88 const MCOperand &MO = MI.getOperand(OpNo); in getDirectBrEncoding() local 89 if (MO.isReg() || MO.isImm()) return getMachineOpValue(MI, MO, Fixups); in getDirectBrEncoding() 92 Fixups.push_back(MCFixup::Create(0, MO.getExpr(), in getDirectBrEncoding() 99 const MCOperand &MO = MI.getOperand(OpNo); in getCondBrEncoding() local 100 if (MO.isReg() || MO.isImm()) return getMachineOpValue(MI, MO, Fixups); in getCondBrEncoding() 103 Fixups.push_back(MCFixup::Create(0, MO.getExpr(), in getCondBrEncoding() 110 const MCOperand &MO = MI.getOperand(OpNo); in getHA16Encoding() local 111 if (MO.isReg() || MO.isImm()) return getMachineOpValue(MI, MO, Fixups); in getHA16Encoding() 114 Fixups.push_back(MCFixup::Create(0, MO.getExpr(), in getHA16Encoding() [all …]
|
/external/llvm/lib/Target/ARM/ |
D | ARMMCInstLower.cpp | 26 MCOperand ARMAsmPrinter::GetSymbolRef(const MachineOperand &MO, in GetSymbolRef() argument 29 switch (MO.getTargetFlags()) { in GetSymbolRef() 33 switch (MO.getTargetFlags()) { in GetSymbolRef() 57 if (!MO.isJTI() && MO.getOffset()) in GetSymbolRef() 59 MCConstantExpr::Create(MO.getOffset(), in GetSymbolRef() 66 bool ARMAsmPrinter::lowerOperand(const MachineOperand &MO, in lowerOperand() argument 68 switch (MO.getType()) { in lowerOperand() 72 if (MO.isImplicit() && MO.getReg() != ARM::CPSR) in lowerOperand() 74 assert(!MO.getSubReg() && "Subregs should be eliminated!"); in lowerOperand() 75 MCOp = MCOperand::CreateReg(MO.getReg()); in lowerOperand() [all …]
|
/external/llvm/lib/Target/Hexagon/ |
D | HexagonMCInstLower.cpp | 26 static MCOperand GetSymbolRef(const MachineOperand& MO, const MCSymbol* Symbol, in GetSymbolRef() argument 33 if (!MO.isJTI() && MO.getOffset()) in GetSymbolRef() 34 ME = MCBinaryExpr::CreateAdd(ME, MCConstantExpr::Create(MO.getOffset(), MC), in GetSymbolRef() 46 const MachineOperand &MO = MI->getOperand(i); in HexagonLowerToMC() local 49 switch (MO.getType()) { in HexagonLowerToMC() 55 if (MO.isImplicit()) continue; in HexagonLowerToMC() 56 MCO = MCOperand::CreateReg(MO.getReg()); in HexagonLowerToMC() 59 APFloat Val = MO.getFPImm()->getValueAPF(); in HexagonLowerToMC() 66 MCO = MCOperand::CreateImm(MO.getImm()); in HexagonLowerToMC() 70 (MCSymbolRefExpr::Create(MO.getMBB()->getSymbol(), in HexagonLowerToMC() [all …]
|
D | HexagonAsmPrinter.cpp | 77 const MachineOperand &MO = MI->getOperand(OpNo); in printOperand() local 79 switch (MO.getType()) { in printOperand() 83 O << HexagonInstPrinter::getRegisterName(MO.getReg()); in printOperand() 86 O << MO.getImm(); in printOperand() 89 O << *MO.getMBB()->getSymbol(); in printOperand() 92 O << *GetJTISymbol(MO.getIndex()); in printOperand() 96 O << *GetCPISymbol(MO.getIndex()); in printOperand() 99 O << *GetExternalSymbolSymbol(MO.getSymbolName()); in printOperand() 103 O << *Mang->getSymbol(MO.getGlobal()); in printOperand() 104 printOffset(MO.getOffset(), O); in printOperand() [all …]
|
/external/llvm/lib/CodeGen/ |
D | MachineInstr.cpp | 741 MachineMemOperand *MO) { in addMemOperand() argument 749 NewMemRefs[NewNum - 1] = MO; in addMemOperand() 795 const MachineOperand &MO = getOperand(i); in isIdenticalTo() local 797 if (!MO.isReg()) { in isIdenticalTo() 798 if (!MO.isIdenticalTo(OMO)) in isIdenticalTo() 806 if (MO.isDef()) { in isIdenticalTo() 810 if (TargetRegisterInfo::isPhysicalRegister(MO.getReg()) || in isIdenticalTo() 812 if (MO.getReg() != OMO.getReg()) in isIdenticalTo() 815 if (!MO.isIdenticalTo(OMO)) in isIdenticalTo() 817 if (Check == CheckKillDead && MO.isDead() != OMO.isDead()) in isIdenticalTo() [all …]
|
D | RegAllocFast.cpp | 203 bool RAFast::isLastUseOfLocalReg(MachineOperand &MO) { in isLastUseOfLocalReg() argument 206 MachineOperand *Next = &MO; in isLastUseOfLocalReg() 213 if (StackSlotForVirtReg[MO.getReg()] != -1) in isLastUseOfLocalReg() 217 return &MRI->reg_nodbg_begin(MO.getReg()).getOperand() == &MO; in isLastUseOfLocalReg() 223 MachineOperand &MO = LR.LastUse->getOperand(LR.LastOpNum); in addKillFlag() local 224 if (MO.isUse() && !LR.LastUse->isRegTiedToDefOperand(LR.LastOpNum)) { in addKillFlag() 225 if (MO.getReg() == LR.PhysReg) in addKillFlag() 226 MO.setIsKill(); in addKillFlag() 335 void RAFast::usePhysReg(MachineOperand &MO) { in usePhysReg() argument 336 unsigned PhysReg = MO.getReg(); in usePhysReg() [all …]
|
D | MachineInstrBundle.cpp | 53 MachineOperand &MO = MII->getOperand(i); in runOnMachineFunction() local 54 if (MO.isReg() && MO.isInternalRead()) in runOnMachineFunction() 55 MO.setIsInternalRead(false); in runOnMachineFunction() 123 MachineOperand &MO = FirstMI->getOperand(i); in finalizeBundle() local 124 if (!MO.isReg()) in finalizeBundle() 126 if (MO.isDef()) { in finalizeBundle() 127 Defs.push_back(&MO); in finalizeBundle() 131 unsigned Reg = MO.getReg(); in finalizeBundle() 136 MO.setIsInternalRead(); in finalizeBundle() 137 if (MO.isKill()) in finalizeBundle() [all …]
|
D | RegisterScavenging.cpp | 152 const MachineOperand &MO = MI->getOperand(i); in forward() local 153 if (MO.isRegMask()) in forward() 154 (isPred ? DefRegs : KillRegs).setBitsNotInMask(MO.getRegMask()); in forward() 155 if (!MO.isReg()) in forward() 157 unsigned Reg = MO.getReg(); in forward() 161 if (MO.isUse()) { in forward() 163 if (MO.isUndef()) in forward() 165 if (!isPred && MO.isKill()) in forward() 168 assert(MO.isDef()); in forward() 169 if (!isPred && MO.isDead()) in forward() [all …]
|
D | MachineLICM.cpp | 412 const MachineOperand &MO = MI->getOperand(i); in ProcessMI() local 413 if (MO.isFI()) { in ProcessMI() 415 int FI = MO.getIndex(); in ProcessMI() 426 if (MO.isRegMask()) { in ProcessMI() 427 PhysRegClobbers.setBitsNotInMask(MO.getRegMask()); in ProcessMI() 431 if (!MO.isReg()) in ProcessMI() 433 unsigned Reg = MO.getReg(); in ProcessMI() 439 if (!MO.isDef()) { in ProcessMI() 447 if (MO.isImplicit()) { in ProcessMI() 450 if (!MO.isDead()) in ProcessMI() [all …]
|
D | DeadMachineInstructionElim.cpp | 68 const MachineOperand &MO = MI->getOperand(i); in isDead() local 69 if (MO.isReg() && MO.isDef()) { in isDead() 70 unsigned Reg = MO.getReg(); in isDead() 137 const MachineOperand &MO = MI->getOperand(i); in runOnMachineFunction() local 138 if (!MO.isReg() || !MO.isDef()) in runOnMachineFunction() 140 unsigned Reg = MO.getReg(); in runOnMachineFunction() 166 const MachineOperand &MO = MI->getOperand(i); in runOnMachineFunction() local 167 if (MO.isReg() && MO.isDef()) { in runOnMachineFunction() 168 unsigned Reg = MO.getReg(); in runOnMachineFunction() 178 } else if (MO.isRegMask()) { in runOnMachineFunction() [all …]
|
D | TwoAddressInstructionPass.cpp | 209 const MachineOperand &MO = MI->getOperand(i); in Sink3AddrInstruction() local 210 if (!MO.isReg()) in Sink3AddrInstruction() 212 unsigned MOReg = MO.getReg(); in Sink3AddrInstruction() 215 if (MO.isUse() && MOReg != SavedReg) in Sink3AddrInstruction() 216 UseRegs.insert(MO.getReg()); in Sink3AddrInstruction() 217 if (!MO.isDef()) in Sink3AddrInstruction() 219 if (MO.isImplicit()) in Sink3AddrInstruction() 225 DefReg = MO.getReg(); in Sink3AddrInstruction() 267 MachineOperand &MO = OtherMI->getOperand(i); in Sink3AddrInstruction() local 268 if (!MO.isReg()) in Sink3AddrInstruction() [all …]
|
D | VirtRegMap.cpp | 129 MachineOperand &MO = *MOI; in rewrite() local 132 if (MO.isRegMask()) in rewrite() 133 MRI->addPhysRegsUsedFromRegMask(MO.getRegMask()); in rewrite() 135 if (!MO.isReg() || !TargetRegisterInfo::isVirtualRegister(MO.getReg())) in rewrite() 137 unsigned VirtReg = MO.getReg(); in rewrite() 143 if (MO.getSubReg()) { in rewrite() 147 if (MO.readsReg() && (MO.isDef() || MO.isKill())) in rewrite() 150 if (MO.isDef()) { in rewrite() 155 MO.setIsUndef(false); in rewrite() 158 if (MO.isDead()) in rewrite() [all …]
|
D | MachineCSE.cpp | 122 MachineOperand &MO = MI->getOperand(i); in INITIALIZE_PASS_DEPENDENCY() local 123 if (!MO.isReg() || !MO.isUse()) in INITIALIZE_PASS_DEPENDENCY() 125 unsigned Reg = MO.getReg(); in INITIALIZE_PASS_DEPENDENCY() 146 MO.setReg(SrcReg); in INITIALIZE_PASS_DEPENDENCY() 172 const MachineOperand &MO = I->getOperand(i); in isPhysDefTriviallyDead() local 173 if (MO.isRegMask() && MO.clobbersPhysReg(Reg)) in isPhysDefTriviallyDead() 175 if (!MO.isReg() || !MO.getReg()) in isPhysDefTriviallyDead() 177 if (!TRI->regsOverlap(MO.getReg(), Reg)) in isPhysDefTriviallyDead() 179 if (MO.isUse()) in isPhysDefTriviallyDead() 205 const MachineOperand &MO = MI->getOperand(i); in hasLivePhysRegDefUses() local [all …]
|
/external/llvm/lib/Target/Mips/ |
D | MipsCodeEmitter.cpp | 103 const MachineOperand &MO) const; 106 const MachineOperand &MO) const; 158 const MachineOperand &MO) const { in getRelocation() 174 MachineOperand MO = MI.getOperand(OpNo); in getJumpTargetOpValue() local 175 if (MO.isGlobal()) in getJumpTargetOpValue() 176 emitGlobalAddress(MO.getGlobal(), getRelocation(MI, MO), true); in getJumpTargetOpValue() 177 else if (MO.isSymbol()) in getJumpTargetOpValue() 178 emitExternalSymbolAddress(MO.getSymbolName(), getRelocation(MI, MO)); in getJumpTargetOpValue() 179 else if (MO.isMBB()) in getJumpTargetOpValue() 180 emitMachineBasicBlock(MO.getMBB(), getRelocation(MI, MO)); in getJumpTargetOpValue() [all …]
|
/external/llvm/lib/Target/X86/ |
D | X86AsmPrinter.cpp | 78 void X86AsmPrinter::printSymbolOperand(const MachineOperand &MO, in printSymbolOperand() argument 80 switch (MO.getType()) { in printSymbolOperand() 83 O << *GetJTISymbol(MO.getIndex()); in printSymbolOperand() 86 O << *GetCPISymbol(MO.getIndex()); in printSymbolOperand() 87 printOffset(MO.getOffset(), O); in printSymbolOperand() 90 const GlobalValue *GV = MO.getGlobal(); in printSymbolOperand() 93 if (MO.getTargetFlags() == X86II::MO_DARWIN_STUB) in printSymbolOperand() 95 else if (MO.getTargetFlags() == X86II::MO_DARWIN_NONLAZY || in printSymbolOperand() 96 MO.getTargetFlags() == X86II::MO_DARWIN_NONLAZY_PIC_BASE || in printSymbolOperand() 97 MO.getTargetFlags() == X86II::MO_DARWIN_HIDDEN_NONLAZY_PIC_BASE) in printSymbolOperand() [all …]
|
/external/llvm/lib/Target/ARM/MCTargetDesc/ |
D | ARMMCCodeEmitter.cpp | 72 unsigned getMachineOpValue(const MCInst &MI,const MCOperand &MO, 403 getMachineOpValue(const MCInst &MI, const MCOperand &MO, in getMachineOpValue() argument 405 if (MO.isReg()) { in getMachineOpValue() 406 unsigned Reg = MO.getReg(); in getMachineOpValue() 419 } else if (MO.isImm()) { in getMachineOpValue() 420 return static_cast<unsigned>(MO.getImm()); in getMachineOpValue() 421 } else if (MO.isFPImm()) { in getMachineOpValue() 422 return static_cast<unsigned>(APFloat(MO.getFPImm()) in getMachineOpValue() 433 const MCOperand &MO = MI.getOperand(OpIdx); in EncodeAddrModeOpValues() local 436 Reg = getARMRegisterNumbering(MO.getReg()); in EncodeAddrModeOpValues() [all …]
|
/external/llvm/lib/Target/Hexagon/InstPrinter/ |
D | HexagonInstPrinter.cpp | 59 const MCOperand& MO = MI->getOperand(OpNo); in printOperand() local 61 if (MO.isReg()) { in printOperand() 62 O << getRegisterName(MO.getReg()); in printOperand() 63 } else if(MO.isExpr()) { in printOperand() 64 O << *MO.getExpr(); in printOperand() 65 } else if(MO.isImm()) { in printOperand() 116 const MCOperand& MO = MI->getOperand(OpNo); in printGlobalOperand() local 117 assert(MO.isExpr() && "Expecting expression"); in printGlobalOperand() 124 const MCOperand& MO = MI->getOperand(OpNo); in printJumpTable() local 125 assert(MO.isExpr() && "Expecting expression"); in printJumpTable() [all …]
|
/external/llvm/lib/Target/CellSPU/ |
D | SPUAsmPrinter.cpp | 61 void printOp(const MachineOperand &MO, raw_ostream &OS); 64 const MachineOperand &MO = MI->getOperand(OpNo); in printOperand() local 65 if (MO.isReg()) { in printOperand() 66 O << getRegisterName(MO.getReg()); in printOperand() 67 } else if (MO.isImm()) { in printOperand() 68 O << MO.getImm(); in printOperand() 70 printOp(MO, O); in printOperand() 117 const MachineOperand &MO = MI->getOperand(OpNo); in printMemRegReg() local 118 O << getRegisterName(MO.getReg()) << ", "; in printMemRegReg() 247 void SPUAsmPrinter::printOp(const MachineOperand &MO, raw_ostream &O) { in printOp() argument [all …]
|
/external/llvm/lib/Target/Sparc/ |
D | SparcAsmPrinter.cpp | 74 const MachineOperand &MO = MI->getOperand (opNum); in printOperand() local 76 if (MI->getOpcode() == SP::SETHIi && !MO.isReg() && !MO.isImm()) { in printOperand() 80 !MO.isReg() && !MO.isImm()) { in printOperand() 84 switch (MO.getType()) { in printOperand() 86 O << "%" << StringRef(getRegisterName(MO.getReg())).lower(); in printOperand() 90 O << (int)MO.getImm(); in printOperand() 93 O << *MO.getMBB()->getSymbol(); in printOperand() 96 O << *Mang->getSymbol(MO.getGlobal()); in printOperand() 99 O << MO.getSymbolName(); in printOperand() 103 << MO.getIndex(); in printOperand() [all …]
|
/external/llvm/lib/Target/Mips/MCTargetDesc/ |
D | MipsMCCodeEmitter.cpp | 80 unsigned getMachineOpValue(const MCInst &MI,const MCOperand &MO, 143 const MCOperand &MO = MI.getOperand(OpNo); in getBranchTargetOpValue() local 144 assert(MO.isExpr() && "getBranchTargetOpValue expects only expressions"); in getBranchTargetOpValue() 146 const MCExpr *Expr = MO.getExpr(); in getBranchTargetOpValue() 159 const MCOperand &MO = MI.getOperand(OpNo); in getJumpTargetOpValue() local 160 assert(MO.isExpr() && "getJumpTargetOpValue expects only expressions"); in getJumpTargetOpValue() 162 const MCExpr *Expr = MO.getExpr(); in getJumpTargetOpValue() 171 getMachineOpValue(const MCInst &MI, const MCOperand &MO, in getMachineOpValue() argument 173 if (MO.isReg()) { in getMachineOpValue() 174 unsigned Reg = MO.getReg(); in getMachineOpValue() [all …]
|