[LLVMdev] Complex constant expressions?
Neil Booth
neil at daikokuya.co.uk
Thu Jan 24 13:55:02 PST 2008
Chris Lattner wrote:-
> On Fri, 25 Jan 2008, Neil Booth wrote:
> >> What would be a good technique for accomplishing this?
>
> > The APFloat functionality I wrote is the only means I'm aware of
> > in LLVM, via the return value. APFloat is derived from C code I
>
> Right. Use of APFloat and AP[S]Int directly is the way to do this. It
> would be useful to extend APSInt to capture information about overflow.
>
> > If LLVM's APFloat wrapper isn't conveying the info it is given
> > by APFloat, it needs to be improved :)
>
> No, it doesn't. The LLVM constant classes are intended for the optimizer
> and IR, not for a front-end to use.
The optimizers can make use of this info too; e.g. whether constant
folding something can raise a signal can / should affect how
code is generated, in case the user has their CPU trapping those
events.
Neil.
More information about the llvm-dev
mailing list