[llvm-commits] [llvm] r75609 - /llvm/trunk/include/llvm/CodeGen/LiveInterval.h
Lang Hames
lhames at gmail.com
Mon Jul 13 22:46:55 PDT 2009
Author: lhames
Date: Tue Jul 14 00:46:55 2009
New Revision: 75609
URL: http://llvm.org/viewvc/llvm-project?rev=75609&view=rev
Log:
New VNInfo alignment patch by Ryan Flynn.
Modified:
llvm/trunk/include/llvm/CodeGen/LiveInterval.h
Modified: llvm/trunk/include/llvm/CodeGen/LiveInterval.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/LiveInterval.h?rev=75609&r1=75608&r2=75609&view=diff
==============================================================================
--- llvm/trunk/include/llvm/CodeGen/LiveInterval.h (original)
+++ llvm/trunk/include/llvm/CodeGen/LiveInterval.h Tue Jul 14 00:46:55 2009
@@ -23,6 +23,7 @@
#include "llvm/ADT/SmallVector.h"
#include "llvm/Support/Allocator.h"
+#include "llvm/Support/AlignOf.h"
#include <iosfwd>
#include <cassert>
#include <climits>
@@ -212,18 +213,6 @@
/// 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;
@@ -344,7 +333,7 @@
"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);
@@ -357,7 +346,7 @@
VNInfo *VNI =
static_cast<VNInfo*>(VNInfoAllocator.Allocate((unsigned)sizeof(VNInfo),
- getVNInfoAlignment()));
+ alignof<VNInfo>()));
new (VNI) VNInfo((unsigned)valnos.size(), *orig);
valnos.push_back(VNI);
More information about the llvm-commits
mailing list