[llvm-commits] [llvm] r55904 - /llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp

Anton Korobeynikov asl at math.spbu.ru
Mon Sep 8 07:23:34 PDT 2008


Author: asl
Date: Mon Sep  8 09:23:34 2008
New Revision: 55904

URL: http://llvm.org/viewvc/llvm-project?rev=55904&view=rev
Log:
Unbreak and fix indentation

Modified:
    llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp

Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp?rev=55904&r1=55903&r2=55904&view=diff

==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp Mon Sep  8 09:23:34 2008
@@ -3115,7 +3115,7 @@
     MachineModuleInfo *MMI = DAG.getMachineModuleInfo();
     MVT VT = (Intrinsic == Intrinsic::eh_typeid_for_i32 ?
                          MVT::i32 : MVT::i64);
-    
+
     if (MMI) {
       // Find the type id for the given typeinfo.
       GlobalVariable *GV = ExtractTypeInfo(I.getOperand(1));
@@ -3130,10 +3130,9 @@
     return 0;
   }
 
-  case Intrinsic::eh_return: {
-    MachineModuleInfo *MMI = DAG.getMachineModuleInfo();
-
-    if (MMI) {
+  case Intrinsic::eh_return_i32:
+  case Intrinsic::eh_return_i64:
+    if (MachineModuleInfo *MMI = DAG.getMachineModuleInfo()) {
       MMI->setCallsEHReturn(true);
       DAG.setRoot(DAG.getNode(ISD::EH_RETURN,
                               MVT::Other,
@@ -3145,39 +3144,36 @@
     }
 
     return 0;
-  }
+  case Intrinsic::eh_unwind_init:
+    if (MachineModuleInfo *MMI = DAG.getMachineModuleInfo()) {
+      MMI->setCallsUnwindInit(true);
+    }
 
-   case Intrinsic::eh_unwind_init: {    
-     if (MachineModuleInfo *MMI = DAG.getMachineModuleInfo()) {
-       MMI->setCallsUnwindInit(true);
-     }
-
-     return 0;
-   }
-
-   case Intrinsic::eh_dwarf_cfa: {
-     MVT VT = getValue(I.getOperand(1)).getValueType();
-     SDValue CfaArg;
-     if (VT.bitsGT(TLI.getPointerTy()))
-       CfaArg = DAG.getNode(ISD::TRUNCATE,
-                            TLI.getPointerTy(), getValue(I.getOperand(1)));
-     else
-       CfaArg = DAG.getNode(ISD::SIGN_EXTEND,
-                            TLI.getPointerTy(), getValue(I.getOperand(1)));
-
-     SDValue Offset = DAG.getNode(ISD::ADD,
-                                    TLI.getPointerTy(),
-                                    DAG.getNode(ISD::FRAME_TO_ARGS_OFFSET,
-                                                TLI.getPointerTy()),
-                                    CfaArg);
-     setValue(&I, DAG.getNode(ISD::ADD,
-                              TLI.getPointerTy(),
-                              DAG.getNode(ISD::FRAMEADDR,
-                                          TLI.getPointerTy(),
-                                          DAG.getConstant(0,
-                                                          TLI.getPointerTy())),
-                              Offset));
-     return 0;
+    return 0;
+
+  case Intrinsic::eh_dwarf_cfa: {
+    MVT VT = getValue(I.getOperand(1)).getValueType();
+    SDValue CfaArg;
+    if (VT.bitsGT(TLI.getPointerTy()))
+      CfaArg = DAG.getNode(ISD::TRUNCATE,
+                           TLI.getPointerTy(), getValue(I.getOperand(1)));
+    else
+      CfaArg = DAG.getNode(ISD::SIGN_EXTEND,
+                           TLI.getPointerTy(), getValue(I.getOperand(1)));
+
+    SDValue Offset = DAG.getNode(ISD::ADD,
+                                 TLI.getPointerTy(),
+                                 DAG.getNode(ISD::FRAME_TO_ARGS_OFFSET,
+                                             TLI.getPointerTy()),
+                                 CfaArg);
+    setValue(&I, DAG.getNode(ISD::ADD,
+                             TLI.getPointerTy(),
+                             DAG.getNode(ISD::FRAMEADDR,
+                                         TLI.getPointerTy(),
+                                         DAG.getConstant(0,
+                                                         TLI.getPointerTy())),
+                             Offset));
+    return 0;
   }
 
   case Intrinsic::sqrt:





More information about the llvm-commits mailing list