Stream: t-compiler

Topic: Why is rustc_codegen_ssa not simply called rustc_codegen?


Charles Lew (May 05 2020 at 17:04, on Zulip):

I wonder if there's some rationale behind this name :)

bjorn3 (May 05 2020 at 17:08, on Zulip):

You should probably ask @eddyb.

eddyb (May 08 2020 at 14:21, on Zulip):

@Charles Lew yes, although we haven't done much organizing since. the idea is that the common denominator (between, say, LLVM and Cranelift) is SSA (more accurately, CFG+SSA)

eddyb (May 08 2020 at 14:22, on Zulip):

a lot of the stuff that's in rustc_codegen_ssa should probably be in separate crates but what's in the mir module in there, coupled with the "builder" APIs, is suited to a particular kind of IR

eddyb (May 08 2020 at 14:23, on Zulip):

but maybe we should just have a different architecture that makes this less relevant, idk

Charles Lew (May 08 2020 at 14:24, on Zulip):

Thanks for the explanation! Do we have vision for codegen infrastructure of non-SSA?

eddyb (May 08 2020 at 14:24, on Zulip):

an example of something that wouldn't fit well: WASM, because it's not really SSA, and unlike LLVM IR or Cranelift, has mutable local variables that don't require memory accesses

Charles Lew (May 08 2020 at 14:25, on Zulip):

i see, thanks

eddyb (May 08 2020 at 14:25, on Zulip):

(so you'd want to use that instead of naively relying on the emulated stack)

eddyb (May 08 2020 at 14:25, on Zulip):

Charles Lew said:

Thanks for the explanation! Do we have vision for codegen infrastructure of non-SSA?

very long-term, probably VSDG

eddyb (May 08 2020 at 14:26, on Zulip):

though some people would probably protest doing anything other than having a CFG+SSA intermediary IR

Charles Lew (May 08 2020 at 14:26, on Zulip):

Really never heard this abbr before, i'll google it and learn :)

eddyb (May 08 2020 at 14:26, on Zulip):

I wonder if I have the links handy

Jonas Schievink (May 08 2020 at 14:28, on Zulip):

(Look for "Value State Dependence Graph")

eddyb (May 08 2020 at 14:28, on Zulip):

idk why I can never find this w/o expanding the acronym http://sro.sussex.ac.uk/id/eprint/7576/

Charles Lew (May 08 2020 at 14:28, on Zulip):

https://www.researchgate.net/publication/340038531_RVSDG_An_Intermediate_Representation_for_Optimizing_Compilers
Searched and find one

eddyb (May 08 2020 at 14:28, on Zulip):

RVSDG is a variant of VSDG FWIW

eddyb (May 08 2020 at 14:28, on Zulip):

@Jonas Schievink I keep googling "stanier VSDG" and there are no good results but expanding it does give the correct (http://sro.sussex.ac.uk/id/eprint/7576/) one :/

eddyb (May 08 2020 at 14:28, on Zulip):

idk why that is

eddyb (May 08 2020 at 14:29, on Zulip):

@Charles Lew anyway this is one of the big papers on it http://sro.sussex.ac.uk/id/eprint/7576/1/Stanier%2C_James.pdf

eddyb (May 08 2020 at 14:30, on Zulip):

chapter 2 is a good overview

eddyb (May 08 2020 at 14:30, on Zulip):

it's also published independently as http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.885.5223&rep=rep1&type=pdf

Charles Lew (May 08 2020 at 14:31, on Zulip):

Thanks!

Last update: May 29 2020 at 17:00UTC