search for: memorydependenceresult

Displaying 13 results from an estimated 13 matches for "memorydependenceresult".

2017 Jan 13
4
Wrong code bug after GVN/PRE?
...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 and as far as I can tell it starts going wrong with commit [SimplifyCF...
2017 Jan 13
2
Wrong code bug after GVN/PRE?
...essNonLocalLoad(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...
2018 Jun 13
2
RFC: cleanup in Transforms/Utils
...red 2. lib/Transforms/Utils/BasicBlockUtils.cpp : MergeBlockIntoPredecessor (+cc some of the folks who touched at least one of these either originally or recently) Brief overview: 1. MergeBasicBlockIntoOnlyPred 2. MergeBlockIntoPredecessor Update DT Update DT Update either DT or DDT Updates LI and MemoryDependenceResults Move all instructions from Pred to BB, delete Pred Move all instruction from BB to Pred, delete BB assert BB has single predecessor return if BB doesn't have a single predecessor Can I get some background on why there are two methods with such similar functionality? Are folks ok with merging...
2018 May 22
2
DSE: Remove useless stores between malloc & memset
...etween() { >   %call = tail call noalias i8* @calloc(i32 10, i32 1) >   store i8 97, i8* %call, align 1 >   %call1 = tail call i32 @strlen(i8* %call) >   ret i32 %call1 > } > > > static bool eliminateStrlen(CallInst *CI, BasicBlock::iterator &BBI, > AliasAnalysis *AA, MemoryDependenceResults *MD, > const DataLayout &DL, const TargetLibraryInfo *TLI, > InstOverlapIntervalsTy &IOL, > DenseMap<Instruction *, size_t> *InstrOrdering) { > > // Must be a strlen. > LibFunc Func; > Function *Callee = CI->getCalledFunction(); > if (!TLI->getLibFunc(*C...
2018 May 22
0
DSE: Remove useless stores between malloc & memset
IR: define i32 @calloc_strlen_write_between() { %call = tail call noalias i8* @calloc(i32 10, i32 1) store i8 97, i8* %call, align 1 %call1 = tail call i32 @strlen(i8* %call) ret i32 %call1 } static bool eliminateStrlen(CallInst *CI, BasicBlock::iterator &BBI, AliasAnalysis *AA, MemoryDependenceResults *MD, const DataLayout &DL, const TargetLibraryInfo *TLI, InstOverlapIntervalsTy &IOL, DenseMap<Instruction *, size_t> *InstrOrdering) { // Must be a strlen. LibFunc Func; Function *Callee = CI->getCalledFunction(); if (!TLI->getLibFunc(*Callee, Func) || !TLI->has(Func) || F...
2018 May 22
0
DSE: Remove useless stores between malloc & memset
...etween() { > %call = tail call noalias i8* @calloc(i32 10, i32 1) > store i8 97, i8* %call, align 1 > %call1 = tail call i32 @strlen(i8* %call) > ret i32 %call1 > } > > > static bool eliminateStrlen(CallInst *CI, BasicBlock::iterator &BBI, > AliasAnalysis *AA, MemoryDependenceResults *MD, > const DataLayout &DL, const TargetLibraryInfo *TLI, > InstOverlapIntervalsTy &IOL, > DenseMap<Instruction *, size_t> *InstrOrdering) { > > // Must be a strlen. > LibFunc Func; > Function *Callee = CI->getCalledFunction(); > if (!TLI->getLibFunc(*C...
2018 May 22
2
DSE: Remove useless stores between malloc & memset
...; llvm::Optional<T>::getPointer() [with T = llvm::MemoryLocation]: >>>> Assertion `Storage.hasVal' failed. >>>> >>>> static bool eliminateStrlen(CallInst *CI, BasicBlock::iterator &BBI, >>>> AliasAnalysis *AA, MemoryDependenceResults *MD, >>>> const DataLayout &DL, const TargetLibraryInfo *TLI, >>>> InstOverlapIntervalsTy &IOL, >>>> DenseMap<Instruction *, size_t> *InstrOrdering) { >>>&...
2018 May 22
2
DSE: Remove useless stores between malloc & memset
...LVM/llvm/include/llvm/ADT/Optional.h:176: T* > llvm::Optional<T>::getPointer() [with T = llvm::MemoryLocation]: > Assertion `Storage.hasVal' failed. > > static bool eliminateStrlen(CallInst *CI, BasicBlock::iterator &BBI, > AliasAnalysis *AA, MemoryDependenceResults *MD, > const DataLayout &DL, const TargetLibraryInfo *TLI, > InstOverlapIntervalsTy &IOL, > DenseMap<Instruction *, size_t> *InstrOrdering) { > > // Must be a strlen. > LibFunc F...
2018 May 22
0
DSE: Remove useless stores between malloc & memset
...t: opt: /home/xbolva00/LLVM/llvm/include/llvm/ADT/Optional.h:176: T* llvm::Optional<T>::getPointer() [with T = llvm::MemoryLocation]: Assertion `Storage.hasVal' failed. static bool eliminateStrlen(CallInst *CI, BasicBlock::iterator &BBI, AliasAnalysis *AA, MemoryDependenceResults *MD, const DataLayout &DL, const TargetLibraryInfo *TLI, InstOverlapIntervalsTy &IOL, DenseMap<Instruction *, size_t> *InstrOrdering) { // Must be a strlen. LibFunc Func; Function *Callee = CI-...
2018 May 22
2
DSE: Remove useless stores between malloc & memset
...m/ADT/Optional.h:176: T* >> llvm::Optional<T>::getPointer() [with T = llvm::MemoryLocation]: >> Assertion `Storage.hasVal' failed. >> >> static bool eliminateStrlen(CallInst *CI, BasicBlock::iterator &BBI, >> AliasAnalysis *AA, MemoryDependenceResults *MD, >> const DataLayout &DL, const TargetLibraryInfo *TLI, >> InstOverlapIntervalsTy &IOL, >> DenseMap<Instruction *, size_t> *InstrOrdering) { >> >> // Must be a strl...
2018 May 22
0
DSE: Remove useless stores between malloc & memset
...llvm/ADT/Optional.h:176: T* > llvm::Optional<T>::getPointer() [with T = llvm::MemoryLocation]: > Assertion `Storage.hasVal' failed. > > static bool eliminateStrlen(CallInst *CI, BasicBlock::iterator &BBI, > AliasAnalysis *AA, MemoryDependenceResults *MD, > const DataLayout &DL, const TargetLibraryInfo *TLI, > InstOverlapIntervalsTy &IOL, > DenseMap<Instruction *, size_t> *InstrOrdering) { > > // Must be a strl...
2018 May 21
2
DSE: Remove useless stores between malloc & memset
memoryIsNotModifiedBetween is precisely the sort of expensive walk we shouldn't be doing... I'm surprised it hasn't caused any serious issues yet.  Ideally, what we should be doing is using MemorySSA to find a dependency from the memset: if the closest dependency is the malloc, there aren't any stores between the memset and the malloc.  (But we aren't using MemorySSA in
2018 May 22
0
DSE: Remove useless stores between malloc & memset
...: T* >>> llvm::Optional<T>::getPointer() [with T = llvm::MemoryLocation]: >>> Assertion `Storage.hasVal' failed. >>> >>> static bool eliminateStrlen(CallInst *CI, BasicBlock::iterator &BBI, >>> AliasAnalysis *AA, MemoryDependenceResults *MD, >>> const DataLayout &DL, const TargetLibraryInfo *TLI, >>> InstOverlapIntervalsTy &IOL, >>> DenseMap<Instruction *, size_t> *InstrOrdering) { >>> >>>...