search for: aliascheck

Displaying 10 results from an estimated 10 matches for "aliascheck".

2009 Nov 05
0
[LLVMdev] BasicAliasAnalysis: Null pointers do not alias with anything
...asicAliasAnalysis.cpp > =================================================================== > --- lib/Analysis/BasicAliasAnalysis.cpp (revision 86023) > +++ lib/Analysis/BasicAliasAnalysis.cpp (working copy) > @@ -633,6 +633,15 @@ > AliasAnalysis::AliasResult > BasicAliasAnalysis::aliasCheck(const Value *V1, unsigned V1Size, > const Value *V2, unsigned V2Size) { > + // Null pointers do not alias with anything > + if (const Constant *C = dyn_cast<Constant>(V1)) > + if (C->isNullValue()) > + return NoAlias; > + > + i...
2009 Nov 04
5
[LLVMdev] BasicAliasAnalysis: Null pointers do not alias with anything
This is the first patch I've sent to this project. Please be gentle :) LLVM fails to remove the dead load in the following code when running $./llvm-as -o - test.ll | ./opt -O3 -o - | ./llvm-dis -o - %t = type { i32 } declare void @foo(i8*) define void @f(%t* noalias nocapture %stuff ) { %p = getelementptr inbounds %t* %stuff, i32 0, i32 0 %before = load i32* %p call void
2018 Jun 18
2
Question about Alias Analysis with restrict keyword
...pointer, we know they cannot alias. 1300 1301     // If both accesses are unknown size, we can't do anything useful here. 1302     if (V1Size == MemoryLocation::UnknownSize && 1303         V2Size == MemoryLocation::UnknownSize) 1304       return MayAlias; 1305 1306     AliasResult R = aliasCheck(UnderlyingV1, MemoryLocation::UnknownSize, 1307                                AAMDNodes(), V2, MemoryLocation::UnknownSize, 1308                                V2AAInfo, nullptr, UnderlyingV2); On line 1306, we can see the V1Size and V2Size are set up with "MemoryLocation::UnknownSize&quo...
2020 Mar 18
2
valid BasicAA behavior?
Am Di., 17. März 2020 um 16:56 Uhr schrieb Chawla, Pankaj via llvm-dev <llvm-dev at lists.llvm.org>: > All I am expecting from DA is a direction vector containing (*). There seems to be a bug in DI, see Felipe's answer. > I think the main problem is that currently there is no exact way DA can query AliasAnalysis in a ‘conservatively correct’ manner. > > Using UnknownSize
2009 Nov 06
2
[LLVMdev] BasicAliasAnalysis: Null pointers do not alias with anything
...t;> =================================================================== >> --- lib/Analysis/BasicAliasAnalysis.cpp (revision 86023) >> +++ lib/Analysis/BasicAliasAnalysis.cpp (working copy) >> @@ -633,6 +633,15 @@ >> AliasAnalysis::AliasResult >> BasicAliasAnalysis::aliasCheck(const Value *V1, unsigned V1Size, >> const Value *V2, unsigned V2Size) { >> + // Null pointers do not alias with anything >> + if (const Constant *C = dyn_cast<Constant>(V1)) >> + if (C->isNullValue()) >> + return NoAli...
2012 Nov 09
0
[LLVMdev] inttoptr and basicaa
> From: llvmdev-bounces at cs.uiuc.edu [mailto:llvmdev-bounces at cs.uiuc.edu] > On Behalf Of Arnold Schwaighofer > Subject: [LLVMdev] inttoptr and basicaa > BasicAA treats it conservatively if used on its own. It will return mayalias > for the two pointers. > TBAA operates based on the guarantee that pointers to different types cannot > alias (think C's strict
2012 Mar 01
0
[LLVMdev] problem with inlining pass
Hi Jochen, > My llvm version is 3.0 release. > I have a module generated by clang. When I optimize it, I first add an > inlining pass (llvm::createFunctionInliningPass), then these passes: > - own FunctionPass > - llvm::createPromoteMemoryToRegisterPass > - llvm::createInstructionCombiningPass > - llvm::createDeadInstEliminationPass > - llvm::createDeadStoreEliminationPass
2012 Nov 09
2
[LLVMdev] inttoptr and basicaa
BasicAA treats it conservatively if used on its own. It will return mayalias for the two pointers. TBAA operates based on the guarantee that pointers to different types cannot alias (think C's strict aliasing rules). Therein lies its power but also its danger, that is, nothing prevents the programmer to write code that violates these rules (That's why we have -fno-strict-aliasing). So
2012 Feb 29
2
[LLVMdev] problem with inlining pass
Hi! My llvm version is 3.0 release. I have a module generated by clang. When I optimize it, I first add an inlining pass (llvm::createFunctionInliningPass), then these passes: - own FunctionPass - llvm::createPromoteMemoryToRegisterPass - llvm::createInstructionCombiningPass - llvm::createDeadInstEliminationPass - llvm::createDeadStoreEliminationPass - new llvm::DominatorTree() - new
2012 Mar 01
3
[LLVMdev] Aliasing bug or feature?
...alias( AliasAnalysis::Location(MMOa->getValue(), Overlapa, MMOa->getTBAAInfo()), AliasAnalysis::Location(MMOb->getValue(), Overlapb, MMOb->getTBAAInfo())); Quick debug of BasicAliasAnalysis::aliasCheck() points to this code: if (isIdentifiedObject(O1) && isIdentifiedObject(O2)) return NoAlias; And in llvm::isIdentifiedObject() this is true: if (isa<GlobalValue>(V) && !isa<GlobalAlias>(V)) Any qlues/suggestions are welcome. Thanks. Sergei Larin -- Qualcomm In...