[LLVMdev] isSafeToSpeculativelyExecute() for CallInst
baldrick at free.fr
Sat Sep 8 22:39:28 PDT 2012
On 08/09/12 22:51, Nadav Rotem wrote:
> On Aug 19, 2012, at 2:55 PM, "Kuperstein, Michael M"
> <michael.m.kuperstein at intel.com <mailto:michael.m.kuperstein at intel.com>> wrote:
>> Currently, llvm::isSafeToSpeculativelyExecute() always returns false for Call
>> This has actual performance implications, because loop-invariant code motion
>> makes this check, and will never hoist instructions that are not safe to
>> speculatively execute.
> LICM::canSinkOrHoistInst has special handling for hoisting Call Instructiobns.
> It looks like readonly functions should be hoisted. Do you have test cases
> which fail ?
a readonly/readnone function may contain divide by zero.
More information about the llvm-dev