[NewGVN] Restore old code to placate buildbots.

Apparently my suggestion of using ternary doesn't really work
as clang complains about incompatible types on LHS and RHS. Some
GCC versions happen to accept the code but clang behaviour is
correct here.

llvm-svn: 290822
This commit is contained in:
Davide Italiano 2017-01-02 18:41:34 +00:00
parent 999266abc7
commit 841261624d
1 changed files with 6 additions and 2 deletions

View File

@ -780,8 +780,12 @@ const Expression *NewGVN::performSymbolicCallEvaluation(Instruction *I,
// Update the memory access equivalence table to say that From is equal to To,
// and return true if this is different from what already existed in the table.
bool NewGVN::setMemoryAccessEquivTo(MemoryAccess *From, MemoryAccess *To) {
DEBUG(dbgs() << "Setting " << *From << " equivalent to "
<< (To ? "itself" : *To) << "\n");
DEBUG(dbgs() << "Setting " << *From << " equivalent to ");
if (!To)
DEBUG(dbgs() << "itself");
else
DEBUG(dbgs() << *To);
DEBUG(dbgs() << "\n");
auto LookupResult = MemoryAccessEquiv.find(From);
bool Changed = false;
// If it's already in the table, see if the value changed.