diff options
author | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2012-08-07 22:37:05 +0000 |
---|---|---|
committer | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2012-08-07 22:37:05 +0000 |
commit | 74500bdba3eae36a1a8a17d8bad0b971b9c212ec (patch) | |
tree | d0289b94057a345ba5b02a507b16982a17634ff9 /lib/CodeGen/SelectionDAG/InstrEmitter.cpp | |
parent | f12c95a8af22771845fa16253ad04e90741f5602 (diff) | |
download | external_llvm-74500bdba3eae36a1a8a17d8bad0b971b9c212ec.zip external_llvm-74500bdba3eae36a1a8a17d8bad0b971b9c212ec.tar.gz external_llvm-74500bdba3eae36a1a8a17d8bad0b971b9c212ec.tar.bz2 |
Add SelectionDAG::getTargetIndex.
This adds support for TargetIndex operands during isel. The meaning of
these (index, offset, flags) operands is entirely defined by the target.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161453 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SelectionDAG/InstrEmitter.cpp')
-rw-r--r-- | lib/CodeGen/SelectionDAG/InstrEmitter.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/CodeGen/SelectionDAG/InstrEmitter.cpp b/lib/CodeGen/SelectionDAG/InstrEmitter.cpp index 936c126..4488d27 100644 --- a/lib/CodeGen/SelectionDAG/InstrEmitter.cpp +++ b/lib/CodeGen/SelectionDAG/InstrEmitter.cpp @@ -411,6 +411,10 @@ void InstrEmitter::AddOperand(MachineInstr *MI, SDValue Op, } else if (BlockAddressSDNode *BA = dyn_cast<BlockAddressSDNode>(Op)) { MI->addOperand(MachineOperand::CreateBA(BA->getBlockAddress(), BA->getTargetFlags())); + } else if (TargetIndexSDNode *TI = dyn_cast<TargetIndexSDNode>(Op)) { + MI->addOperand(MachineOperand::CreateTargetIndex(TI->getIndex(), + TI->getOffset(), + TI->getTargetFlags())); } else { assert(Op.getValueType() != MVT::Other && Op.getValueType() != MVT::Glue && |