Shrink libllvmgcc.dylib by another 23K
authorChris Lattner <sabre@nondot.org>
Wed, 28 Jun 2006 22:08:15 +0000 (22:08 +0000)
committerChris Lattner <sabre@nondot.org>
Wed, 28 Jun 2006 22:08:15 +0000 (22:08 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28972 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Transforms/Scalar/InstructionCombining.cpp
lib/Transforms/Scalar/LowerGC.cpp
lib/Transforms/Utils/LowerInvoke.cpp
lib/Transforms/Utils/LowerSwitch.cpp
lib/Transforms/Utils/Mem2Reg.cpp

index 797b2b8db2e2b6e4622600a3f3734110da86cffc..e48953b7f29c41f08bf4c71dbaeef2447e020d9e 100644 (file)
@@ -48,6 +48,7 @@
 #include "llvm/Support/InstVisitor.h"
 #include "llvm/Support/MathExtras.h"
 #include "llvm/Support/PatternMatch.h"
 #include "llvm/Support/InstVisitor.h"
 #include "llvm/Support/MathExtras.h"
 #include "llvm/Support/PatternMatch.h"
+#include "llvm/Support/Visibility.h"
 #include "llvm/ADT/Statistic.h"
 #include "llvm/ADT/STLExtras.h"
 #include <algorithm>
 #include "llvm/ADT/Statistic.h"
 #include "llvm/ADT/STLExtras.h"
 #include <algorithm>
@@ -62,8 +63,9 @@ namespace {
   Statistic<> NumDeadStore("instcombine", "Number of dead stores eliminated");
   Statistic<> NumSunkInst ("instcombine", "Number of instructions sunk");
 
   Statistic<> NumDeadStore("instcombine", "Number of dead stores eliminated");
   Statistic<> NumSunkInst ("instcombine", "Number of instructions sunk");
 
-  class InstCombiner : public FunctionPass,
-                       public InstVisitor<InstCombiner, Instruction*> {
+  class VISIBILITY_HIDDEN InstCombiner
+    : public FunctionPass,
+      public InstVisitor<InstCombiner, Instruction*> {
     // Worklist of all of the instructions that need to be simplified.
     std::vector<Instruction*> WorkList;
     TargetData *TD;
     // Worklist of all of the instructions that need to be simplified.
     std::vector<Instruction*> WorkList;
     TargetData *TD;
index d51189cf497fec62e997238454457934b8f42295..40f6bc3c4aefe6943db9916b801f228e075fe336 100644 (file)
 #include "llvm/Instructions.h"
 #include "llvm/Module.h"
 #include "llvm/Pass.h"
 #include "llvm/Instructions.h"
 #include "llvm/Module.h"
 #include "llvm/Pass.h"
+#include "llvm/Support/Visibility.h"
 using namespace llvm;
 
 namespace {
 using namespace llvm;
 
 namespace {
-  class LowerGC : public FunctionPass {
+  class VISIBILITY_HIDDEN LowerGC : public FunctionPass {
     /// GCRootInt, GCReadInt, GCWriteInt - The function prototypes for the
     /// llvm.gcread/llvm.gcwrite/llvm.gcroot intrinsics.
     Function *GCRootInt, *GCReadInt, *GCWriteInt;
     /// GCRootInt, GCReadInt, GCWriteInt - The function prototypes for the
     /// llvm.gcread/llvm.gcwrite/llvm.gcroot intrinsics.
     Function *GCRootInt, *GCReadInt, *GCWriteInt;
index f7cb65c2622807527961bce6ab168896fca99e02..b5f652c154cb1a851f5c1ac73a79b4651702557d 100644 (file)
@@ -44,6 +44,7 @@
 #include "llvm/Transforms/Utils/Local.h"
 #include "llvm/ADT/Statistic.h"
 #include "llvm/Support/CommandLine.h"
 #include "llvm/Transforms/Utils/Local.h"
 #include "llvm/ADT/Statistic.h"
 #include "llvm/Support/CommandLine.h"
+#include "llvm/Support/Visibility.h"
 #include <csetjmp>
 using namespace llvm;
 
 #include <csetjmp>
 using namespace llvm;
 
@@ -55,7 +56,7 @@ namespace {
   cl::opt<bool> ExpensiveEHSupport("enable-correct-eh-support",
  cl::desc("Make the -lowerinvoke pass insert expensive, but correct, EH code"));
 
   cl::opt<bool> ExpensiveEHSupport("enable-correct-eh-support",
  cl::desc("Make the -lowerinvoke pass insert expensive, but correct, EH code"));
 
-  class LowerInvoke : public FunctionPass {
+  class VISIBILITY_HIDDEN LowerInvoke : public FunctionPass {
     // Used for both models.
     Function *WriteFn;
     Function *AbortFn;
     // Used for both models.
     Function *WriteFn;
     Function *AbortFn;
index 379a2e45703e591a0890495cfcf26346486f78ca..396b507bbd1e17a92017bb7d003e9ccaea245e08 100644 (file)
@@ -20,6 +20,7 @@
 #include "llvm/Instructions.h"
 #include "llvm/Pass.h"
 #include "llvm/Support/Debug.h"
 #include "llvm/Instructions.h"
 #include "llvm/Pass.h"
 #include "llvm/Support/Debug.h"
+#include "llvm/Support/Visibility.h"
 #include "llvm/ADT/Statistic.h"
 #include <algorithm>
 #include <iostream>
 #include "llvm/ADT/Statistic.h"
 #include <algorithm>
 #include <iostream>
@@ -31,7 +32,7 @@ namespace {
   /// LowerSwitch Pass - Replace all SwitchInst instructions with chained branch
   /// instructions.  Note that this cannot be a BasicBlock pass because it
   /// modifies the CFG!
   /// LowerSwitch Pass - Replace all SwitchInst instructions with chained branch
   /// instructions.  Note that this cannot be a BasicBlock pass because it
   /// modifies the CFG!
-  class LowerSwitch : public FunctionPass {
+  class VISIBILITY_HIDDEN LowerSwitch : public FunctionPass {
   public:
     virtual bool runOnFunction(Function &F);
     
   public:
     virtual bool runOnFunction(Function &F);
     
index 5e5d67b305fb3b157287b5d8e7068d16ab12f58c..d1b2c50796eec0cebfd2a19fbbf4f2ef44a202c2 100644 (file)
 #include "llvm/Function.h"
 #include "llvm/Target/TargetData.h"
 #include "llvm/ADT/Statistic.h"
 #include "llvm/Function.h"
 #include "llvm/Target/TargetData.h"
 #include "llvm/ADT/Statistic.h"
+#include "llvm/Support/Visibility.h"
 using namespace llvm;
 
 namespace {
   Statistic<> NumPromoted("mem2reg", "Number of alloca's promoted");
 
 using namespace llvm;
 
 namespace {
   Statistic<> NumPromoted("mem2reg", "Number of alloca's promoted");
 
-  struct PromotePass : public FunctionPass {
+  struct VISIBILITY_HIDDEN PromotePass : public FunctionPass {
     // runOnFunction - To run this pass, first we calculate the alloca
     // instructions that are safe for promotion, then we promote each one.
     //
     // runOnFunction - To run this pass, first we calculate the alloca
     // instructions that are safe for promotion, then we promote each one.
     //