[Scheduling] Logging via the containing op can be too verbose
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 2.2k
- Forks
- 524
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 46
Description
@7FM noted:
> I find the logging sometimes a bit too verbose, especially when the `containingOp` is very large. A hacky workaround that I sometimes use OoT is something like `mlir::emitError(OpBuilder{mlirContext}.getUnknownLoc()) << "Some context info:" << "your error message"`.
> Some examples that might benefit from this approach:
> - https://github.com/llvm/circt/blob/main/lib/Scheduling/Problems.cpp#L124C12-L127
> - https://github.com/llvm/circt/blob/main/lib/Scheduling/Problems.cpp#L183-L187
> - https://github.com/llvm/circt/blob/main/lib/Scheduling/Problems.cpp#L282-L285
>
> Most of the time, the error messages are not directly related to the containing operation itself but rather to the way the scheduling problem was constructed.
_Originally posted by @7FM in https://github.com/llvm/circt/pull/7320#pullrequestreview-2198730405_
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in lib/Scheduling/Problems.cpp at the diagnostic sites around lines 124-127, 183-187, and 282-285. Read how scheduling errors are currently emitted and check nearby tests or diagnostic conventions before changing them. Done means these errors retain useful context without printing an unnecessarily large containing operation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100