search for: getnonlocalpointerdepend

Displaying 18 results from an estimated 18 matches for "getnonlocalpointerdepend".

2009 Apr 13
5
[LLVMdev] MemoryDependenceAnalysis
...[#uses=1] store i32 %11, i32* %j, align 4 %12 = add i32 %0, 8 ; <i32> [#uses=1] store i32 %12, i32* %n, align 4 call void (...)* @IMPORTANT_F_([10 x float]* %b, i32* %n, i32* %i, i32* %j) nounwind ret void My problem is that if I use getNonLocalPointerDependency() I get the instruction "N=N+1" as a Def for the second parameter, "N", and no Def for the fourth, "j", (only the call to "bar()" as clobber). If I use getDependency() on the call, I get the instruction "N=N+7" as a clobber. How can I us...
2009 Apr 13
2
[LLVMdev] MemoryDependenceAnalysis
...gt;> %12 = add i32 %0, 8 ; <i32> [#uses=1] >> store i32 %12, i32* %n, align 4 >> call void (...)* @IMPORTANT_F_([10 x float]* %b, i32* %n, >> i32* %i, i32* %j) nounwind >> ret void >> >> My problem is that if I use getNonLocalPointerDependency() I get the >> instruction "N=N+1" as a Def for the second parameter, "N", and no >> Def for the fourth, "j", (only the call to "bar()" as clobber). >> If I use getDependency() on the call, I get the instruction "N=N+7" >...
2009 Apr 25
0
[LLVMdev] MemoryDependenceAnalysis
...Note that my analysis pass is invoked > after "-O1" and that's why the IR I included in the original email > is optimized. Hi Anthony, Sorry for the delay, things have been crazy lately. The MemDep API assumes that you will call getDependency() first, and then only call getNonLocalPointerDependency() if it returns non- local. This will return the first instruction that the instruction is dependent on. As Eli mentioned, MemDep does have some more rich APIs that are private. We could look the export those so that you can query each argument at a time. The problem is that (without...
2017 Jan 13
4
Wrong code bug after GVN/PRE?
...differ in these two cases? The input to gvn looks the same when running all passes and just gvn, but I see a difference in how GVN::processNonLocalLoad(LoadInst *LI) behaves: I get different results from // Step 1: Find the non-local dependencies of the load. LoadDepVect Deps; MD->getNonLocalPointerDependency(LI, Deps); So we get different results from MemoryDependenceResults when invoking gvn alone or after a bunch of other passes. Is this expected or not? I tried to dig into MemoryDependenceResults::getNonLocalPointerDependency but I have to say I'm quite lost. I ran some git bisect an...
2009 Apr 13
0
[LLVMdev] MemoryDependenceAnalysis
...instructions > j = N/2  (store i32 %11, i32* %j, align 4) > and > N = N+7  (store i32 %12, i32* %n, align 4) > are the ones that define the parameters "j" and "N" respectively? Try calling MemoryDependenceAnalysis::getDependency? It sounds like you're misusing getNonLocalPointerDependency. -Eli
2009 Apr 13
1
[LLVMdev] MemoryDependenceAnalysis
...(store i32 %11, i32* %j, align 4) >> and >> N = N+7 (store i32 %12, i32* %n, align 4) >> are the ones that define the parameters "j" and "N" respectively? > > Try calling MemoryDependenceAnalysis::getDependency? It sounds like > you're misusing getNonLocalPointerDependency. But I'm not interested in the dependencies of the alloca instruction, I'm interested in the definition(s) of the particular use of the pointer. Anthony
2010 Nov 09
0
[LLVMdev] Interesting test-suite results
In the MemoryDependenceAnalysis::getNonLocalPointerDependency overload that takes a pointer value, it is currently creating an AliasAnalysis::Location from just the pointer, which pessimistically assumes unknown size. I added code to use AliasAnalysis::getTypeStoreSize to create an AliasAnalysis::Location with a more accurate size (when target data is av...
2013 Jan 16
1
[LLVMdev] llvm print-memdeps segfault
...:AliasAnalysis::Location const&, bool, llvm::BasicBlock*, llvm::SmallVectorImpl<llvm::NonLocalDepResult>&, llvm::DenseMap<llvm::BasicBlock*, llvm::Value*, llvm::DenseMapInfo<llvm::BasicBlock*> >&, bool) + 3673 4 opt 0x08c019aa llvm::MemoryDependenceAnalysis::getNonLocalPointerDependency(llvm::AliasAnalysis::Location const&, bool, llvm::BasicBlock*, llvm::SmallVectorImpl<llvm::NonLocalDepResult>&) + 266 5 opt 0x08bf1bed 6 opt 0x08e3415c llvm::FPPassManager::runOnFunction(llvm::Function&) + 636 7 opt 0x08e341c8 llvm::FPPassManag...
2009 Apr 13
0
[LLVMdev] MemoryDependenceAnalysis
...%11, i32* %j, align 4 > %12 = add i32 %0, 8 ; <i32> [#uses=1] > store i32 %12, i32* %n, align 4 > call void (...)* @IMPORTANT_F_([10 x float]* %b, i32* %n, > i32* %i, i32* %j) nounwind > ret void > > My problem is that if I use getNonLocalPointerDependency() I get the > instruction "N=N+1" as a Def for the second parameter, "N", and no > Def for the fourth, "j", (only the call to "bar()" as clobber). > If I use getDependency() on the call, I get the instruction "N=N+7" as > a clobber....
2017 Jan 13
2
Wrong code bug after GVN/PRE?
...same when running all passes and just gvn, but >> I see a difference in how GVN::processNonLocalLoad(LoadInst *LI) behaves: >> >> I get different results from >> >> // Step 1: Find the non-local dependencies of the load. >> LoadDepVect Deps; >> MD->getNonLocalPointerDependency(LI, Deps); >> >> So we get different results from MemoryDependenceResults when invoking >> gvn alone or after a bunch of other passes. >> >> Is this expected or not? >> >> >> I tried to dig into MemoryDependenceResults::getNonLocalPointerDependenc...
2009 Apr 25
1
[LLVMdev] MemoryDependenceAnalysis
...ked >> after "-O1" and that's why the IR I included in the original email >> is optimized. > > Hi Anthony, > > Sorry for the delay, things have been crazy lately. > > The MemDep API assumes that you will call getDependency() first, and > then only call getNonLocalPointerDependency() if it returns non- > local. This will return the first instruction that the instruction is > dependent on. > > As Eli mentioned, MemDep does have some more rich APIs that are > private. We could look the export those so that you can query each > argument at a time. Actual...
2011 Dec 13
1
[LLVMdev] Memory Dependence Analysis
...n --debug-pass=Structure < test.bc > /dev/null in an effort to simplify things a bit. This gives me pretty straightforward code with 3 basic blocks. When I look at the loads using MDA->getDependency(), we find that they are both NonLocal, which makes sense. Chasing further, with MDA->getNonLocalPointerDependency(), I get a vector of basic blocks (the 1st and 2nd, as expected), along with indications that the query isUnknown. That surprised me; I had expected that it would suggest isClobber for both loads and both blocks. Am I doing something wrong? Or perhaps not chasing far enough? Or perhaps Memor...
2012 May 22
0
[LLVMdev] Some small changes to the memory dependence analysis API
...blocks in between the "thing we are checking against", and "the next dependency it thinks is real", you can get into hunting for a lot of dependencies we don't care about. Besides being faster, short circuiting like this eliminates more things. A similar issue occurs with getNonLocalPointerDependency (though there the issue is slightly different, we have a set of loads we want to know if this load is equivalent to, and if we walk past those loads without it seeing a def/clobber, we know the answer is "no", and we don't need to know the closest deps) [1] As a side note, whethe...
2013 Jan 21
2
[LLVMdev] llvm alloca dependencies
...from DependenceAnalysis and MemoryDependenceAnalysis, but the results were not correct. For instance, `MemoryDependenceAnalysis::getDependency` should be good with option "Def", but works only for stores, not for loads. Also I have a segfault when trying to use `MemoryDependenceAnalysis::getNonLocalPointerDependency` or `MemoryDependenceAnalysis::getPointerDependencyFrom` . When I try to check my result using MemDepResult::getDef(), the result for Load instructions is the same instruction ! So its depending on itself, that being weird since it is using a variable that is previously defined in the code. I...
2010 Sep 23
2
[LLVMdev] Finding all values derived from a function argument
...s that depend on our stores, TODO: this seems fishy! for(std::list<llvm::LoadInst *>::iterator I = loads.begin(), E = loads.end(); I != E; ) { bool pick = false; #if 1 llvm::SmallVector<llvm::NonLocalDepResult, 16> results; mda->getNonLocalPointerDependency((*I)->getPointerOperand(), true, (*I)->getParent(), results); for(llvm::SmallVector<llvm::NonLocalDepResult, 16>::iterator II = results.begin(), EE = results.end(); !pick && II != EE; ++II) { const llvm::MemDepResult &result = II-&gt...
2018 Apr 18
1
[RFC] Making GVN able to visit the same block more than once
...st.addr.1, %for.body ] %incdec.ptr = getelementptr inbounds float, float* %p, i64 1 %cmp = icmp eq float* %incdec.ptr, %last br i1 %cmp, label %exit, label %for.body exit: %ret = load float, float* %first.addr.2, align 4 ret float %ret } GVN calls MemoryDependenceAnalysis::getNonLocalPointerDependency to find the non-local dependencies of the load %ret. What it then does is: * Starts looking for an available value of *%first.addr.2 starting in exit. * Doesn't find anything in exit, goes to for.inc. * Doesn't find anything in for.inc, phi translates to be looking for a value of...
2015 Jul 21
6
[LLVMdev] GlobalsModRef (and thus LTO) is completely broken
...f5fbf62a8, > Loc=0x00007fff5fbf6268, isLoad=true, StartBB=0x000000010a19ffa0, > Result=0x00007fff5fbf6bf0, Visited=0x00007fff5fbf6208, SkipFirstBlock=false) > + 5897 at MemoryDependenceAnalysis.cpp:1200 > frame #6: 0x0000000103a0cb3b > libLTO.dylib`llvm::MemoryDependenceAnalysis::getNonLocalPointerDependency(this=0x000000010e6cf0c0, > QueryInst=0x000000010a1a20c8, Result=0x00007fff5fbf6bf0) + 635 at > MemoryDependenceAnalysis.cpp:911 > frame #7: 0x000000010340c5b5 libLTO.dylib`(anonymous > namespace)::GVN::processNonLocalLoad(this=0x000000010e6ce680, > LI=0x000000010a1a20c8) + 10...
2015 Jul 17
2
[LLVMdev] GlobalsModRef (and thus LTO) is completely broken
On Fri, Jul 17, 2015 at 9:13 AM Evgeny Astigeevich < evgeny.astigeevich at arm.com> wrote: > It’s Dhrystone. > Dhrystone has historically not been a good indicator of real-world performance fluctuations, especially at this small of a shift. I'd like to see if we see any fluctuation on larger and more realistic application benchmarks. One advantage of the flag being set is that we