This commit is in support of future uninitialized memory handling and adds
alloca instruction support to getInitialValueOfAllocation. This unifies initial
memory state querying (both stack and heap) to a single utility function.
Mem2Reg, GVN, and NewGVN optimizations are refactored to take advantage of
alloca support in getInitialValueOfAllocation.
To support uninitialized memory as poison we are proposing that in the future
load instructions support an attribute !freeze (or alternative) which will allow
freeze poison insertions where applicable. Thus the constant emitted by
getInitialValueOfAllocation will be dependent on the allocation
function/instruction and the load instruction attributes.
This is very specifically handling alloca, not any random allocation like function