search for: isnonlocal

Displaying 11 results from an estimated 11 matches for "isnonlocal".

2009 Sep 02
0
[LLVMdev] [PATCH] PR2218
...better if it returned an int, which was -1 if not found. + MemoryDependenceAnalysis& MD = getAnalysis<MemoryDependenceAnalysis>(); You can sink this link to right before the call to MD.getDependency. + // Require pointer to have local dependency. + if (!dep.getInst() || dep.isNonLocal()) + return false; Random thought: after this patch goes in, it would be interesting to see how many queries get rejected because they are non-local: handling non-local would be pretty easy. Please add a TODO that mentions this. In any case, the check for dep.isNonLocal() can be removed....
2009 Sep 02
2
[LLVMdev] [PATCH] PR2218
Hello, I fixed my patch as you asked. Sorry for the delay, I'd been working on my SSU patch (http://lists.cs.uiuc.edu/pipermail/llvmdev/2009-August/025347.html ) I hope that everything is fine now. -Jakub -------------- next part -------------- A non-text attachment was scrubbed... Name: pr2218-3.patch Type: application/octet-stream Size: 7511 bytes Desc: not available URL:
2011 Dec 13
1
[LLVMdev] Memory Dependence Analysis
...;mayReadFromMemory() || i->mayWriteToMemory()) { // get dependence for this instruction MemDepResult d = MDA->getDependency(i); if (d.isClobber()) errs() << "clobber " << *(d.getInst()); if (d.isDef()) errs() << "def " << *(d.getInst()); if (d.isNonLocal()) { errs() << "\tnot defined in this block\n"; BasicBlock *bb = i->getParent(); SmallVectorImpl<NonLocalDepResult> result(4); bool isLoad = false; AliasAnalysis::Location loc; if (StoreInst *store = dyn_cast<StoreInst>(i)) loc = AA->getLocation(sto...
2009 Sep 02
1
[LLVMdev] [PATCH] PR2218
...good I think. > > + MemoryDependenceAnalysis& MD = > getAnalysis<MemoryDependenceAnalysis>(); > > You can sink this link to right before the call to MD.getDependency. > > > > + // Require pointer to have local dependency. > + if (!dep.getInst() || dep.isNonLocal()) > + return false; > > Random thought: after this patch goes in, it would be interesting to > see how many queries get rejected because they are non-local: > handling non-local would be pretty easy. Please add a TODO that > mentions this. > > In any case, the che...
2009 Jul 23
0
[LLVMdev] [PATCH] PR2218
...volatile loads. 2. The dependency check is relatively expensive, so please reorder it to be checked after the check for alloca: + Value* pointer = L->getPointerOperand(); + MemDepResult dep = MD.getDependency(L); + + // Require pointer to have local dependency. + if(!dep.getInst() || dep.isNonLocal()) + return false; + + // Require pointer to be an alloca. + if(!isa<AllocaInst>(pointer)) + return false; 3. In this code, does the argument also need to be sret, or is any argument ok? + if(CallInst *C = dyn_cast<CallInst>(dep.getInst())) { + CallSite CS = CallSite::g...
2009 Jul 22
2
[LLVMdev] [PATCH] PR2218
Hello, This patch fixes PR2218. However, I'm not pretty sure that this optimization should be in MemCpyOpt. I think that GVN is good place as well. Regards -- Jakub Staszak -------------- next part -------------- A non-text attachment was scrubbed... Name: pr2218.patch Type: application/octet-stream Size: 6146 bytes Desc: not available URL:
2016 Jul 20
2
load instruction erroneously removed by GVN v2
...local > dependences, then non-local ones, as GVN does, there is no point in having > it go and look at the local ones again :) > > Look at how GVN calls this: > MemDepResult Dep = MD->getDependency(L); > > // If it is defined in another block, try harder. > if (Dep.isNonLocal()) > return processNonLocalLoad(L); > > (IE get local dependence, if there is none, go looking at non-local > dependences). > > > The list of non-local dependences it includes should definitely include > the one from block "loop1", and if it is ignoring it, it...
2016 Jul 20
2
load instruction erroneously removed by GVN v2
...s, there is no point in having >>> it go and look at the local ones again :) >>> >>> Look at how GVN calls this: >>> MemDepResult Dep = MD->getDependency(L); >>> >>> // If it is defined in another block, try harder. >>> if (Dep.isNonLocal()) >>> return processNonLocalLoad(L); >>> >>> (IE get local dependence, if there is none, go looking at non-local >>> dependences). >>> >>> >>> The list of non-local dependences it includes should definitely include >>> th...
2016 Jul 20
2
load instruction erroneously removed by GVN v2
Hello to whom this may concern, Versioned this as I saw identical title before. I'm compiling a clang project where I'm seeing GVN mess up and replace a load with a wrong def value. I am using LLVM-3.5, but the problem has been observed upto 3.8. To illustrate the problem, define i32 @main scalar.ph: <initialize [80 x i16] %dest> ... preheader: %index=0 br test, loop1, bb2
2013 Jan 18
0
[LLVMdev] llvm getDependency() for ICMP instructions is UNKNOWN
...uction types? Its definition is MemDepResult MemoryDependenceAnalysis::getDependency ( Instruction * QueryInst ) When I running my pass if ( !(Inst->getOpcode() == Instruction::ICmp) ) continue; ...... MemDepResult Res = MDA.getDependency(Inst); ..... if (!Res.isNonLocal()) { Deps[Inst].insert(std::make_pair(getInstTypePair(Res), static_cast<BasicBlock *>(0))); } else //it does not enter here ..... ..... errs()<<*Inst; errs() << DepTypeStr[type]; if (DepBB) { errs() <<...
2009 Jul 25
2
[LLVMdev] [PATCH] PR2218
...check is relatively expensive, so please reorder > it to be checked after the check for alloca: > > + Value* pointer = L->getPointerOperand(); > + MemDepResult dep = MD.getDependency(L); > + > + // Require pointer to have local dependency. > + if(!dep.getInst() || dep.isNonLocal()) > + return false; > + > + // Require pointer to be an alloca. > + if(!isa<AllocaInst>(pointer)) > + return false; > > > 3. In this code, does the argument also need to be sret, or is any > argument ok? > > + if(CallInst *C = dyn_cast<CallInst&...