mirror of
https://github.com/RPCSX/llvm.git
synced 2025-01-30 17:02:29 +00:00
Create a machine basic block in the constant pool and retrieve the symbol for an MBB.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140824 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
4dd9b091cc
commit
e00897c5a9
@ -853,6 +853,9 @@ EmitMachineConstantPoolValue(MachineConstantPoolValue *MCPV) {
|
||||
} else if (ACPV->isGlobalValue()) {
|
||||
const GlobalValue *GV = ACPV->getGV();
|
||||
MCSym = GetARMGVSymbol(GV);
|
||||
} else if (ACPV->isMachineBasicBlock()) {
|
||||
const MachineBasicBlock *MBB = ACPV->getMBB();
|
||||
MCSym = MBB->getSymbol();
|
||||
} else {
|
||||
assert(ACPV->isExtSymbol() && "unrecognized constant pool value");
|
||||
MCSym = GetExternalSymbolSymbol(ACPV->getSymbol());
|
||||
|
@ -1065,6 +1065,10 @@ static unsigned duplicateCPV(MachineFunction &MF, unsigned &CPI) {
|
||||
else if (ACPV->isLSDA())
|
||||
NewCPV = new ARMConstantPoolValue(MF.getFunction(), PCLabelId,
|
||||
ARMCP::CPLSDA, 4);
|
||||
else if (ACPV->isMachineBasicBlock())
|
||||
NewCPV = new ARMConstantPoolValue(MF.getFunction()->getContext(),
|
||||
ACPV->getMBB(), PCLabelId,
|
||||
ARMCP::CPMachineBasicBlock, 4);
|
||||
else
|
||||
llvm_unreachable("Unexpected ARM constantpool value type!!");
|
||||
CPI = MCP->getConstantPoolIndex(NewCPV, MCPE.getAlignment());
|
||||
|
Loading…
x
Reference in New Issue
Block a user