[llvm-commits] [llvm] r108351 - /llvm/trunk/lib/Transforms/Utils/SimplifyCFG.cpp
Eli Friedman
eli.friedman at gmail.com
Thu Jul 15 09:28:57 PDT 2010
On Thu, Jul 15, 2010 at 7:59 AM, Owen Anderson <resistor at mac.com> wrote:
>
> On Jul 15, 2010, at 12:12 AM, Duncan Sands wrote:
>
> + Instruction *BonusInst = 0;
>
> + if (&*FrontIt != Cond&&
>
> + (*FrontIt).hasOneUse()&& *(*FrontIt).use_begin() == Cond&&
>
> + (*FrontIt).isSafeToSpeculativelyExecute()&&
>
> + !(*FrontIt).mayReadFromMemory()) {
>
> Why the check on mayReadFromMemory?
>
> We don't want to speculatively execute a load before a null check.
isSafeToSpeculativelyExecute will handle this for you.
-Eli
More information about the llvm-commits
mailing list