halide / Halide

a language for fast, portable data-parallel computation
https://halide-lang.org
Other
5.78k stars 1.07k forks source link

Rewrite IREquality to use a more compact stack instead of deep recursion #8198

Closed abadams closed 2 months ago

abadams commented 2 months ago

Deletes a bunch of code and speeds up lowering time of local laplacian with 20 pyramid levels by ~2.5%

Also fix some cases where equal wasn't considering recently-added IR node fields like partition_policy (suggestions for some way to guarantee this can't happen would be welcome).

Also changed calls to equal(..., true) to just is_const_one

abadams commented 2 months ago

Now more like 4% faster, and fast enough to delete the specialized version of equal in IRMatch.cpp

abadams commented 2 months ago

Merging. Bots were all green a few commits ago and I've only tweaked comments since then.