I came across this thread from 4.5 years ago: http://www.gamedev.net/topic/461399-const--uniform-question-in-glsl/
However, I wonder whether things have changed. This does not give me any errors, though the hold thread suggests it should:
layout(location = VIEW_SZ) uniform vec2 viewSz;
const vec2 scale = 1.0f / viewSz;
But it's still not clear to me whether scale is computed at each invocation of the shader for every fragment (and whether it makes a difference that scale is global vs making it local, in terms of evaluation time--I've read already that making it local may help the compiler with register allocation).
If it's computed, then of course it makes sense to precalculate the inverse and pass it in as a uniform.