[llvm] 1106bc2 - [CodeGen][NFC] Move some comments from the end of lines to above them

Fraser Cormack via llvm-commits llvm-commits at lists.llvm.org
Thu May 12 07:59:29 PDT 2022


Author: Fraser Cormack
Date: 2022-05-12T15:45:04+01:00
New Revision: 1106bc208c663fad5ded5592bb5fee84984bb35a

URL: https://github.com/llvm/llvm-project/commit/1106bc208c663fad5ded5592bb5fee84984bb35a
DIFF: https://github.com/llvm/llvm-project/commit/1106bc208c663fad5ded5592bb5fee84984bb35a.diff

LOG: [CodeGen][NFC] Move some comments from the end of lines to above them

This avoids wrapping the line itself awkwardly when it exceeds 80 chars.
It also better matches our style most other places.

Added: 
    

Modified: 
    llvm/lib/CodeGen/PrologEpilogInserter.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/CodeGen/PrologEpilogInserter.cpp b/llvm/lib/CodeGen/PrologEpilogInserter.cpp
index f222b4a11770..1a0f296d5fdc 100644
--- a/llvm/lib/CodeGen/PrologEpilogInserter.cpp
+++ b/llvm/lib/CodeGen/PrologEpilogInserter.cpp
@@ -839,8 +839,8 @@ void PEI::calculateFrameObjectOffsets(MachineFunction &MF) {
   // Adjust 'Offset' to point to the end of last fixed sized preallocated
   // object.
   for (int i = MFI.getObjectIndexBegin(); i != 0; ++i) {
-    if (MFI.getStackID(i) !=
-        TargetStackID::Default) // Only allocate objects on the default stack.
+    // Only allocate objects on the default stack.
+    if (MFI.getStackID(i) != TargetStackID::Default)
       continue;
 
     int64_t FixedOff;
@@ -971,8 +971,8 @@ void PEI::calculateFrameObjectOffsets(MachineFunction &MF) {
         continue;
       if (StackProtectorFI == (int)i || EHRegNodeFrameIndex == (int)i)
         continue;
-      if (MFI.getStackID(i) !=
-          TargetStackID::Default) // Only allocate objects on the default stack.
+      // Only allocate objects on the default stack.
+      if (MFI.getStackID(i) != TargetStackID::Default)
         continue;
 
       switch (MFI.getObjectSSPLayout(i)) {
@@ -1025,8 +1025,8 @@ void PEI::calculateFrameObjectOffsets(MachineFunction &MF) {
       continue;
     if (ProtectedObjs.count(i))
       continue;
-    if (MFI.getStackID(i) !=
-        TargetStackID::Default) // Only allocate objects on the default stack.
+    // Only allocate objects on the default stack.
+    if (MFI.getStackID(i) != TargetStackID::Default)
       continue;
 
     // Add the objects that we need to allocate to our working set.


        


More information about the llvm-commits mailing list