[PATCH] D23370: [CodeGen] Rename MachineInstr::isInvariantLoad to isDereferenceableInvariantLoad. NFC

Chandler Carruth via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 16 17:52:29 PDT 2016


chandlerc added inline comments.

================
Comment at: llvm/include/llvm/CodeGen/MachineInstr.h:1131-1132
@@ +1130,4 @@
+  /// For example, loading a value from the constant pool or from the argument
+  /// area of a function if it does not change.  This should only return true of
+  /// *all* loads the instruction does are invariant (if it does multiple
+  /// loads).
----------------
typo: "return true of" -> "return true if"

================
Comment at: llvm/lib/CodeGen/MachineInstr.cpp:1596
@@ -1595,7 +1595,3 @@
 
-/// isInvariantLoad - Return true if this instruction is loading from a
-/// location whose value is invariant across the function.  For example,
-/// loading a value from the constant pool or from the argument area
-/// of a function if it does not change.  This should only return true of
-/// *all* loads the instruction does are invariant (if it does multiple loads).
-bool MachineInstr::isInvariantLoad(AliasAnalysis *AA) const {
+/// isDereferenceableInvariantLoad - Return true if this instruction will never
+/// trap and is loading from a location whose value is invariant across the
----------------
No need to start with the function name.

Also, I'd format the comment to make it clear what the brief summary is while you're changing it.


https://reviews.llvm.org/D23370





More information about the llvm-commits mailing list