Displaying 6 results from an estimated 6 matches for "safegeps".
2009 Jun 24
1
[LLVMdev] Handling SMax(N, N - constInt) in Scalar Evolution pass
...und.
I implemented a prototype using the Scalar Evolution pass. Here are the
pseudo-code of the implementation:
const SCEV * offset = SE->getMinusSCEV(SE->getSCEV(GEP), GEPBase);
const SCEV * bounds = SE->getSCEV(objSize);
if (SE->getSMaxExpr(offset, bounds) == bounds) {
++safeGEPs;
}
But it turns out that SCEVSMaxExpr does not handle the case of SMax(N,
N-2).
My question is, is there a plan to support something like this, or is it
possible to do some refactoring to enhance the capability of Scalar
Evolution? I notice that Scalar Evolution, Instruction Combining and
Memor...
2009 Jun 24
2
[LLVMdev] Handling SMax(N, N - constInt) in Scalar Evolution pass
...are the
> > pseudo-code of the implementation:
> >
> > const SCEV * offset = SE->getMinusSCEV(SE->getSCEV(GEP), GEPBase);
> > const SCEV * bounds = SE->getSCEV(objSize);
> >
> > if (SE->getSMaxExpr(offset, bounds) == bounds) {
> > ++safeGEPs;
> > }
> >
> > But it turns out that SCEVSMaxExpr does not handle the case of SMax(N,
> > N-2).
>
> Consider 8-bit integers and N = -127. N-1 equals INT_MIN and N-2 then is
> equal to INT_MAX, or 127. In that case, the SMax would equal N-2, not N.
>
> In...
2009 Jun 24
0
[LLVMdev] Handling SMax(N, N - constInt) in Scalar Evolution pass
...ng the Scalar Evolution pass. Here are the
> pseudo-code of the implementation:
>
> const SCEV * offset = SE->getMinusSCEV(SE->getSCEV(GEP), GEPBase);
> const SCEV * bounds = SE->getSCEV(objSize);
>
> if (SE->getSMaxExpr(offset, bounds) == bounds) {
> ++safeGEPs;
> }
>
> But it turns out that SCEVSMaxExpr does not handle the case of SMax(N,
> N-2).
Consider 8-bit integers and N = -127. N-1 equals INT_MIN and N-2 then is
equal to INT_MAX, or 127. In that case, the SMax would equal N-2, not N.
In other cases (like N = 2) the SMax would equa...
2009 Jun 24
4
[LLVMdev] killing vicmp and vfcmp
Now that icmp and fcmp have supported returning vectors of i1 for a
while, I think it's time to remove the vicmp and vfcmp instructions from
LLVM. The good news is that we've never shipped a release that included
them so we won't be providing auto-upgrade support.
There is some existing backend support for vicmp and vfcmp that looks
different from what icmp and fcmp do. If this
2009 Jun 24
0
[LLVMdev] Handling SMax(N, N - constInt) in Scalar Evolution pass
...of the implementation:
> > >
> > > const SCEV * offset = SE->getMinusSCEV(SE->getSCEV(GEP), GEPBase);
> > > const SCEV * bounds = SE->getSCEV(objSize);
> > >
> > > if (SE->getSMaxExpr(offset, bounds) == bounds) {
> > > ++safeGEPs;
> > > }
> > >
> > > But it turns out that SCEVSMaxExpr does not handle the case of SMax(N,
> > > N-2).
> >
> > Consider 8-bit integers and N = -127. N-1 equals INT_MIN and N-2 then is
> > equal to INT_MAX, or 127. In that case, the SMax wo...
2009 Jun 24
1
[LLVMdev] Handling SMax(N, N - constInt) in Scalar Evolution pass
...ementation:
>>>>
>>>> const SCEV * offset = SE->getMinusSCEV(SE->getSCEV(GEP), GEPBase);
>>>> const SCEV * bounds = SE->getSCEV(objSize);
>>>>
>>>> if (SE->getSMaxExpr(offset, bounds) == bounds) {
>>>> ++safeGEPs;
>>>> }
>>>>
>>>> But it turns out that SCEVSMaxExpr does not handle the case of SMax(N,
>>>> N-2).
>>> Consider 8-bit integers and N = -127. N-1 equals INT_MIN and N-2 then is
>>> equal to INT_MAX, or 127. In that case, the SMax...