[llvm-commits] [llvm] r166936 - in /llvm/trunk: include/llvm/TargetTransformInfo.h lib/Target/TargetTransformImpl.cpp

Hans Wennborg hans at hanshq.net
Mon Oct 29 09:26:52 PDT 2012


Author: hans
Date: Mon Oct 29 11:26:52 2012
New Revision: 166936

URL: http://llvm.org/viewvc/llvm-project?rev=166936&view=rev
Log:
Minor style fixes for TargetTransformationInfo and TargetTransformImpl

Modified:
    llvm/trunk/include/llvm/TargetTransformInfo.h
    llvm/trunk/lib/Target/TargetTransformImpl.cpp

Modified: llvm/trunk/include/llvm/TargetTransformInfo.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/TargetTransformInfo.h?rev=166936&r1=166935&r2=166936&view=diff
==============================================================================
--- llvm/trunk/include/llvm/TargetTransformInfo.h (original)
+++ llvm/trunk/include/llvm/TargetTransformInfo.h Mon Oct 29 11:26:52 2012
@@ -45,11 +45,11 @@
   /// used.
   TargetTransformInfo();
 
-  explicit TargetTransformInfo(const ScalarTargetTransformInfo* S,
-                               const VectorTargetTransformInfo *V)
-    : ImmutablePass(ID), STTI(S), VTTI(V) {
-      initializeTargetTransformInfoPass(*PassRegistry::getPassRegistry());
-    }
+  TargetTransformInfo(const ScalarTargetTransformInfo* S,
+                      const VectorTargetTransformInfo *V)
+      : ImmutablePass(ID), STTI(S), VTTI(V) {
+    initializeTargetTransformInfoPass(*PassRegistry::getPassRegistry());
+  }
 
   TargetTransformInfo(const TargetTransformInfo &T) :
     ImmutablePass(ID), STTI(T.STTI), VTTI(T.VTTI) { }
@@ -102,7 +102,7 @@
   /// isTruncateFree - Return true if it's free to truncate a value of
   /// type Ty1 to type Ty2. e.g. On x86 it's free to truncate a i32 value in
   /// register EAX to i16 by referencing its sub-register AX.
-  virtual bool isTruncateFree(Type * /*Ty1*/, Type * /*Ty2*/) const {
+  virtual bool isTruncateFree(Type *Ty1, Type *Ty2) const {
     return false;
   }
   /// Is this type legal.

Modified: llvm/trunk/lib/Target/TargetTransformImpl.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/TargetTransformImpl.cpp?rev=166936&r1=166935&r2=166936&view=diff
==============================================================================
--- llvm/trunk/lib/Target/TargetTransformImpl.cpp (original)
+++ llvm/trunk/lib/Target/TargetTransformImpl.cpp Mon Oct 29 11:26:52 2012
@@ -28,7 +28,7 @@
 }
 
 bool ScalarTargetTransformImpl::isLegalAddressingMode(const AddrMode &AM,
-                                                    Type *Ty) const {
+                                                      Type *Ty) const {
   return TLI->isLegalAddressingMode(AM, Ty);
 }
 
@@ -150,7 +150,7 @@
                                                     bool Insert,
                                                     bool Extract) const {
   assert (Ty->isVectorTy() && "Can only scalarize vectors");
-   unsigned Cost = 0;
+  unsigned Cost = 0;
 
   for (int i = 0, e = Ty->getVectorNumElements(); i < e; ++i) {
     if (Insert)
@@ -240,7 +240,7 @@
                                                        Type *CondTy) const {
   int ISD = InstructionOpcodeToISD(Opcode);
   assert(ISD && "Invalid opcode");
-  
+
   // Selects on vectors are actually vector selects.
   if (ISD == ISD::SELECT) {
     assert(CondTy && "CondTy must exist");





More information about the llvm-commits mailing list