egraphs-good / eggcc

MIT License
51 stars 11 forks source link

Implement mem2reg? #372

Open oflatt opened 8 months ago

oflatt commented 8 months ago

One of LLVM's important optimizations is mem2reg, which turns memory writes and reads into register writes and reads. Here's a good example: https://blog.matthieud.me/2020/exploring-clang-llvm-optimization-on-programming-horror/

LLVM Pass https://github.com/llvm/llvm-project/blob/main/mlir/lib/Transforms/Mem2Reg.cpp