mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-12 17:32:19 +00:00
Rename ValueMapTy as ValueToValueMapTy to clearly indicate that this has no replationship with ADT/ValueMap.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101950 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
cd9b492451
commit
3943084136
@ -183,8 +183,8 @@ bool llvm::UnrollLoop(Loop *L, unsigned Count, LoopInfo* LI, LPPassManager* LPM)
|
||||
|
||||
// For the first iteration of the loop, we should use the precloned values for
|
||||
// PHI nodes. Insert associations now.
|
||||
typedef DenseMap<const Value*, Value*> ValueMapTy;
|
||||
ValueMapTy LastValueMap;
|
||||
typedef DenseMap<const Value*, Value*> ValueToValueMapTy;
|
||||
ValueToValueMapTy LastValueMap;
|
||||
std::vector<PHINode*> OrigPHINode;
|
||||
for (BasicBlock::iterator I = Header->begin(); isa<PHINode>(I); ++I) {
|
||||
PHINode *PN = cast<PHINode>(I);
|
||||
@ -205,7 +205,7 @@ bool llvm::UnrollLoop(Loop *L, unsigned Count, LoopInfo* LI, LPPassManager* LPM)
|
||||
|
||||
for (std::vector<BasicBlock*>::iterator BB = LoopBlocks.begin(),
|
||||
E = LoopBlocks.end(); BB != E; ++BB) {
|
||||
ValueMapTy ValueMap;
|
||||
ValueToValueMapTy ValueMap;
|
||||
BasicBlock *New = CloneBasicBlock(*BB, ValueMap, "." + Twine(It));
|
||||
Header->getParent()->getBasicBlockList().push_back(New);
|
||||
|
||||
@ -224,7 +224,7 @@ bool llvm::UnrollLoop(Loop *L, unsigned Count, LoopInfo* LI, LPPassManager* LPM)
|
||||
|
||||
// Update our running map of newest clones
|
||||
LastValueMap[*BB] = New;
|
||||
for (ValueMapTy::iterator VI = ValueMap.begin(), VE = ValueMap.end();
|
||||
for (ValueToValueMapTy::iterator VI = ValueMap.begin(), VE = ValueMap.end();
|
||||
VI != VE; ++VI)
|
||||
LastValueMap[VI->first] = VI->second;
|
||||
|
||||
|
@ -20,7 +20,7 @@
|
||||
#include "llvm/ADT/SmallVector.h"
|
||||
using namespace llvm;
|
||||
|
||||
Value *llvm::MapValue(const Value *V, ValueMapTy &VM) {
|
||||
Value *llvm::MapValue(const Value *V, ValueToValueMapTy &VM) {
|
||||
Value *&VMSlot = VM[V];
|
||||
if (VMSlot) return VMSlot; // Does it exist in the map yet?
|
||||
|
||||
@ -127,7 +127,7 @@ Value *llvm::MapValue(const Value *V, ValueMapTy &VM) {
|
||||
/// RemapInstruction - Convert the instruction operands from referencing the
|
||||
/// current values into those specified by ValueMap.
|
||||
///
|
||||
void llvm::RemapInstruction(Instruction *I, ValueMapTy &ValueMap) {
|
||||
void llvm::RemapInstruction(Instruction *I, ValueToValueMapTy &ValueMap) {
|
||||
for (User::op_iterator op = I->op_begin(), E = I->op_end(); op != E; ++op) {
|
||||
Value *V = MapValue(*op, ValueMap);
|
||||
assert(V && "Referenced value not in value map!");
|
||||
|
@ -20,10 +20,10 @@
|
||||
namespace llvm {
|
||||
class Value;
|
||||
class Instruction;
|
||||
typedef DenseMap<const Value *, Value *> ValueMapTy;
|
||||
typedef DenseMap<const Value *, Value *> ValueToValueMapTy;
|
||||
|
||||
Value *MapValue(const Value *V, ValueMapTy &VM);
|
||||
void RemapInstruction(Instruction *I, ValueMapTy &VM);
|
||||
Value *MapValue(const Value *V, ValueToValueMapTy &VM);
|
||||
void RemapInstruction(Instruction *I, ValueToValueMapTy &VM);
|
||||
} // End llvm namespace
|
||||
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user