# FPSCEV - Improving the Range Analysis

In this post, we’ll improve our floating-point scalar evolution (fpscev) to do a better job at evaluating the range of some of the more complex intrinsics we analyze.
This post is the latest in a series about my experimentations with floating-point scalar evolution, you really want to read them in order:
An Experimental Floating-Point Scalar Evolution Using Floating-Point Scalar Evolution to Propagate Fast-Math Flags Using Floating-Point Scalar Evolution to Simplify Instructions The fpscev pass changes discussed in this post is available on github here.

# Farewell AMD / Hello Unity

Announcement time - today is my last day at AMD. I’ll be taking a few weeks off, before starting a new gig at Unity mid-July.
It is also the end of my five year involvement in Vulkan & SPIR-V - having contributed to both specifications since 2014.
I’ve very much enjoyed my time in this slice of the industry, but it was time for a new challenge.
Farewell AMD I’ve been at AMD a little over a year now - and it has been an interesting challenge.

# Using Floating-Point Scalar Evolution to Simplify Instructions

In this post, we’ll use floating-point scalar evolution (fpscev) to simplify instructions based on any range data we’ve managed to deduce.
This post is the latest in a series about my experimentations with floating-point scalar evolution, you really want to read the them in order:
An Experimental Floating-Point Scalar Evolution Using Floating-Point Scalar Evolution to Propagate Fast-Math Flags The LLVM optimization pass discussed in this post is available on github here.

# Using Floating-Point Scalar Evolution to Propagate Fast-Math Flags

As a follow-up to my post An Experimental Floating-Point Scalar Evolution, I’ve started looking into using my previous analysis to actually change the LLVM IR for the better.
The LLVM optimization pass discussed in this post is available on github here.
Fast-Math Flags LLVM has a way of encoding the fast-math flags on various floating-point operations. These flags let the compiler assume something about the operation, which generally allows more performance.

# An Experimental Floating-Point Scalar Evolution

The TL;DR - after a conversation at EuroLLVM with Steve Canon about how LLVM is missing scalar evolution analysis for floating-point, I’ve spent some spare time hacking on a new LLVM analysis pass - fpscev (Floating-Point SCalar EVolution) - available here at github. The pass will analyze floating-point operations in a function and work out if there are any constraints on the range of these values, information which can be used to better optimize code.