[PATCH] D40960: Fix for bug PR35549 - [X86] Repeated schedule comments
Simon Pilgrim via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Dec 13 06:38:16 PST 2017
RKSimon added inline comments.
================
Comment at: include/llvm/CodeGen/MachineInstr.h:73
+ NoSchedComment = 0x2,
+ TAsmComments = 0x4 // Target Asm comments should start from this value
};
----------------
The TAsmComments/AC_EVEX_2_VEX hard-coded enum fix should be done as a separate pre-commit.
================
Comment at: lib/CodeGen/AsmPrinter/AsmPrinter.cpp:796
+ return true;
+ } else if (Commented)
CommentOS << "\n";
----------------
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";
}
```
https://reviews.llvm.org/D40960
More information about the llvm-commits
mailing list