| OLD | NEW |
| 1 //===- subzero/src/IceTargetLowering.cpp - Basic lowering implementation --===// | 1 //===- subzero/src/IceTargetLowering.cpp - Basic lowering implementation --===// |
| 2 // | 2 // |
| 3 // The Subzero Code Generator | 3 // The Subzero Code Generator |
| 4 // | 4 // |
| 5 // This file is distributed under the University of Illinois Open Source | 5 // This file is distributed under the University of Illinois Open Source |
| 6 // License. See LICENSE.TXT for details. | 6 // License. See LICENSE.TXT for details. |
| 7 // | 7 // |
| 8 //===----------------------------------------------------------------------===// | 8 //===----------------------------------------------------------------------===// |
| 9 /// | 9 /// |
| 10 /// \file | 10 /// \file |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 130 Cfg *Func) { | 130 Cfg *Func) { |
| 131 #define SUBZERO_TARGET(X) \ | 131 #define SUBZERO_TARGET(X) \ |
| 132 if (Target == Target_##X) \ | 132 if (Target == Target_##X) \ |
| 133 return std::unique_ptr<Assembler>(new X::Assembler##X()); | 133 return std::unique_ptr<Assembler>(new X::Assembler##X()); |
| 134 #include "llvm/Config/SZTargets.def" | 134 #include "llvm/Config/SZTargets.def" |
| 135 | 135 |
| 136 Func->setError("Unsupported target assembler"); | 136 Func->setError("Unsupported target assembler"); |
| 137 return nullptr; | 137 return nullptr; |
| 138 } | 138 } |
| 139 | 139 |
| 140 void TargetLowering::genTargetHelperCalls() { |
| 141 for (CfgNode *Node : Func->getNodes()) { |
| 142 Context.init(Node); |
| 143 while (!Context.atEnd()) { |
| 144 PostIncrLoweringContext _(Context); |
| 145 genTargetHelperCallFor(Context.getCur()); |
| 146 } |
| 147 } |
| 148 } |
| 149 |
| 140 void TargetLowering::doAddressOpt() { | 150 void TargetLowering::doAddressOpt() { |
| 141 if (llvm::isa<InstLoad>(*Context.getCur())) | 151 if (llvm::isa<InstLoad>(*Context.getCur())) |
| 142 doAddressOptLoad(); | 152 doAddressOptLoad(); |
| 143 else if (llvm::isa<InstStore>(*Context.getCur())) | 153 else if (llvm::isa<InstStore>(*Context.getCur())) |
| 144 doAddressOptStore(); | 154 doAddressOptStore(); |
| 145 Context.advanceCur(); | 155 Context.advanceCur(); |
| 146 Context.advanceNext(); | 156 Context.advanceNext(); |
| 147 } | 157 } |
| 148 | 158 |
| 149 void TargetLowering::doNopInsertion(RandomNumberGenerator &RNG) { | 159 void TargetLowering::doNopInsertion(RandomNumberGenerator &RNG) { |
| (...skipping 504 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 654 if (Target == Target_##X) \ | 664 if (Target == Target_##X) \ |
| 655 return TargetHeader##X::create(Ctx); | 665 return TargetHeader##X::create(Ctx); |
| 656 #include "llvm/Config/SZTargets.def" | 666 #include "llvm/Config/SZTargets.def" |
| 657 | 667 |
| 658 llvm::report_fatal_error("Unsupported target header lowering"); | 668 llvm::report_fatal_error("Unsupported target header lowering"); |
| 659 } | 669 } |
| 660 | 670 |
| 661 TargetHeaderLowering::~TargetHeaderLowering() = default; | 671 TargetHeaderLowering::~TargetHeaderLowering() = default; |
| 662 | 672 |
| 663 } // end of namespace Ice | 673 } // end of namespace Ice |
| OLD | NEW |