[llvm-commits] [dragonegg] r150469 - in /dragonegg/trunk: include/dragonegg/Debug.h src/Constants.cpp src/Convert.cpp src/Debug.cpp src/Types.cpp

Duncan Sands baldrick at free.fr
Tue Feb 14 01:50:17 PST 2012


Author: baldrick
Date: Tue Feb 14 03:50:17 2012
New Revision: 150469

URL: http://llvm.org/viewvc/llvm-project?rev=150469&view=rev
Log:
Get rid of some alignment holes between fields.  Completely pointless since
there is only ever one instance of each of these classes...

Modified:
    dragonegg/trunk/include/dragonegg/Debug.h
    dragonegg/trunk/src/Constants.cpp
    dragonegg/trunk/src/Convert.cpp
    dragonegg/trunk/src/Debug.cpp
    dragonegg/trunk/src/Types.cpp

Modified: dragonegg/trunk/include/dragonegg/Debug.h
URL: http://llvm.org/viewvc/llvm-project/dragonegg/trunk/include/dragonegg/Debug.h?rev=150469&r1=150468&r2=150469&view=diff
==============================================================================
--- dragonegg/trunk/include/dragonegg/Debug.h (original)
+++ dragonegg/trunk/include/dragonegg/Debug.h Tue Feb 14 03:50:17 2012
@@ -256,11 +256,16 @@
 /// is responsible for emitting to llvm globals or pass directly to the backend.
 class DebugInfo {
 private:
+  SmallVector<WeakVH, 4> RegionStack;
+                                        // Stack to track declarative scopes.
+
+  std::map<tree_node *, WeakVH> RegionMap;
+
   Module *M;                            // The current module.
   DIFactory DebugFactory;
   const char *CurFullPath;              // Previous location file encountered.
-  int CurLineNo;                        // Previous location line# encountered.
   const char *PrevFullPath;             // Previous location file encountered.
+  int CurLineNo;                        // Previous location line# encountered.
   int PrevLineNo;                       // Previous location line# encountered.
   BasicBlock *PrevBB;                   // Last basic block encountered.
 
@@ -276,11 +281,6 @@
                                         // Cache of previously constructed name
                                         // spaces.
 
-  SmallVector<WeakVH, 4> RegionStack;
-                                        // Stack to track declarative scopes.
-
-  std::map<tree_node *, WeakVH> RegionMap;
-
   /// FunctionNames - This is a storage for function names that are
   /// constructed on demand. For example, C++ destructors, C++ operators etc..
   llvm::BumpPtrAllocator FunctionNames;

Modified: dragonegg/trunk/src/Constants.cpp
URL: http://llvm.org/viewvc/llvm-project/dragonegg/trunk/src/Constants.cpp?rev=150469&r1=150468&r2=150469&view=diff
==============================================================================
--- dragonegg/trunk/src/Constants.cpp (original)
+++ dragonegg/trunk/src/Constants.cpp Tue Feb 14 03:50:17 2012
@@ -1000,13 +1000,13 @@
 namespace {
 
 class FieldContents {
+  TargetFolder &Folder;
   SignedRange R; // The range of bits occupied by the constant.
   Constant *C;   // The constant.  May be null if the range is empty.
   int Starts;    // The first bit of the constant is positioned at this offset.
-  TargetFolder &Folder;
 
   FieldContents(SignedRange r, Constant *c, int starts, TargetFolder &folder)
-    : R(r), C(c), Starts(starts), Folder(folder) {
+    : Folder(folder), R(r), C(c), Starts(starts) {
     assert((R.empty() || C) && "Need constant when range not empty!");
   }
 

Modified: dragonegg/trunk/src/Convert.cpp
URL: http://llvm.org/viewvc/llvm-project/dragonegg/trunk/src/Convert.cpp?rev=150469&r1=150468&r2=150469&view=diff
==============================================================================
--- dragonegg/trunk/src/Convert.cpp (original)
+++ dragonegg/trunk/src/Convert.cpp Tue Feb 14 03:50:17 2012
@@ -432,13 +432,13 @@
     LLVMBuilder Builder;
     std::vector<Value*> LocStack;
     std::vector<std::string> NameStack;
-    unsigned Offset;
     CallingConv::ID &CallingConv;
+    unsigned Offset;
     bool isShadowRet;
     FunctionPrologArgumentConversion(tree FnDecl,
                                      Function::arg_iterator &ai,
                                      const LLVMBuilder &B, CallingConv::ID &CC)
-      : FunctionDecl(FnDecl), AI(ai), Builder(B), Offset(0), CallingConv(CC),
+      : FunctionDecl(FnDecl), AI(ai), Builder(B), CallingConv(CC), Offset(0),
         isShadowRet(false) {}
 
     /// getCallingConv - This provides the desired CallingConv for the function.
@@ -2581,14 +2581,14 @@
     SmallVector<Value*, 2> LocStack;
     FunctionType *FTy;
     const MemRef *DestLoc;
-    bool useReturnSlot;
     LLVMBuilder &Builder;
     Value *TheValue;
     MemRef RetBuf;
     CallingConv::ID &CallingConv;
+    unsigned Offset;
     bool isShadowRet;
     bool isAggrRet;
-    unsigned Offset;
+    bool useReturnSlot;
 
     FunctionCallArgumentConversion(SmallVector<Value*, 16> &ops,
                                    FunctionType *FnTy,
@@ -2596,9 +2596,9 @@
                                    bool ReturnSlotOpt,
                                    LLVMBuilder &b,
                                    CallingConv::ID &CC)
-      : CallOperands(ops), FTy(FnTy), DestLoc(destloc),
-        useReturnSlot(ReturnSlotOpt), Builder(b), CallingConv(CC),
-        isShadowRet(false), isAggrRet(false), Offset(0) { }
+      : CallOperands(ops), FTy(FnTy), DestLoc(destloc), Builder(b),
+        CallingConv(CC), Offset(0), isShadowRet(false), isAggrRet(false),
+        useReturnSlot(ReturnSlotOpt) { }
 
     /// getCallingConv - This provides the desired CallingConv for the function.
     CallingConv::ID getCallingConv(void) { return CallingConv; }

Modified: dragonegg/trunk/src/Debug.cpp
URL: http://llvm.org/viewvc/llvm-project/dragonegg/trunk/src/Debug.cpp?rev=150469&r1=150468&r2=150469&view=diff
==============================================================================
--- dragonegg/trunk/src/Debug.cpp (original)
+++ dragonegg/trunk/src/Debug.cpp Tue Feb 14 03:50:17 2012
@@ -208,11 +208,10 @@
 : M(m)
 , DebugFactory(*m)
 , CurFullPath("")
-, CurLineNo(0)
 , PrevFullPath("")
+, CurLineNo(0)
 , PrevLineNo(0)
 , PrevBB(NULL)
-, RegionStack()
 {}
 
 /// getFunctionName - Get function name for the given FnDecl. If the

Modified: dragonegg/trunk/src/Types.cpp
URL: http://llvm.org/viewvc/llvm-project/dragonegg/trunk/src/Types.cpp?rev=150469&r1=150468&r2=150469&view=diff
==============================================================================
--- dragonegg/trunk/src/Types.cpp (original)
+++ dragonegg/trunk/src/Types.cpp Tue Feb 14 03:50:17 2012
@@ -523,14 +523,14 @@
     Type *&RetTy;
     SmallVectorImpl<Type*> &ArgTypes;
     CallingConv::ID &CallingConv;
+    unsigned Offset;
     bool isShadowRet;
     bool KNRPromotion;
-    unsigned Offset;
   public:
     FunctionTypeConversion(Type *&retty, SmallVectorImpl<Type*> &AT,
                            CallingConv::ID &CC, bool KNR)
-      : RetTy(retty), ArgTypes(AT), CallingConv(CC), KNRPromotion(KNR),
-        Offset(0) {
+      : RetTy(retty), ArgTypes(AT), CallingConv(CC), Offset(0),
+        KNRPromotion(KNR) {
       CallingConv = CallingConv::C;
       isShadowRet = false;
     }





More information about the llvm-commits mailing list