Move MinAlign to MathExtras.h.
authorDuncan Sands <baldrick@free.fr>
Fri, 9 Nov 2007 13:41:39 +0000 (13:41 +0000)
committerDuncan Sands <baldrick@free.fr>
Fri, 9 Nov 2007 13:41:39 +0000 (13:41 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43944 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Support/Alignment.h [deleted file]
include/llvm/Support/MathExtras.h
lib/CodeGen/SelectionDAG/DAGCombiner.cpp
lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
lib/CodeGen/SelectionDAG/LegalizeDAGTypes.cpp

diff --git a/include/llvm/Support/Alignment.h b/include/llvm/Support/Alignment.h
deleted file mode 100644 (file)
index 41259b6..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-//===----------- Alignment.h - Alignment computation ------------*- C++ -*-===//
-//
-//                     The LLVM Compiler Infrastructure
-//
-// This file was developed by Duncan Sands and is distributed under
-// the University of Illinois Open Source License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-//
-// This file defines utilities for computing alignments.
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef LLVM_SUPPORT_ALIGNMENT_H
-#define LLVM_SUPPORT_ALIGNMENT_H
-
-namespace llvm {
-
-/// MinAlign - A and B are either alignments or offsets.  Return the minimum
-/// alignment that may be assumed after adding the two together.
-
-static inline unsigned MinAlign(unsigned A, unsigned B) {
-  // The largest power of 2 that divides both A and B.
-  return (A | B) & -(A | B);
-}
-
-} // end namespace llvm
-#endif
index 88a110395d64a698e2c2d227500780ea41f7d90f..3955735d0b027dcda13f09e313fe7a98fbb0852f 100644 (file)
@@ -358,6 +358,13 @@ int IsNAN(double d);
 int IsInf(float f);
 int IsInf(double d);
 
+/// MinAlign - A and B are either alignments or offsets.  Return the minimum
+/// alignment that may be assumed after adding the two together.
+static inline unsigned MinAlign(unsigned A, unsigned B) {
+  // The largest power of 2 that divides both A and B.
+  return (A | B) & -(A | B);
+}
+
 } // End llvm namespace
 
 #endif
index 7a6e55e984942958dbe654cce8d1e9112ad46bdf..8f6800a2c6b400b4c3279b87dabec55f4392348f 100644 (file)
@@ -37,7 +37,6 @@
 #include "llvm/Target/TargetOptions.h"
 #include "llvm/ADT/SmallPtrSet.h"
 #include "llvm/ADT/Statistic.h"
-#include "llvm/Support/Alignment.h"
 #include "llvm/Support/Compiler.h"
 #include "llvm/Support/CommandLine.h"
 #include "llvm/Support/Debug.h"
index 0731299f3595075564b6ced79bfbbcd31ee2ed85..4e096d8c163b34d904da49d30936e6c67ce5478b 100644 (file)
@@ -23,7 +23,6 @@
 #include "llvm/CallingConv.h"
 #include "llvm/Constants.h"
 #include "llvm/DerivedTypes.h"
-#include "llvm/Support/Alignment.h"
 #include "llvm/Support/CommandLine.h"
 #include "llvm/Support/Compiler.h"
 #include "llvm/Support/MathExtras.h"
index 825134130c360eb15d08745e650bc8a0c7dffd00..b63bd8f1debfbfd4585f6b2c76b364dbc9980b69 100644 (file)
@@ -18,9 +18,9 @@
 #include "llvm/DerivedTypes.h"
 #include "llvm/Target/TargetLowering.h"
 #include "llvm/ADT/DenseMap.h"
-#include "llvm/Support/Alignment.h"
 #include "llvm/Support/Compiler.h"
 #include "llvm/Support/Debug.h"
+#include "llvm/Support/MathExtras.h"
 using namespace llvm;
 
 //===----------------------------------------------------------------------===//