agx: Add forward optimizing pass for fmov
authorAlyssa Rosenzweig <alyssa@rosenzweig.io>
Sat, 17 Apr 2021 14:29:27 +0000 (10:29 -0400)
committerAlyssa Rosenzweig <none>
Sun, 2 May 2021 21:41:16 +0000 (17:41 -0400)
commit28801b4849371e633eb66dd2c802d44dbb9e3304
treedc4caf67906944a57d6b15e1c7390770036a9f2f
parente50bae00f480d3061f096d6840ec6528a0fd66cb
agx: Add forward optimizing pass for fmov

Explain the ideas behind our SSA-based optimizer (inspired by ACO's,
thank you to Daniel Schuermann for discussing this with me in the
context of Bifrost), and implement the subset needed to propagate
abs/neg through.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Jason Ekstrand <jason@jlekstrand.net>
Acked-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10582>
src/asahi/compiler/agx_compile.c
src/asahi/compiler/agx_compiler.h
src/asahi/compiler/agx_optimizer.c [new file with mode: 0644]
src/asahi/compiler/meson.build