mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-10-19 11:02:59 +02:00
changes because iMemory.h no longer #includes DerivedTypes.h
This only requires Type.h anyway llvm-svn: 2405
This commit is contained in:
parent
a2c59f1302
commit
f5d07697e6
@ -9,6 +9,7 @@
|
|||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
#include "llvm/Transforms/Scalar/DecomposeMultiDimRefs.h"
|
#include "llvm/Transforms/Scalar/DecomposeMultiDimRefs.h"
|
||||||
|
#include "llvm/DerivedTypes.h"
|
||||||
#include "llvm/Constant.h"
|
#include "llvm/Constant.h"
|
||||||
#include "llvm/iMemory.h"
|
#include "llvm/iMemory.h"
|
||||||
#include "llvm/iOther.h"
|
#include "llvm/iOther.h"
|
||||||
|
@ -25,6 +25,7 @@
|
|||||||
#include "llvm/Function.h"
|
#include "llvm/Function.h"
|
||||||
#include "llvm/BasicBlock.h"
|
#include "llvm/BasicBlock.h"
|
||||||
#include "llvm/Constant.h"
|
#include "llvm/Constant.h"
|
||||||
|
#include "llvm/Type.h"
|
||||||
|
|
||||||
using std::vector;
|
using std::vector;
|
||||||
using std::map;
|
using std::map;
|
||||||
@ -165,7 +166,7 @@ bool PromotePass::runOnFunction(Function *F) {
|
|||||||
//
|
//
|
||||||
vector<Value *> Values(Allocas.size());
|
vector<Value *> Values(Allocas.size());
|
||||||
for (unsigned i = 0, e = Allocas.size(); i != e; ++i)
|
for (unsigned i = 0, e = Allocas.size(); i != e; ++i)
|
||||||
Values[i] = Constant::getNullValue(Allocas[i]->getType()->getElementType());
|
Values[i] = Constant::getNullValue(Allocas[i]->getAllocatedType());
|
||||||
|
|
||||||
// Walks all basic blocks in the function performing the SSA rename algorithm
|
// Walks all basic blocks in the function performing the SSA rename algorithm
|
||||||
// and inserting the phi nodes we marked as necessary
|
// and inserting the phi nodes we marked as necessary
|
||||||
@ -204,7 +205,7 @@ bool PromotePass::QueuePhiNode(BasicBlock *BB, unsigned AllocaNo) {
|
|||||||
if (BBPNs[AllocaNo]) return false;
|
if (BBPNs[AllocaNo]) return false;
|
||||||
|
|
||||||
// Create a PhiNode using the dereferenced type...
|
// Create a PhiNode using the dereferenced type...
|
||||||
PHINode *PN = new PHINode(Allocas[AllocaNo]->getType()->getElementType(),
|
PHINode *PN = new PHINode(Allocas[AllocaNo]->getAllocatedType(),
|
||||||
Allocas[AllocaNo]->getName()+".mem2reg");
|
Allocas[AllocaNo]->getName()+".mem2reg");
|
||||||
BBPNs[AllocaNo] = PN;
|
BBPNs[AllocaNo] = PN;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user