MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / EmitLoop

Method EmitLoop

tensorflow/compiler/xla/service/llvm_ir/loop_emitter.cc:130–148  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

128}
129
130Status LoopEmitter::EmitLoop(absl::string_view loop_name,
131 llvm::Type* index_type) {
132 if (index_type == nullptr) {
133 index_type = b_->getInt64Ty();
134 }
135
136 for (const IrArray::Index& array_index :
137 EmitIndexAndSetExitBasicBlock(loop_name, index_type,
138 /*base_index*/nullptr)) {
139 TF_RETURN_IF_ERROR(body_emitter_(array_index));
140 }
141
142 // Set the insertion point of b_ to the loop exit, so that
143 // code emitted for later instructions will be correctly placed.
144 if (exit_bb_ != nullptr) {
145 b_->SetInsertPoint(exit_bb_);
146 }
147 return Status::OK();
148}
149
150} // namespace llvm_ir
151} // namespace xla

Callers 3

EmitSortInPlaceFunction · 0.45
EmitTargetElementLoopMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected