From 61700afcd33883ab821491476a0f7962fa66d798 Mon Sep 17 00:00:00 2001 From: Steven Johnson Date: Fri, 31 Mar 2023 09:48:29 -0700 Subject: [PATCH] Remove unused 'external_buffers' member in Codegen_Xtensa --- src/CodeGen_Xtensa.cpp | 9 +-------- src/CodeGen_Xtensa.h | 3 --- 2 files changed, 1 insertion(+), 11 deletions(-) diff --git a/src/CodeGen_Xtensa.cpp b/src/CodeGen_Xtensa.cpp index d69939b41c43..b432f92bc2db 100644 --- a/src/CodeGen_Xtensa.cpp +++ b/src/CodeGen_Xtensa.cpp @@ -786,9 +786,6 @@ void CodeGen_Xtensa::visit(const Load *op) { native_lanes = bytes_in_vector / 2; } bool is_aligned_load = (op->alignment.modulus % native_lanes == 0) && (op->alignment.remainder % native_lanes == 0); - if (external_buffers.count(op->name) > 0) { - is_aligned_load = is_aligned_load && (op->param.host_alignment() % bytes_in_vector == 0); - } if (is_aligned_load) { op_name = "aligned_load"; } else { @@ -811,7 +808,7 @@ void CodeGen_Xtensa::visit(const Load *op) { // } else { string id_index = print_expr(op->index); // Is not allocated on the heap and is not a buffer - bool is_tcm = !(heap_allocations.contains(name) || external_buffers.count(op->name) > 0); + bool is_tcm = !heap_allocations.contains(name); rhs << "gather_load<" << print_type(t) << ", " << print_type(Int(32, t.lanes())) << ", " @@ -938,10 +935,6 @@ void CodeGen_Xtensa::visit(const Store *op) { } bool is_aligned_store = (op->alignment.modulus % native_lanes == 0) && (op->alignment.remainder % native_lanes == 0); - if (external_buffers.count(op->name) > 0) { - is_aligned_store = is_aligned_store && (op->param.host_alignment() % bytes_in_vector == 0); - } - if (is_aligned_store) { op_name = "aligned_store"; } else { diff --git a/src/CodeGen_Xtensa.h b/src/CodeGen_Xtensa.h index 08a8e0ef0aef..3502210b2745 100644 --- a/src/CodeGen_Xtensa.h +++ b/src/CodeGen_Xtensa.h @@ -68,9 +68,6 @@ class CodeGen_Xtensa : public CodeGen_C { int current_loop_level = 0; std::vector global_static_allocations; - // TODO: this appears to be unused; we read from it but never write to it? - std::set external_buffers; - template bool is_native_xtensa_vector(halide_type_t op_type) const { constexpr halide_type_t cpp_type = halide_type_of();