search for: cansinkorhoist

Displaying 3 results from an estimated 3 matches for "cansinkorhoist".

2011 Feb 07
3
[LLVMdev] A question about LICM (Loop Invariant Code Motion)
...t gv = 3;//global var int func(int n) { int i; int a[1000]; for (i = 0; i < n; ++i) { a[i] += gv; // load from the @gv pointer, hoist } } load for the global var gv's value CAN be hoist to loop preheader. After tracking the LICM pass, I find that both loads are loop invariant, and canSinkOrHoist() also returns true; however the difference is 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) &&a...
2011 Feb 08
0
[LLVMdev] A question about LICM (Loop Invariant Code Motion)
Hi Yuelu, > After tracking the LICM pass, I find that both loads are loop > invariant, and canSinkOrHoist() also returns true; however the > difference is 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: the function parameter po...
2011 Feb 08
1
[LLVMdev] A question about LICM (Loop Invariant Code Motion)
On Tue, Feb 8, 2011 at 4:55 AM, Duncan Sands <baldrick at free.fr> wrote: > Hi Yuelu, > >> After tracking the LICM pass, I find that both loads are loop >> invariant, and canSinkOrHoist() also returns true; however the >> difference is 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: > >...