valida-xyz / valida-compiler

Old, obsolete version of the Valida compiler; its replacement will become public later
Other
50 stars 12 forks source link

Cannot legalize G_STORE #3

Closed maxgillett closed 1 year ago

maxgillett commented 1 year ago

Compiling the following program using the command llc func.ll --global-isel --march=delendum --stop-after=legalizer:

; func.ll
define void @f(i32 %a, i32 %b) {
  ret void
}

results in a memory exception when LegalizeRuleSet::getAlias is called.

0x59616e commented 1 year ago

May I kindly ask your preference over GlobalISel and SelectionDAG as the driver of the code generator ?

maxgillett commented 1 year ago

May I kindly ask your preference over GlobalISel and SelectionDAG as the driver of the code generator ?

My understanding is that GlobalISel is expected to eventually replace SelectionDAG, and is easier to work with (both in LOC required to implement code generation, and in testing). What is your opinion, and are there pitfalls that I'm overlooking?

0x59616e commented 1 year ago

I'm 100% go into GlobalISel since it is more easier to debug and test with.

and are there pitfalls that I'm overlooking?

One of the minor drawbacks when I was working on it in 2021 was the lack of certain pattern matching support from TableGen, which didn't bother since you can write with C++.

maxgillett commented 1 year ago

Fixed in 4e20325