[#llvm-isSafeToSpeculativelyExecute-0f] = xref:llvm.adoc[llvm]::isSafeToSpeculativelyExecute :relfileprefix: ../ :mrdocs: Iterator‐context overload of isSafeToSpeculativelyExecute. == Synopsis Declared in `<llvm/Analysis/ValueTracking.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- bool isSafeToSpeculativelyExecute( xref:llvm/Instruction.adoc[Instruction] const* I, xref:llvm/BasicBlock/iterator.adoc[BasicBlock::iterator] CtxI, xref:llvm/AssumptionCache.adoc[AssumptionCache]* AC = nullptr, xref:llvm/DominatorTree.adoc[DominatorTree] const* DT = nullptr, xref:llvm/TargetLibraryInfo.adoc[TargetLibraryInfo] const* TLI = nullptr, bool UseVariableInfo = true, bool IgnoreUBImplyingAttrs = true); ---- == Return Value True if `I` is safe to speculate in the given context. == Parameters [cols="1,4"] |=== | Name| Description | *I* | Instruction to test for speculative safety. | *CtxI* | Context position expressed as a basic‐block iterator. | *AC* | Optional assumption cache for context‐sensitive facts. | *DT* | Optional dominator tree for context‐sensitive analysis. | *TLI* | Optional target library info. | *UseVariableInfo* | Whether non‐constant operand info may be used. | *IgnoreUBImplyingAttrs* | Whether to ignore UB‐implying attributes. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#