[SROA] Thread the ability to add a pointer-specific name prefix through
authorChandler Carruth <chandlerc@gmail.com>
Tue, 25 Feb 2014 11:19:56 +0000 (11:19 +0000)
committerChandler Carruth <chandlerc@gmail.com>
Tue, 25 Feb 2014 11:19:56 +0000 (11:19 +0000)
commitf5701e428247de165e6d299261e488389401b251
treed3938c81b5aff72592b87626347a488f5c0248de
parent19899632f7125c449f983ad00c9fb3bf44aa0a76
[SROA] Thread the ability to add a pointer-specific name prefix through
the pointer adjustment code. This is the primary code path that creates
totally new instructions in SROA and being able to lump them based on
the pointer value's name for which they were created causes
*significantly* fewer name collisions and general noise in the debug
output. This is particularly significant because it is making it much
harder to track down instability in the output of SROA, as name
de-duplication is a totally harmless form of instability that gets in
the way of seeing real problems.

The new fancy naming scheme tries to dig out the root "pre-SROA" name
for pointer values and associate that all the way through the pointer
formation instructions. Digging out the root is important to prevent the
multiple iterative rounds of SROA from just layering too much cruft on
top of cruft here. We already track the layers of SROAs iteration in the
alloca name prefix. We don't need to duplicate it here.

Should have no functionality change, and shouldn't have any really
measurable impact on NDEBUG builds, as most of the complex logic is
debug-only.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202139 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Scalar/SROA.cpp