I fixed the issue.
Details
Diff Detail
Event Timeline
| lib/CodeGen/AsmPrinter/AsmPrinter.cpp | ||
|---|---|---|
| 745–747 | update the comment to explain what the return value means | |
| 795 | just return true here? Then you can remove Result entirely and return false at the end of the function. | |
| 1044 | 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 | Add a comment describing the flag as its different from the other flags which are about prefixes. | |
| lib/Target/X86/X86MCInstLower.cpp | ||
| 107 | Again, get rid of this hard coded constant | |
| 2008 | Won't this copy other flags as well? Is that safe? | |
| lib/Target/X86/X86MCInstLower.cpp | ||
|---|---|---|
| 2008 | Yes, that's exactly what we need here. | |
| lib/Target/X86/X86MCInstLower.cpp | ||
|---|---|---|
| 2008 | 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 | ||
|---|---|---|
| 2008 | 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 | The TAsmComments/AC_EVEX_2_VEX hard-coded enum fix should be done as a separate pre-commit. | |
| lib/CodeGen/AsmPrinter/AsmPrinter.cpp | ||
| 796 | 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";
} | |
The TAsmComments/AC_EVEX_2_VEX hard-coded enum fix should be done as a separate pre-commit.