Compile IRState