[llvm-commits] [llvm] r47370 - /llvm/trunk/lib/Target/Alpha/AlphaRegisterInfo.cpp

Anton Korobeynikov asl at math.spbu.ru
Wed Feb 20 03:24:05 PST 2008


Author: asl
Date: Wed Feb 20 05:24:05 2008
New Revision: 47370

URL: http://llvm.org/viewvc/llvm-project?rev=47370&view=rev
Log:
Fix code style

Modified:
    llvm/trunk/lib/Target/Alpha/AlphaRegisterInfo.cpp

Modified: llvm/trunk/lib/Target/Alpha/AlphaRegisterInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Alpha/AlphaRegisterInfo.cpp?rev=47370&r1=47369&r2=47370&view=diff

==============================================================================
--- llvm/trunk/lib/Target/Alpha/AlphaRegisterInfo.cpp (original)
+++ llvm/trunk/lib/Target/Alpha/AlphaRegisterInfo.cpp Wed Feb 20 05:24:05 2008
@@ -282,8 +282,7 @@
   long NumBytes = MFI->getStackSize();
 
   //now if we need to, restore the old FP
-  if (FP)
-  {
+  if (FP) {
     //copy the FP into the SP (discards allocas)
     BuildMI(MBB, MBBI, TII.get(Alpha::BISr), Alpha::R30).addReg(Alpha::R15)
       .addReg(Alpha::R15);
@@ -291,21 +290,20 @@
     BuildMI(MBB, MBBI, TII.get(Alpha::LDQ), Alpha::R15).addImm(0).addReg(Alpha::R15);
   }
 
-   if (NumBytes != 0)
-     {
-       if (NumBytes <= IMM_HIGH) {
-         BuildMI(MBB, MBBI, TII.get(Alpha::LDA), Alpha::R30).addImm(NumBytes)
-           .addReg(Alpha::R30);
-       } else if (getUpper16(NumBytes) <= IMM_HIGH) {
-         BuildMI(MBB, MBBI, TII.get(Alpha::LDAH), Alpha::R30)
-           .addImm(getUpper16(NumBytes)).addReg(Alpha::R30);
-         BuildMI(MBB, MBBI, TII.get(Alpha::LDA), Alpha::R30)
-           .addImm(getLower16(NumBytes)).addReg(Alpha::R30);
-       } else {
-         cerr << "Too big a stack frame at " << NumBytes << "\n";
-         abort();
-       }
-     }
+  if (NumBytes != 0) {
+    if (NumBytes <= IMM_HIGH) {
+      BuildMI(MBB, MBBI, TII.get(Alpha::LDA), Alpha::R30).addImm(NumBytes)
+        .addReg(Alpha::R30);
+    } else if (getUpper16(NumBytes) <= IMM_HIGH) {
+      BuildMI(MBB, MBBI, TII.get(Alpha::LDAH), Alpha::R30)
+        .addImm(getUpper16(NumBytes)).addReg(Alpha::R30);
+      BuildMI(MBB, MBBI, TII.get(Alpha::LDA), Alpha::R30)
+        .addImm(getLower16(NumBytes)).addReg(Alpha::R30);
+    } else {
+      cerr << "Too big a stack frame at " << NumBytes << "\n";
+      abort();
+    }
+  }
 }
 
 unsigned AlphaRegisterInfo::getRARegister() const {





More information about the llvm-commits mailing list