Don't store a Twine across statements
Don't store a Twine across statements

The LLVM documentation warns that "A Twine is not intended for use
directly and should not be stored, its implementation relies on the
ability to store pointers to temporary stack objects which may be
deallocated at the end of a statement."  Indeed, Valgrind's memcheck
tool was warning about access to uninitialized memory when flattening
out the Twine we were creating here.  The problem is that by the time
the flattening occurred (in PHINode's constructor), some of those
"temporary stack objects" had already been destroyed.

We could fix this by assembling and using the Twine all within a single
statement, effectively inlining the Name initializer directly into the
PHINode::Create call.  But that would make for a *very* long line.
Instead, I'm fixing this by flattening the temporary Twine to a
std::string that we can safely keep around across multiple statements.
There's a bit of waste in that, because the flattened string will be
turned back into a single-node Twine for the PHINode::Create call, which
will eventually flatten it back to a string again.  But that still seems
better than having everything in one gigantic statement.

henry-nazare/llvm-sra