Mercurial > hg > CbC > CbC_llvm
comparison lib/Target/XCore/XCoreISelDAGToDAG.cpp @ 147:c2174574ed3a
LLVM 10
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Wed, 14 Aug 2019 16:55:33 +0900 |
parents | 3a76565eade5 |
children |
comparison
equal
deleted
inserted
replaced
134:3a76565eade5 | 147:c2174574ed3a |
---|---|
1 //===-- XCoreISelDAGToDAG.cpp - A dag to dag inst selector for XCore ------===// | 1 //===-- XCoreISelDAGToDAG.cpp - A dag to dag inst selector for XCore ------===// |
2 // | 2 // |
3 // The LLVM Compiler Infrastructure | 3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. |
4 // | 4 // See https://llvm.org/LICENSE.txt for license information. |
5 // This file is distributed under the University of Illinois Open Source | 5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
6 // License. See LICENSE.TXT for details. | |
7 // | 6 // |
8 //===----------------------------------------------------------------------===// | 7 //===----------------------------------------------------------------------===// |
9 // | 8 // |
10 // This file defines an instruction selector for the XCore target. | 9 // This file defines an instruction selector for the XCore target. |
11 // | 10 // |
148 ConstantInt::get(Type::getInt32Ty(*CurDAG->getContext()), Val), | 147 ConstantInt::get(Type::getInt32Ty(*CurDAG->getContext()), Val), |
149 getTargetLowering()->getPointerTy(CurDAG->getDataLayout())); | 148 getTargetLowering()->getPointerTy(CurDAG->getDataLayout())); |
150 SDNode *node = CurDAG->getMachineNode(XCore::LDWCP_lru6, dl, MVT::i32, | 149 SDNode *node = CurDAG->getMachineNode(XCore::LDWCP_lru6, dl, MVT::i32, |
151 MVT::Other, CPIdx, | 150 MVT::Other, CPIdx, |
152 CurDAG->getEntryNode()); | 151 CurDAG->getEntryNode()); |
153 MachineSDNode::mmo_iterator MemOp = MF->allocateMemRefsArray(1); | 152 MachineMemOperand *MemOp = |
154 MemOp[0] = | |
155 MF->getMachineMemOperand(MachinePointerInfo::getConstantPool(*MF), | 153 MF->getMachineMemOperand(MachinePointerInfo::getConstantPool(*MF), |
156 MachineMemOperand::MOLoad, 4, 4); | 154 MachineMemOperand::MOLoad, 4, 4); |
157 cast<MachineSDNode>(node)->setMemRefs(MemOp, MemOp + 1); | 155 CurDAG->setNodeMemRefs(cast<MachineSDNode>(node), {MemOp}); |
158 ReplaceNode(N, node); | 156 ReplaceNode(N, node); |
159 return; | 157 return; |
160 } | 158 } |
161 break; | 159 break; |
162 } | 160 } |