Fix nondeterministic output in local stack slot alloc pass
authorMatt Arsenault <Matthew.Arsenault@amd.com>
Wed, 26 Oct 2016 14:53:50 +0000 (14:53 +0000)
committerMatt Arsenault <Matthew.Arsenault@amd.com>
Wed, 26 Oct 2016 14:53:50 +0000 (14:53 +0000)
commit8fac501602d807da1841447adc799e4c4c25f81e
tree85ddb4757f5ed2bd47582d664a2d448c826a2563
parent8d7196bfdebbf9e1d5c717bf15ee60717c7f1dd7
Fix nondeterministic output in local stack slot alloc pass

This finds all of the references to a frame index in a function, and
sorts by the offset. If multiple instructions use the same offset,
nothing was breaking the tie for sorting.

This avoids the test failures the reverted r282999 introduced.

llvm-svn: 285201
llvm/lib/CodeGen/LocalStackSlotAllocation.cpp