search for: hasallconstantindices

Displaying 4 results from an estimated 4 matches for "hasallconstantindices".

2015 Mar 12
3
[LLVMdev] Question about shouldMergeGEPs in InstructionCombining
...am not sure if (3) is feasible in instcombine. (I am not too familiar with LoopInfo) For the Octasic's Opus platform, I modified shouldMergeGEPs in our fork to: if (GEP.hasAllZeroIndices() && !Src.hasAllZeroIndices() && !Src.hasOneUse()) return false; return Src.hasAllConstantIndices(); // was return false; Following that change, I noticed some performance gain for a few specific tests and no regression at all in our (admittedly limited) benchmarks suite. Regards, Francois Pichet, Octasic. On Thu, Mar 12, 2015 at 4:14 PM, Mark Heffernan <meheff at google.com> wrote: &...
2015 Mar 12
2
[LLVMdev] Question about shouldMergeGEPs in InstructionCombining
...> > > > > > > > For the Octasic's Opus platform, I modified shouldMergeGEPs in our > fork to: > > > > if (GEP.hasAllZeroIndices() && !Src.hasAllZeroIndices() && > !Src.hasOneUse()) > return false; > > > return Src.hasAllConstantIndices(); // was return false; > > > > Following that change, I noticed some performance gain for a few > specific tests and no regression at all in our (admittedly limited) > benchmarks suite. > > > Regards, > Francois Pichet, Octasic. > > > > > On Th...
2015 Feb 25
2
[LLVMdev] Question about shouldMergeGEPs in InstructionCombining
----- Original Message ----- > From: "Hal Finkel" <hfinkel at anl.gov> > To: "Francois Pichet" <pichet2000 at gmail.com> > Cc: "LLVM Developers Mailing List" <llvmdev at cs.uiuc.edu>, "chandlerc" <chandlerc at gmail.com> > Sent: Tuesday, February 24, 2015 11:27:43 PM > Subject: Re: [LLVMdev] Question about
2014 Nov 03
8
[LLVMdev] [PATCH] Protection against stack-based memory corruption errors using SafeStack
...re: + if (V == I->getOperand(0)) + // Stored the pointer - conservatively assume it may be unsafe + return false; + // Storing to the pointee is safe + break; + + case Instruction::GetElementPtr: + if (!cast<const GetElementPtrInst>(I)->hasAllConstantIndices()) + // GEP with non-constant indices can lead to memory errors + return false; + + // We assume that GEP on static alloca with constant indices is safe, + // otherwise a compiler would detect it and warn during compilation. + + if (!isa<const ConstantInt&g...