Emit a warning the destination of a v_cmpx instruction is not
EXEC, except when the source is an immediate zero operand.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
This is pretty much the same as D133334 right?
I'm still not too happy about emitting warnings without using proper diagnostics. The reason is that when the disassembler is being used as a library then it's probably not appropriate for it just to write warnings to stderr.
Since printing to errs() seems off the table, some other potential options:
- Add proper warning infrastructure to the disassembler
- Wrap the check in DEBUG and print to dbgs() ?
- Make it a disassembly failure, but only on a new architecture, so we don't break backwards compatibility
Yes, it's almost the same. I was facing some rebase difficulties so I created a new revision. I am in favor of having a diagnostics infrastructure in disassembler for emitting warnings/errors as well. I will work on it.
Done
- Wrap the check in DEBUG and print to dbgs() ?
I am not sure how that helps. I wrapped the warning-emission in LLVM_DEBUG and added -debug, the warning still does not sync with the instruction it corresponds to. Unless I did not understand this option correctly.
- Wrap the check in DEBUG and print to dbgs() ?
I am not sure how that helps. I wrapped the warning-emission in LLVM_DEBUG and added -debug, the warning still does not sync with the instruction it corresponds to. Unless I did not understand this option correctly.
This would help with the issue raised by Jay "when the disassembler is being used as a library then it's probably not appropriate for it just to write warnings to stderr." The warning being unsynced seems like a separate issue.