diff options
| author | Ginger Bill <bill@gingerbill.org> | 2017-08-20 18:28:21 +0100 |
|---|---|---|
| committer | Ginger Bill <bill@gingerbill.org> | 2017-08-20 18:28:21 +0100 |
| commit | 6c73f9d3fdc0249485ffc1e3314f1ed2750b60d0 (patch) | |
| tree | d9b27647cceb4a1bee53b37a48091f11b29c6f17 /src/ssa.cpp | |
| parent | 1161aa829d0823cfa3e2f4c93160b7b94b4b0a5c (diff) | |
Global variable dependency initialization ordering
Fuck graph theory
Diffstat (limited to 'src/ssa.cpp')
| -rw-r--r-- | src/ssa.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ssa.cpp b/src/ssa.cpp index 5862cca20..25afef118 100644 --- a/src/ssa.cpp +++ b/src/ssa.cpp @@ -159,7 +159,7 @@ struct ssaModule { gbAllocator tmp_allocator; gbArena tmp_arena; - Map<Entity *> min_dep_map; // Key: Entity * + PtrSet<Entity *> min_dep_map; Map<ssaValue *> values; // Key: Entity * // List of registers for the specific architecture Array<ssaRegister> registers; @@ -2464,7 +2464,7 @@ bool ssa_generate(Parser *parser, CheckerInfo *info) { continue; } - if (map_get(&m.min_dep_map, hash_pointer(e)) == nullptr) { + if (!ptr_set_exists(&m.min_dep_map, e)) { // NOTE(bill): Nothing depends upon it so doesn't need to be built continue; } |