mirror of
https://github.com/odin-lang/Odin.git
synced 2026-07-11 02:19:30 +00:00
Avoid code regeneration for fns in unroll
This commit is contained in:
@@ -846,8 +846,9 @@ gb_internal void lb_build_nested_proc(lbProcedure *p, AstProcLit *pd, Entity *e)
|
||||
GB_ASSERT(pd->body != nullptr);
|
||||
lbModule *m = p->module;
|
||||
|
||||
if (e->min_dep_count.load(std::memory_order_relaxed) == 0) {
|
||||
if (e->min_dep_count.load(std::memory_order_relaxed) == 0 || e->code_gen_procedure != nullptr) {
|
||||
// NOTE(bill): Nothing depends upon it so doesn't need to be built
|
||||
// NOTE(tf2spi): Code may already be generated (i.e. loop unrolling), don't regen it
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user