[PATCH] D40419: [CodeGen] Separate MachineOperand implementation from MachineInstr

Matthias Braun via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 27 11:31:54 PST 2017


MatzeB accepted this revision.
MatzeB added a comment.
This revision is now accepted and ready to land.

LGTM, thanks. I'd commit the MachineOperand.h changes in a separate commit.

Feel free to do the doxygen comment cleanups in a separate future commit if you like.



================
Comment at: lib/CodeGen/MachineOperand.cpp:10
+//
+// Methods common to all machine operands.
+//
----------------
Use `/// \file ...` so doxygen can pick it up.


================
Comment at: lib/CodeGen/MachineOperand.cpp:32-34
+//===----------------------------------------------------------------------===//
+// MachineOperand Implementation
+//===----------------------------------------------------------------------===//
----------------
This is unnecessary now as the whole file is about MachineOperand.


================
Comment at: lib/CodeGen/MachineOperand.cpp:80
+
+/// Change a def to a use, or a use to a def.
+void MachineOperand::setIsDef(bool Val) {
----------------
As we are on it: Would be good to move the doxygen comments from the implementation to the header where possible.


================
Comment at: lib/CodeGen/MachineOperand.cpp:113-115
+/// ChangeToImmediate - Replace this operand with a new immediate operand of
+/// the specified value.  If an operand is known to be an immediate already,
+/// the setImm method should be used.
----------------
In cases where we have a doxygen comment in the implementation and the declaration we should just remove it from the implementation.


https://reviews.llvm.org/D40419





More information about the llvm-commits mailing list