llvm / llvm/Polygeist

Debug information in MLIR output from cgeist

Open
#425 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
624
Forks
170
PR merge metrics
No merged PRs in 30d

Description

We are trying to use `cgeist -S` to convert C/C++ source code to MLIR for further processing. However the generated MLIR output does not have any source line information. We tried `-g`, `--debugify-level=locations` and `--debugify-level=location+variables` but that does not seem to add anything. Generated binaries with cgeist also does not seem to include any debug information.

Is it possible to get file and/or line number information of the C/C++ source to aid in debugging?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the issue with cgeist -S on C/C++ source and compare the output with and without -g, --debugify-level=locations, and --debugify-level=location+variables. Trace how cgeist produces MLIR and generated binaries, then determine whether file and line information can be preserved. Done means generated MLIR or binaries contain usable source locations for debugging.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
compilers
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.