I fixed the issue.
Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
lib/CodeGen/AsmPrinter/AsmPrinter.cpp | ||
---|---|---|
745 ↗ | (On Diff #125970) | update the comment to explain what the return value means |
794 ↗ | (On Diff #125970) | just return true here? Then you can remove Result entirely and return false at the end of the function. |
1045 ↗ | (On Diff #125970) | if (isVerbose() && emitComments(MI, OutStreamer->GetCommentOS(), this)) { It'd be much safer to add a MachineInstr::setSchedInfoFlags(bool) style helper and avoid the hard coded constant here. The whole block needs to be passed through clang-format as well. |
lib/Target/X86/MCTargetDesc/X86BaseInfo.h | ||
63 ↗ | (On Diff #125970) | Add a comment describing the flag as its different from the other flags which are about prefixes. |
lib/Target/X86/X86MCInstLower.cpp | ||
107 ↗ | (On Diff #125970) | Again, get rid of this hard coded constant |
2007 ↗ | (On Diff #125970) | Won't this copy other flags as well? Is that safe? |
lib/Target/X86/X86MCInstLower.cpp | ||
---|---|---|
2007 ↗ | (On Diff #125970) | Yes, that's exactly what we need here. |
lib/Target/X86/X86MCInstLower.cpp | ||
---|---|---|
2007 ↗ | (On Diff #125970) | So is this a separate issue that needs tests and possibly a separate preliminary patch? Are you missing prefix flags data because of this? |
lib/Target/X86/X86MCInstLower.cpp | ||
---|---|---|
2007 ↗ | (On Diff #125970) | I was completely wrong here: I mixed Flags from MCInst and MachineInstr. It's redone now. |
All comments from Simon were resolved. There was a real bug and it's fixed in this new patch - tnx, Simon.
include/llvm/CodeGen/MachineInstr.h | ||
---|---|---|
73 ↗ | (On Diff #126532) | The TAsmComments/AC_EVEX_2_VEX hard-coded enum fix should be done as a separate pre-commit. |
lib/CodeGen/AsmPrinter/AsmPrinter.cpp | ||
796 ↗ | (On Diff #126532) | You can probably either replace this with: if (Commented) CommentOS << "\n"; or pull it into the previous if: if (Commented) { if (AP->EnablePrintSchedInfo) { // If any comment was added above and we need sched info comment then // add this new comment just after the above comment w/o "\n" between them. CommentOS << " " << MF->getSubtarget().getSchedInfoStr(MI) << "\n"; return true; } CommentOS << "\n"; } |
LGTM with one minor
lib/Target/X86/X86MCInstLower.cpp | ||
---|---|---|
104 ↗ | (On Diff #126981) | EnablePrintSchedInfo && |