#include "llvm/ADT/SmallVector.h"
#include "llvm/Support/Allocator.h"
+#include "llvm/Support/AlignOf.h"
#include <iosfwd>
#include <cassert>
#include <climits>
/// register or value. This class also contains a bit of register allocator
/// state.
class LiveInterval {
- private:
-
- inline unsigned getVNInfoAlignment(void) {
-#ifdef __GNUC__
- return (unsigned)__alignof__(VNInfo);
-#else
- // FIXME: ugly.
- return 8u;
-#endif
- }
-
-
public:
typedef SmallVector<LiveRange,4> Ranges;
"PHI def / unused flags should now be passed explicitly.");
VNInfo *VNI =
static_cast<VNInfo*>(VNInfoAllocator.Allocate((unsigned)sizeof(VNInfo),
- getVNInfoAlignment()));
+ alignof<VNInfo>()));
new (VNI) VNInfo((unsigned)valnos.size(), MIIdx, CopyMI);
VNI->setIsDefAccurate(isDefAccurate);
valnos.push_back(VNI);
VNInfo *VNI =
static_cast<VNInfo*>(VNInfoAllocator.Allocate((unsigned)sizeof(VNInfo),
- getVNInfoAlignment()));
+ alignof<VNInfo>()));
new (VNI) VNInfo((unsigned)valnos.size(), *orig);
valnos.push_back(VNI);