forked from OSchip/llvm-project
parent
1b232132ad
commit
e795efea5b
|
@ -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
|
|
|
@ -358,6 +358,13 @@ int IsNAN(double d);
|
||||||
int IsInf(float f);
|
int IsInf(float f);
|
||||||
int IsInf(double d);
|
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
|
} // End llvm namespace
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -37,7 +37,6 @@
|
||||||
#include "llvm/Target/TargetOptions.h"
|
#include "llvm/Target/TargetOptions.h"
|
||||||
#include "llvm/ADT/SmallPtrSet.h"
|
#include "llvm/ADT/SmallPtrSet.h"
|
||||||
#include "llvm/ADT/Statistic.h"
|
#include "llvm/ADT/Statistic.h"
|
||||||
#include "llvm/Support/Alignment.h"
|
|
||||||
#include "llvm/Support/Compiler.h"
|
#include "llvm/Support/Compiler.h"
|
||||||
#include "llvm/Support/CommandLine.h"
|
#include "llvm/Support/CommandLine.h"
|
||||||
#include "llvm/Support/Debug.h"
|
#include "llvm/Support/Debug.h"
|
||||||
|
|
|
@ -23,7 +23,6 @@
|
||||||
#include "llvm/CallingConv.h"
|
#include "llvm/CallingConv.h"
|
||||||
#include "llvm/Constants.h"
|
#include "llvm/Constants.h"
|
||||||
#include "llvm/DerivedTypes.h"
|
#include "llvm/DerivedTypes.h"
|
||||||
#include "llvm/Support/Alignment.h"
|
|
||||||
#include "llvm/Support/CommandLine.h"
|
#include "llvm/Support/CommandLine.h"
|
||||||
#include "llvm/Support/Compiler.h"
|
#include "llvm/Support/Compiler.h"
|
||||||
#include "llvm/Support/MathExtras.h"
|
#include "llvm/Support/MathExtras.h"
|
||||||
|
|
|
@ -18,9 +18,9 @@
|
||||||
#include "llvm/DerivedTypes.h"
|
#include "llvm/DerivedTypes.h"
|
||||||
#include "llvm/Target/TargetLowering.h"
|
#include "llvm/Target/TargetLowering.h"
|
||||||
#include "llvm/ADT/DenseMap.h"
|
#include "llvm/ADT/DenseMap.h"
|
||||||
#include "llvm/Support/Alignment.h"
|
|
||||||
#include "llvm/Support/Compiler.h"
|
#include "llvm/Support/Compiler.h"
|
||||||
#include "llvm/Support/Debug.h"
|
#include "llvm/Support/Debug.h"
|
||||||
|
#include "llvm/Support/MathExtras.h"
|
||||||
using namespace llvm;
|
using namespace llvm;
|
||||||
|
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
Loading…
Reference in New Issue