[llvm-commits] CVS: llvm/lib/Transforms/Utils/CloneFunction.cpp CodeExtractor.cpp LCSSA.cpp LowerSelect.cpp

Reid Spencer reid at x10sys.com
Mon Feb 5 15:32:29 PST 2007



Changes in directory llvm/lib/Transforms/Utils:

CloneFunction.cpp updated: 1.41 -> 1.42
CodeExtractor.cpp updated: 1.48 -> 1.49
LCSSA.cpp updated: 1.34 -> 1.35
LowerSelect.cpp updated: 1.9 -> 1.10
---
Log message:

Apply the VISIBILITY_HIDDEN field to the remaining anonymous classes in
the Transforms library. This reduces debug library size by 132 KB, debug
binary size by 376 KB, and reduces link time for llvm tools slightly.


---
Diffs of the changes:  (+8 -4)

 CloneFunction.cpp |    3 ++-
 CodeExtractor.cpp |    3 ++-
 LCSSA.cpp         |    3 ++-
 LowerSelect.cpp   |    3 ++-
 4 files changed, 8 insertions(+), 4 deletions(-)


Index: llvm/lib/Transforms/Utils/CloneFunction.cpp
diff -u llvm/lib/Transforms/Utils/CloneFunction.cpp:1.41 llvm/lib/Transforms/Utils/CloneFunction.cpp:1.42
--- llvm/lib/Transforms/Utils/CloneFunction.cpp:1.41	Fri Feb  2 18:08:31 2007
+++ llvm/lib/Transforms/Utils/CloneFunction.cpp	Mon Feb  5 17:32:05 2007
@@ -19,6 +19,7 @@
 #include "llvm/Instructions.h"
 #include "llvm/Function.h"
 #include "llvm/Support/CFG.h"
+#include "llvm/Support/Compiler.h"
 #include "ValueMapper.h"
 #include "llvm/Analysis/ConstantFolding.h"
 #include "llvm/ADT/SmallVector.h"
@@ -152,7 +153,7 @@
 namespace {
   /// PruningFunctionCloner - This class is a private class used to implement
   /// the CloneAndPruneFunctionInto method.
-  struct PruningFunctionCloner {
+  struct VISIBILITY_HIDDEN PruningFunctionCloner {
     Function *NewFunc;
     const Function *OldFunc;
     DenseMap<const Value*, Value*> &ValueMap;


Index: llvm/lib/Transforms/Utils/CodeExtractor.cpp
diff -u llvm/lib/Transforms/Utils/CodeExtractor.cpp:1.48 llvm/lib/Transforms/Utils/CodeExtractor.cpp:1.49
--- llvm/lib/Transforms/Utils/CodeExtractor.cpp:1.48	Wed Jan 31 14:07:32 2007
+++ llvm/lib/Transforms/Utils/CodeExtractor.cpp	Mon Feb  5 17:32:05 2007
@@ -25,6 +25,7 @@
 #include "llvm/Analysis/Verifier.h"
 #include "llvm/Transforms/Utils/BasicBlockUtils.h"
 #include "llvm/Support/CommandLine.h"
+#include "llvm/Support/Compiler.h"
 #include "llvm/Support/Debug.h"
 #include "llvm/ADT/StringExtras.h"
 #include <algorithm>
@@ -40,7 +41,7 @@
                  cl::desc("Aggregate arguments to code-extracted functions"));
 
 namespace {
-  class CodeExtractor {
+  class VISIBILITY_HIDDEN CodeExtractor {
     typedef std::vector<Value*> Values;
     std::set<BasicBlock*> BlocksToExtract;
     DominatorSet *DS;


Index: llvm/lib/Transforms/Utils/LCSSA.cpp
diff -u llvm/lib/Transforms/Utils/LCSSA.cpp:1.34 llvm/lib/Transforms/Utils/LCSSA.cpp:1.35
--- llvm/lib/Transforms/Utils/LCSSA.cpp:1.34	Sun Feb  4 23:23:32 2007
+++ llvm/lib/Transforms/Utils/LCSSA.cpp	Mon Feb  5 17:32:05 2007
@@ -38,6 +38,7 @@
 #include "llvm/Analysis/Dominators.h"
 #include "llvm/Analysis/LoopInfo.h"
 #include "llvm/Support/CFG.h"
+#include "llvm/Support/Compiler.h"
 #include <algorithm>
 #include <map>
 using namespace llvm;
@@ -45,7 +46,7 @@
 STATISTIC(NumLCSSA, "Number of live out of a loop variables");
 
 namespace {
-  struct LCSSA : public FunctionPass {
+  struct VISIBILITY_HIDDEN LCSSA : public FunctionPass {
     // Cached analysis information for the current function.
     LoopInfo *LI;
     DominatorTree *DT;


Index: llvm/lib/Transforms/Utils/LowerSelect.cpp
diff -u llvm/lib/Transforms/Utils/LowerSelect.cpp:1.9 llvm/lib/Transforms/Utils/LowerSelect.cpp:1.10
--- llvm/lib/Transforms/Utils/LowerSelect.cpp:1.9	Tue Dec 19 16:17:40 2006
+++ llvm/lib/Transforms/Utils/LowerSelect.cpp	Mon Feb  5 17:32:05 2007
@@ -24,12 +24,13 @@
 #include "llvm/Instructions.h"
 #include "llvm/Pass.h"
 #include "llvm/Type.h"
+#include "llvm/Support/Compiler.h"
 using namespace llvm;
 
 namespace {
   /// LowerSelect - Turn select instructions into conditional branches.
   ///
-  class LowerSelect : public FunctionPass {
+  class VISIBILITY_HIDDEN LowerSelect : public FunctionPass {
     bool OnlyFP;   // Only lower FP select instructions?
   public:
     LowerSelect(bool onlyfp = false) : OnlyFP(onlyfp) {}






More information about the llvm-commits mailing list