mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-16 12:24:03 +00:00
Use ValueMap instead of DenseMap.
The ValueMapper used by various cloning utility maps MDNodes also. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106706 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -169,7 +169,7 @@ static void HandleInlinedInvoke(InvokeInst *II, BasicBlock *FirstNewBlock,
|
||||
/// some edges of the callgraph may remain.
|
||||
static void UpdateCallGraphAfterInlining(CallSite CS,
|
||||
Function::iterator FirstNewBlock,
|
||||
DenseMap<const Value*, Value*> &VMap,
|
||||
ValueMap<const Value*, Value*> &VMap,
|
||||
InlineFunctionInfo &IFI) {
|
||||
CallGraph &CG = *IFI.CG;
|
||||
const Function *Caller = CS.getInstruction()->getParent()->getParent();
|
||||
@ -192,7 +192,7 @@ static void UpdateCallGraphAfterInlining(CallSite CS,
|
||||
for (; I != E; ++I) {
|
||||
const Value *OrigCall = I->first;
|
||||
|
||||
DenseMap<const Value*, Value*>::iterator VMI = VMap.find(OrigCall);
|
||||
ValueMap<const Value*, Value*>::iterator VMI = VMap.find(OrigCall);
|
||||
// Only copy the edge if the call was inlined!
|
||||
if (VMI == VMap.end() || VMI->second == 0)
|
||||
continue;
|
||||
@ -286,7 +286,7 @@ bool llvm::InlineFunction(CallSite CS, InlineFunctionInfo &IFI) {
|
||||
Function::iterator FirstNewBlock;
|
||||
|
||||
{ // Scope to destroy VMap after cloning.
|
||||
DenseMap<const Value*, Value*> VMap;
|
||||
ValueMap<const Value*, Value*> VMap;
|
||||
|
||||
assert(CalledFunc->arg_size() == CS.arg_size() &&
|
||||
"No varargs calls can be inlined!");
|
||||
|
Reference in New Issue
Block a user