search for: issafetoexecuteunconditionally

Displaying 5 results from an estimated 5 matches for "issafetoexecuteunconditionally".

2016 Dec 27
1
Question regarding LICM
...ning most of the expression template calls and loop simplification is show below. If I run LICM on this IR the GEPs in line 1,2 are hoisted into the preheaders of the "j-loop" and the "k-loop" respectively. I believe this is so as the operands to the GEP are loop invariant and *isSafeToExecuteUnconditionally* returns trivially true for the GEP. However, the CallInst Line 4,6 remain inside the innermost loop as the *hasLoopInvariantOperands* for the CallInsts returns false as the GEP operands themselves are not loop invariant. This is the behaviour I was not sure about and would greatly appreciate som...
2010 Jan 11
0
[LLVMdev] LICM ilist question.
...tor tree node?"); BasicBlock *BB = N->getBlock(); ... * for (BasicBlock::iterator II = BB->end(); II != BB->begin(); ) *{ Instruction &I = *--II; if (isLoopInvariantInst(I) && canSinkOrHoistInst(I) && isSafeToExecuteUnconditionally(I)) * hoist(I);* } .. } -- UGR -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20100111/7f0da2b3/attachment.html>
2010 Jan 12
0
[LLVMdev] LICM ilist question.
...erse iteration of instructions in the BB > * for (BasicBlock::iterator II = BB->end(); II != BB->begin(); ) *{ > > Instruction &I = *--II; > > if (isLoopInvariantInst(I) && canSinkOrHoistInst(I) && > isSafeToExecuteUnconditionally(I)) > * hoist(I);* > } looks perfectly valid. If I remember correctly, the (operator--) on Instruction has a buggy assert, but that should not trigger in your case. (Adding unit tests for reverse iteration is on my TODO list.) I suspect that your "hoist(I)"...
2011 Feb 07
3
[LLVMdev] A question about LICM (Loop Invariant Code Motion)
...s at Instruction::isSafeToSpeculativelyExecute(), for load from function parameter pointer, it return false; with load from a global var pointer, it returns true. As a result no hoist happens for a load *fp: **LICM.cpp if (isLoopInvariantInst(I) && canSinkOrHoistInst(I) && isSafeToExecuteUnconditionally(I)) // invokes I->IsSafeToSpeculativelyExecute() hoist(I); But I do not know why we need to treat fp/local pointer different with global pointer here. I think hoisting fp/local pointers should be fine if they are loop invariant and does not alias with other pointers.. Anyone can help...
2011 Jul 19
8
[LLVMdev] Reviving the new LLVM concurrency model
...; preds = %for.cond + ret void +} Index: lib/Transforms/Scalar/LICM.cpp =================================================================== --- lib/Transforms/Scalar/LICM.cpp (revision 135415) +++ lib/Transforms/Scalar/LICM.cpp (working copy) @@ -151,6 +151,11 @@ /// bool isSafeToExecuteUnconditionally(Instruction &I); + /// isGuaranteedToExecute - Check that the instruction is guaranteed to + /// execute. + /// + bool isGuaranteedToExecute(Instruction &I); + /// pointerInvalidatedByLoop - Return true if the body of this loop may /// store into the memory location...