From: Matt Arsenault Date: Mon, 18 Apr 2022 16:00:04 +0000 (-0400) Subject: X86: Do not use ValueMap for PreallocatedIds X-Git-Tag: upstream/15.0.7~10013 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=209e7ef8740838479b79c5b8dfe4d0a820e1e2f0;p=platform%2Fupstream%2Fllvm.git X86: Do not use ValueMap for PreallocatedIds ValueMap should only be necessary if the IR values can be replaced. This is only used during codegen, when it's illegal to change the underlying IR. This allows using the default copy constructor for X86MachineFunctionInfo. I'm not happy about targets keeping state here that's only used in one specific pass, but we don't have a better place to put it right now. --- diff --git a/llvm/lib/Target/X86/X86MachineFunctionInfo.h b/llvm/lib/Target/X86/X86MachineFunctionInfo.h index 99d1a97..5c0ba2c 100644 --- a/llvm/lib/Target/X86/X86MachineFunctionInfo.h +++ b/llvm/lib/Target/X86/X86MachineFunctionInfo.h @@ -119,7 +119,9 @@ class X86MachineFunctionInfo : public MachineFunctionInfo { Optional SwiftAsyncContextFrameIdx; - ValueMap PreallocatedIds; + // Preallocated fields are only used during isel. + // FIXME: Can we find somewhere else to store these? + DenseMap PreallocatedIds; SmallVector PreallocatedStackSizes; SmallVector, 0> PreallocatedArgOffsets;