mirror of
https://github.com/RPCSX/llvm.git
synced 2024-11-25 20:59:51 +00:00
New VNInfo alignment patch by Ryan Flynn.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75609 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
1cda87c3a0
commit
d23f0d0451
@ -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 @@ namespace llvm {
|
||||
/// 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 @@ namespace llvm {
|
||||
"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 @@ namespace llvm {
|
||||
|
||||
VNInfo *VNI =
|
||||
static_cast<VNInfo*>(VNInfoAllocator.Allocate((unsigned)sizeof(VNInfo),
|
||||
getVNInfoAlignment()));
|
||||
alignof<VNInfo>()));
|
||||
|
||||
new (VNI) VNInfo((unsigned)valnos.size(), *orig);
|
||||
valnos.push_back(VNI);
|
||||
|
Loading…
Reference in New Issue
Block a user