[lld] [lld][WebAssembly] Reset context object after each link (PR #78770)
Steven Johnson via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 19 12:41:05 PST 2024
steven-johnson wrote:
> > > > I wonder if we can replace these elaborate `reset()` methods with a placement new in the static data location? Would seems less error prone.
> > >
> > >
> > > Or just `ctx = Ctx();` ?
> >
> >
> > Yeah, I'm guessing there was some reason the original author didn't take that much simpler approach. I'll go with the same method for now for consistency and we can perhaps followup with a simplification.
>
> @MaskRay what would you think of such a simplification here? Maybe it would result in a little more allocator churn.. but that doesn't seem like a big concern if it only happens between lldMain operations (i.e. infrequently)
Hard to imagine that the single assignment would be anything more than noise in comparison to doing an object-linkage operation.
https://github.com/llvm/llvm-project/pull/78770
More information about the llvm-commits
mailing list