Skip to content

Conversation

@lhames
Copy link
Contributor

@lhames lhames commented Oct 13, 2025

This commit renames the "finalize" operation to "initialize", and "deallocate" to "deinitialize".

The new names are chosen to better fit the point of view of the ORC-runtime and executor-process: After memory is reserved it can be initialized with some content, and deinitialized to return that memory to the reserved region.

This seems more understandable to me than the original scheme, which named these operations after the controller-side JITLinkMemoryManager operations that they partially implemented. I.e. SimpleNativeMemoryMap::finalize implemented the final step of JITLinkMemoryManager::finalize, initializing the memory in the executor; and SimpleNativeMemoryMap::deallocate implemented the final step of JITLinkMemoryManager::deallocate, running dealloc actions and releasing the finalized region.

The proper way to think of the relationship between these operations now is that:

  1. The final step of finalization is to initialize the memory in the executor.

  2. The final step of deallocation is to deinitialize the memory in the executor.

This commit renames the "finalize" operation to "initialize", and "deallocate"
to "deinitialize".

The new names are chosen to better fit the point of view of the ORC-runtime and
executor-process: After memory is *reserved* it can be *initialized* with some
content, and *deinitialized* to return that memory to the reserved region.

This seems more understandable to me than the original scheme, which named
these operations after the controller-side JITLinkMemoryManager operations
that they partially implemented. I.e. SimpleNativeMemoryMap::finalize
implemented the final step of JITLinkMemoryManager::finalize, initializing the
memory in the executor; and SimpleNativeMemoryMap::deallocate implemented the
final step of JITLinkMemoryManager::deallocate, running dealloc actions and
releasing the finalized region.

The proper way to think of the relationship between these operations now is
that:

1. The final step of finalization is to initialize the memory in the executor.

2. The final step of deallocation is to deinitialize the memory in the
   executor.
@lhames lhames merged commit 7381558 into llvm:main Oct 13, 2025
11 checks passed
@lhames lhames deleted the orc-rt-rename-snmm-ops branch October 13, 2025 01:33
DharuniRAcharya pushed a commit to DharuniRAcharya/llvm-project that referenced this pull request Oct 13, 2025
…lvm#163114)

This commit renames the "finalize" operation to "initialize", and
"deallocate" to "deinitialize".

The new names are chosen to better fit the point of view of the
ORC-runtime and executor-process: After memory is *reserved* it can be
*initialized* with some content, and *deinitialized* to return that
memory to the reserved region.

This seems more understandable to me than the original scheme, which
named these operations after the controller-side JITLinkMemoryManager
operations that they partially implemented. I.e.
SimpleNativeMemoryMap::finalize implemented the final step of
JITLinkMemoryManager::finalize, initializing the memory in the executor;
and SimpleNativeMemoryMap::deallocate implemented the final step of
JITLinkMemoryManager::deallocate, running dealloc actions and releasing
the finalized region.

The proper way to think of the relationship between these operations now
is that:

1. The final step of finalization is to initialize the memory in the
executor.

2. The final step of deallocation is to deinitialize the memory in the
executor.
akadutta pushed a commit to akadutta/llvm-project that referenced this pull request Oct 14, 2025
…lvm#163114)

This commit renames the "finalize" operation to "initialize", and
"deallocate" to "deinitialize".

The new names are chosen to better fit the point of view of the
ORC-runtime and executor-process: After memory is *reserved* it can be
*initialized* with some content, and *deinitialized* to return that
memory to the reserved region.

This seems more understandable to me than the original scheme, which
named these operations after the controller-side JITLinkMemoryManager
operations that they partially implemented. I.e.
SimpleNativeMemoryMap::finalize implemented the final step of
JITLinkMemoryManager::finalize, initializing the memory in the executor;
and SimpleNativeMemoryMap::deallocate implemented the final step of
JITLinkMemoryManager::deallocate, running dealloc actions and releasing
the finalized region.

The proper way to think of the relationship between these operations now
is that:

1. The final step of finalization is to initialize the memory in the
executor.

2. The final step of deallocation is to deinitialize the memory in the
executor.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant