Skip to content

Commit

Permalink
Revert: Exclude the for-loops for zero-arity nodes
Browse files Browse the repository at this point in the history
  • Loading branch information
tomdol committed Jan 16, 2025
1 parent b447018 commit 6754e04
Showing 1 changed file with 5 additions and 11 deletions.
16 changes: 5 additions & 11 deletions compiler/luci/lang/include/luci/IR/CircleNodeMixins.h
Original file line number Diff line number Diff line change
Expand Up @@ -72,13 +72,10 @@ template <uint32_t N, typename Base> class FixedArityNode : public Base
public:
FixedArityNode()
{
if constexpr (N > 0)
_args.resize(N);
for (uint32_t n = 0; n < N; ++n)
{
_args.resize(N);
for (uint32_t n = 0; n < N; ++n)
{
_args[n] = std::make_unique<loco::Use>(this);
}
_args[n] = std::make_unique<loco::Use>(this);
}
}

Expand All @@ -91,12 +88,9 @@ template <uint32_t N, typename Base> class FixedArityNode : public Base

void drop(void) final
{
if constexpr (N > 0)
for (uint32_t n = 0; n < N; ++n)
{
for (uint32_t n = 0; n < N; ++n)
{
_args.at(n)->node(nullptr);
}
_args.at(n)->node(nullptr);
}
}

Expand Down

0 comments on commit 6754e04

Please sign in to comment.