must be using version of mlir a3f2751f782f3cdc6ba4790488ec20163a40ac37 pdl-opt parameters are testfile first and pdl rewrite second
requirements python 3, pip, c++ compiler toolchain (preferably clang and lld, does not work with mold)
git clone https://github.com/ajrichins/mlir-fuzz.git
cd mlir-fuzz
git checkout MultipleArgArith
git submodule update --init --recursive
./utils/build-llvm.sh
./utils/setup.sh
./utils/build.sh
mkdir results
to run (it’s very slow, but you can run it partially to see stuff working)
./build/bin/arith-superoptimizer dialects/arith.mlir -—output-directory=“./results” —-max-num-ops=2 --max-num-args=2
go back to base dir
git clone https://github.com/opencompl/xdsl-smt.git
cd xdsl-smt
python -m venv venv
source venv/bin/activate
pip install .
mkdir match_output
go back to base dir
git clone https://github.com/ajrichins/mlir-general-opt-test.git
cd xdsl-smt
cp mlir-general-opt-test/xdsl-smt/poisonModule.mlir ./poisonModule.mlir
cp mlir-general-opt-test/xdsl-smt/OptSifter.py ./OptSifter.py
to run, venv must be active
cd xdsl-smt
source venv/bin/activate
python ./OptSifter.py
general output is in terminal and for specific hashes in the match_output