[#llvm-canReplacePointersIfEqual] = xref:llvm.adoc[llvm]::canReplacePointersIfEqual :relfileprefix: ../ :mrdocs: Returns true if pointer `From` can be replaced with equal pointer `To.` == Synopsis Declared in `<llvm/Analysis/Loads.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- bool canReplacePointersIfEqual( xref:llvm/Value.adoc[Value] const* From, xref:llvm/Value.adoc[Value] const* To, xref:llvm/DataLayout.adoc[DataLayout] const& DL); ---- == Description The pointers are deemed equal through some means (e.g. information from conditions). NOTE: The current implementation allows replacement in Icmp and PtrToInt instructions, as well as when we are replacing with a null pointer. Additionally it also allows replacement of pointers when both pointers have the same underlying object. == Return Value True if pointer `From` can be replaced with equal pointer `To.` == Parameters [cols="1,4"] |=== | Name| Description | *From* | Pointer value that would be replaced. | *To* | Pointer value that would replace `From.` | *DL* | Data layout used for pointer‐size reasoning. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#