ValueMapper: Only check for cycles if operands change
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>
Mon, 3 Aug 2015 03:45:32 +0000 (03:45 +0000)
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>
Mon, 3 Aug 2015 03:45:32 +0000 (03:45 +0000)
commit836170e4d552e9ab6ad06f014942ebc732be9cff
tree9aba40f1376172ef14726c5011d2dfe5a1938df0
parentdae8660f5e23a0bdab455cc7f2fbea99d710b9d4
ValueMapper: Only check for cycles if operands change

This is a minor optimization to only check for unresolved operands
inside `mapDistinctNode()` if the operands have actually changed.  This
shouldn't really cause any change in behaviour.  I didn't actually see a
slowdown in a profile, I was just poking around nearby and saw the
opportunity.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243866 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Utils/ValueMapper.cpp