[llvm] [JITLink] Always unmap standard segments in InProcessMemoryManager::deallocate (PR #81943)

Min-Yih Hsu via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 16 09:10:01 PST 2024


mshockwave wrote:

> Thanks for catching this @mshockwave!
> 
> Rather than using an optional, what if we removed the condition here:
> 
> ```c++
>       if (!FA->DeallocActions.empty())
> 	DeallocActionsList.push_back(std::move(FA->DeallocActions));
> ```
> 
> and just unconditionally moved the `DeallocActions` vector? I think that should be as cheap as the optional, and otherwise have the same effect.

You're right, that's more efficient. I've fixed that.

https://github.com/llvm/llvm-project/pull/81943


More information about the llvm-commits mailing list