[llvm-dev] Fwd: Superoptimization for RISC-V: What is the state of the art now?

123 views
Skip to first unread message

Wei Wu (吴伟) via llvm-dev

unread,
Feb 17, 2021, 4:54:35 AM2/17/21
to llvm-dev
Hi all,

I appreciate it if you can drop some information/papers/open source project urls that are related to superoptimization. Although I am targeting RISC-V ISA, there might be some other research works / open source projects available in the LLVM community.

(Sorry for the duplicate email.)

---------- Forwarded message ---------
From: Wei Wu (吴伟) <lazyp...@gmail.com>
Date: Wed, Feb 17, 2021 at 12:26 PM
Subject: Superoptimization for RISC-V: What is the state of the art now?
To: RISC-V SW Dev <sw-...@groups.riscv.org>


Hi all,

In the last code optimization meeting (formly code-size-reduction and code-speed-opt), the idea of using superoptimization[4] for RISC-V had been discussed. I'm interested in this area. After a quick search I found very few results, though. GNU/Embecosm had a superopt [1] but I am not sure it still works either for GCC 10 or RISC-V backend. Google open sourced a LLVM-IR level tool named souper[2] would help. STOKE[3] is yet another optimizer which targets x86 only.

I appreciate it if you can drop some information/papers/open source project urls that are related to superoptimization. I am going to stand on the basis of gnu-superopt[1], and not sure it is the right/effective way to go.

Thanks.


--
Best wishes,
Wei Wu (吴伟)


--
Best wishes,
Wei Wu (吴伟)

Nuno Lopes via llvm-dev

unread,
Feb 17, 2021, 5:30:02 AM2/17/21
to Wei Wu (吴伟), llvm-dev, John Regehr

STOKE & Souper are the most well supported & maintained superoptimization tools out there. They are very different: STOKE does genetic search, while Souper uses only SMT solvers for (symbolic) search.

Theres also Rosette, which does a hybrid of concrete & symbolic search (mixing concrete search with other techniques seems to be the way to go).

 

I would also look at the SyGuS competition (syntax-guided synthesis). These tools, such as CVC4, can be used for superoptimization as well.

 

In terms of tools, I think thats it. In terms of papers, there are plenty of research groups working on synthesis in general.

 

Nuno

 

 

From: Wei Wu

Sent: 17 February 2021 09:54
To: llvm-dev <llvm...@lists.llvm.org>
Subject: [llvm-dev] Fwd: Superoptimization for RISC-V: What is the state of the art now?

Wei Wu (吴伟) via llvm-dev

unread,
Feb 17, 2021, 5:59:03 AM2/17/21
to Nuno Lopes, llvm-dev, John Regehr
Thanks! The SyGuS is fresh to me. I'll check them out.

I searched Rosette and got lots of food results, and I hope this rosette[1] is the right one:

Please correct me if I looked at the wrong repo.

Nuno Lopes via llvm-dev

unread,
Feb 17, 2021, 6:11:05 AM2/17/21
to Wei Wu (吴伟), llvm-dev, John Regehr

Thats the one, yes.

They did some work on RISC-V; they should have a spec lying around somewhere. Ask Emina.

e.g. https://unsat.cs.washington.edu/papers/geffen-jitsynth.pdf

 

Nuno

Paulo Matos via llvm-dev

unread,
Feb 17, 2021, 6:55:20 AM2/17/21
to Wei Wu (吴伟), llvm...@lists.llvm.org

Hi Wei,

Back in 2018 I worked in a commercial superoptimizer for RISCV - S10,
which I presented as a poster in the RISCV Workshop in Barcelona:
https://youtu.be/ylTA63vPHYU?t=1969
https://linki.tools/s10.html

To be fair, this was mostly used for consultancy into specific hot code
blocks. Since then I moved on to other things but still hold a keen
interest in Superoptimization.

S10 was built upon greenthumb:
https://github.com/mangpo/greenthumb

I have been meaning to open source S10 but writing the documentation,
cleaning up the code, etc is taking quite a bit of time although it's
one of my priorities for 2021.

In any case, if you want to know more or if I can help any further, feel
free to drop me an email.

--
Paulo Matos


--
Paulo Matos
_______________________________________________
LLVM Developers mailing list
llvm...@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev

Wei Wu (吴伟) via llvm-dev

unread,
Feb 17, 2021, 11:37:42 PM2/17/21
to Paulo Matos, llvm-dev
Hi Paulo,

I am really excited to know that you are planning to open source S10!
Reply all
Reply to author
Forward
0 new messages