The D3D11 shader compiler doesn't remove unused constants because it would change the size of buffers uploaded by the application. This means that all of the default unused bgfx uniforms take up a huge amount of space that forces the app to waste a ton of time uploading zeroes. This change is a bit of a hack but removes the unused constants and improves performance a great deal.
The legacy DXSDK was only needed for DX9 shader compilation, but D3DCompile can handle old shader models. The only other thing needed was reflection support for getting constant data, which I've added.