[LLVMdev] SCEV bottom value
Sahasrabuddhe, Sameer
Sameer.Sahasrabuddhe at amd.com
Sun Oct 7 22:51:49 PDT 2012
Hi Preston,
I was wondering ... "Bottom" is a bit overloaded as far as terms go. Would SCEVNaN be a better name for this beast?
Sameer.
> -----Original Message-----
> From: llvmdev-bounces at cs.uiuc.edu [mailto:llvmdev-bounces at cs.uiuc.edu] On
> Behalf Of Sameer Sahasrabuddhe
> Sent: Monday, October 08, 2012 9:16 AM
> To: preston.briggs at gmail.com
> Cc: LLVM Developers Mailing List
> Subject: Re: [LLVMdev] SCEV bottom value
>
> On Sun, 7 Oct 2012 18:53:59 -0700
> Preston Briggs <preston.briggs at gmail.com> wrote:
>
> > I'd like a value, call it Bottom, such that
> >
> > SE->getAddExpr(Bottom, X) => Bottom
> > SE->getMulExpr(Bottom, X,) => Bottom
> > isKnownPredicate(any, Bottom, X) => false
> > etc.
> >
> >
> > I can write code to make NULL work like I want, but it would be
> > simpler if something was already defined. I'm wondering about
> > SCEV::Unknown. The documentation suggests I could perhaps use it for
> > a "bottom" value.
> >
> > Think it would work?
>
> The documentation definitely says that SCEVUnknown is the "bottom"
> value. But the semantics you have listed here are different from how
> SCEVUnknown works. For example, B = A + Unknown is not Unknown, but it
> is in fact an add expression. If B is an operand for another add
> expression C, then it can be flattened so that A participates in any
> folding happening for C. But instead, if B was the expression A +
> Bottom, then B would become bottom, and so would C, and no folding will
> ever be allowed.
>
> In some sense, Bottom is the anti-thesis to Unknown. Unknown provides
> a boundary that encapsulates unknown semantics, while Bottom
> invalidates anything it touches!
>
> Also, how would one uniquify Bottom expressions? Should they all be
> considered identical?
>
> Sameer.
>
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
More information about the llvm-dev
mailing list