# Promotion of integral values

6 messages
Open this post in threaded view
|

## Promotion of integral values

 There's some optimization that turns expressions like this:    short a = ...    short b =    int a' = cast short a to int    int b' = cast short b to int    int c = a' + b' into this:    short a = ...    short b = ...    uint a' = cast short a to uint    uint b' = cast short b to uint    uint c = a' + b'    int c = cast uint c to int Does anyone know which optimization is doing this?  I'd like to be able to turn it off. Rob Robert L. Bocchino Jr. Ph.D. Student, Computer Science University of Illinois, Urbana-Champaign_______________________________________________ LLVM Developers mailing list [hidden email]         http://llvm.cs.uiuc.eduhttp://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Open this post in threaded view
|

## Re: Promotion of integral values

 On Wed, 14 Sep 2005, Robert L. Bocchino Jr. wrote: > There's some optimization that turns expressions like this: > >  short a = ... >  short b = >  int a' = cast short a to int >  int b' = cast short b to int >  int c = a' + b' > > into this: > >  short a = ... >  short b = ... >  uint a' = cast short a to uint >  uint b' = cast short b to uint >  uint c = a' + b' >  int c = cast uint c to int > > Does anyone know which optimization is doing this?  I'd like to be able to > turn it off. Hard to say without more information.  This is a semantically valid xform, so it's not "wrong" that it's doing it.  To find out what is doing it, pass -debug-pass=Arguments to gccas or gccld (whichever is doing it). This will give you a list of passes you can give to opt to get the same effect. You can use this list of passes to do a binary search for the pass that is doing the xform.  If I had to guess, I'd say instcombine, levelraise or indvars. -Chris -- http://nondot.org/sabre/http://llvm.org/_______________________________________________ LLVM Developers mailing list [hidden email]         http://llvm.cs.uiuc.eduhttp://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Open this post in threaded view
|

## Staged LLVM emulator

 Were there ever any plans to make a staged emulator that only JIT's hot functions (interpreting the lesser used ones)?  Emulators such as this tend to perform better when there are a lot of infrequently used functions. _______________________________________________ LLVM Developers mailing list [hidden email]         http://llvm.cs.uiuc.eduhttp://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Open this post in threaded view
|

## Re: Staged LLVM emulator

 On Thu, 15 Sep 2005, Patrick Meredith wrote: > Were there ever any plans to make a staged emulator that only JIT's hot > functions (interpreting the lesser used ones)?  Emulators such as this tend > to perform better when there are a lot of infrequently used functions. I'm not aware of any work to implement this sort of thing, but it shouldn't be too hard.  We're currently lacking a decent interpreter, so that would be the first place to start. -Chris -- http://nondot.org/sabre/http://llvm.org/_______________________________________________ LLVM Developers mailing list [hidden email]         http://llvm.cs.uiuc.eduhttp://lists.cs.uiuc.edu/mailman/listinfo/llvmdev