[llvm-commits] [llvm] r112350 - in /llvm/trunk/lib: MC/ELFObjectWriter.cpp Transforms/Scalar/ABCD.cpp

Chris Lattner sabre at nondot.org
Fri Aug 27 20:21:03 PDT 2010


Author: lattner
Date: Fri Aug 27 22:21:03 2010
New Revision: 112350

URL: http://llvm.org/viewvc/llvm-project?rev=112350&view=rev
Log:
squish dead code.

Modified:
    llvm/trunk/lib/MC/ELFObjectWriter.cpp
    llvm/trunk/lib/Transforms/Scalar/ABCD.cpp

Modified: llvm/trunk/lib/MC/ELFObjectWriter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/ELFObjectWriter.cpp?rev=112350&r1=112349&r2=112350&view=diff
==============================================================================
--- llvm/trunk/lib/MC/ELFObjectWriter.cpp (original)
+++ llvm/trunk/lib/MC/ELFObjectWriter.cpp Fri Aug 27 22:21:03 2010
@@ -49,10 +49,10 @@
       }
     }
 
-    static bool isFixupKindX86RIPRel(unsigned Kind) {
+    /*static bool isFixupKindX86RIPRel(unsigned Kind) {
       return Kind == X86::reloc_riprel_4byte ||
         Kind == X86::reloc_riprel_4byte_movq_load;
-    }
+    }*/
 
 
     /// ELFSymbolData - Helper struct for containing some precomputed information
@@ -127,18 +127,17 @@
     void Write8(uint8_t Value) { Writer->Write8(Value); }
     void Write16(uint16_t Value) { Writer->Write16(Value); }
     void Write32(uint32_t Value) { Writer->Write32(Value); }
-    void Write64(uint64_t Value) { Writer->Write64(Value); }
+    //void Write64(uint64_t Value) { Writer->Write64(Value); }
     void WriteZeros(unsigned N) { Writer->WriteZeros(N); }
-    void WriteBytes(StringRef Str, unsigned ZeroFillSize = 0) {
-      Writer->WriteBytes(Str, ZeroFillSize);
-    }
+    //void WriteBytes(StringRef Str, unsigned ZeroFillSize = 0) {
+    //  Writer->WriteBytes(Str, ZeroFillSize);
+    //}
 
     void WriteWord(uint64_t W) {
-      if (Is64Bit) {
+      if (Is64Bit)
         Writer->Write64(W);
-      } else {
+      else
         Writer->Write32(W);
-      }
     }
 
     void String8(char *buf, uint8_t Value) {

Modified: llvm/trunk/lib/Transforms/Scalar/ABCD.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/ABCD.cpp?rev=112350&r1=112349&r2=112350&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/ABCD.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/ABCD.cpp Fri Aug 27 22:21:03 2010
@@ -78,8 +78,6 @@
   class Bound {
    public:
     Bound(APInt v, bool upper) : value(v), upper_bound(upper) {}
-    Bound(const Bound &b, int cnst)
-      : value(b.value - cnst), upper_bound(b.upper_bound) {}
     Bound(const Bound &b, const APInt &cnst)
       : value(b.value - cnst), upper_bound(b.upper_bound) {}
 
@@ -129,15 +127,10 @@
     }
 
     /// Test if Bound b is greater then or equal val
-    static bool geq(const Bound &b, APInt val) {
+    static bool geq(const Bound &b, const APInt &val) {
       return leq(val, b);
     }
 
-    /// Test if Bound a is greater then or equal Bound b
-    static bool geq(const Bound &a, const Bound &b) {
-      return leq(b, a);
-    }
-
    private:
     APInt value;
     bool upper_bound;
@@ -270,9 +263,6 @@
     /// Adds an edge from V_from to V_to with weight value
     void addEdge(Value *V_from, Value *V_to, APInt value, bool upper);
 
-    /// Test if there is a node V
-    bool hasNode(Value *V) const { return graph.count(V); }
-
     /// Test if there is any edge from V in the upper direction
     bool hasEdge(Value *V, bool upper) const;
 





More information about the llvm-commits mailing list