iskyo0ps / compiler101_gpt_generated

Apache License 2.0
0 stars 0 forks source link

SWDEV-00005 - llvm demo add a new isa #14

Closed iskyo0ps closed 2 months ago

iskyo0ps commented 2 months ago

[AMDGPU] gfx11 new dot instruction codegen support

https://github.com/llvm/llvm-project/commit/2d43de13df03eab0fda1023b22b335b207afc507 https://reviews.llvm.org/D127904

iskyo0ps commented 2 months ago

reference

https://llvm.org/devmtg/2014-04/PDFs/Talks/Building%20an%20LLVM%20backend.pdf https://llvm.org/devmtg/2012-04-12/Slides/Workshops/Anton_Korobeynikov.pdf

big picture

IR → SelectionDAG → MachineDAG → MachineInstr → MCInst https://llvm.org/docs/TableGen/index.html

check the leg backend demo example

https://github.com/frasercrmck/llvm-leg

iskyo0ps commented 2 months ago

debug tips

Find which pass introduces the issue: – llc -print-after-all ● Find the LLVM source file and category for this pass: – #define DEBUG_TYPE "codegen-dce" ● Dump the log: – llc foo.ll -debug-only codegen-dce 2>&1 > foo.log ● Compare (diff) the '-print-after-all' or '-debug-only' good and bad outputs to see where it goes wrong

llc dump file example

llcdump.txt