You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently it seems there is no way to attach operand bundles to call or invoke instructions via the C API, which are needed for Windows SEH, among other things. It would be great if LLVM frontends don't have to write their own wrapper functions for this. I was thinking of something like:
However I had a few questions while working on this myself:
The names LLVMBuildCall3 and LLVMBuildInvoke3 would suggest that the 2 variants are deprecated, perhaps better names should be chosen.
I had LLVMCreateOperandBundle call new llvm::OperandBundleDef(...). Bundles created this way need to be disposed later. Is this an appropriate representation for LLVMOperandBundleRef?
In my WIP LLVMGetOperandBundles and LLVMGetOperandBundleAtIndex copy the bundles to the heap, and they too need to be disposed. This looks rather unnatural to me. Is it safe to wrap the bundles' addresses directly instead?
Added the following functions for manipulating operand bundles, as well as
building ``call`` and ``invoke`` instructions that use operand bundles:
* LLVMBuildCallWithOperandBundles
* LLVMBuildInvokeWithOperandBundles
* LLVMCreateOperandBundle
* LLVMDisposeOperandBundle
* LLVMGetNumOperandBundles
* LLVMGetOperandBundleAtIndex
* LLVMGetNumOperandBundleArgs
* LLVMGetOperandBundleArgAtIndex
* LLVMGetOperandBundleTag
Fixes#71873.
Currently it seems there is no way to attach operand bundles to call or invoke instructions via the C API, which are needed for Windows SEH, among other things. It would be great if LLVM frontends don't have to write their own wrapper functions for this. I was thinking of something like:
However I had a few questions while working on this myself:
LLVMBuildCall3
andLLVMBuildInvoke3
would suggest that the2
variants are deprecated, perhaps better names should be chosen.LLVMCreateOperandBundle
callnew llvm::OperandBundleDef(...)
. Bundles created this way need to be disposed later. Is this an appropriate representation forLLVMOperandBundleRef
?LLVMGetOperandBundles
andLLVMGetOperandBundleAtIndex
copy the bundles to the heap, and they too need to be disposed. This looks rather unnatural to me. Is it safe to wrap the bundles' addresses directly instead?See also: #30133, https://discourse.llvm.org/t/setting-funclet-operand-bundles/44113
The text was updated successfully, but these errors were encountered: