Use the new "UpdateNodeOperands" method to simplify LegalizeDAG and make it
authorChris Lattner <sabre@nondot.org>
Sat, 28 Jan 2006 10:58:55 +0000 (10:58 +0000)
committerChris Lattner <sabre@nondot.org>
Sat, 28 Jan 2006 10:58:55 +0000 (10:58 +0000)
commitc52ad4f04ea5f51a1b4c67e585acea5c0525fc3d
tree670ec775989f585359dde26fb896d29e500e70f7
parent6b2469c1ad9bdb0183658df9130af1edbe84912c
Use the new "UpdateNodeOperands" method to simplify LegalizeDAG and make it
faster.  This cuts about 120 lines of code out of the legalizer (mostly code
checking to see if operands have changed).

It also fixes an ugly performance issue, where the legalizer cloned the entire
graph after any change.  Now the "UpdateNodeOperands" method gives it a chance
to reuse nodes if the operands of a node change but not its opcode or valuetypes.

This speeds up instruction selection time on kimwitu++ by about 8.2% with a
release build.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25746 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/SelectionDAG/LegalizeDAG.cpp