Allow more loads to be folded which were previously prevented from happening
authorEvan Cheng <evan.cheng@apple.com>
Sun, 5 Feb 2006 06:43:12 +0000 (06:43 +0000)
committerEvan Cheng <evan.cheng@apple.com>
Sun, 5 Feb 2006 06:43:12 +0000 (06:43 +0000)
commite41bf82107eb89b7f97233ee2625f107c056cedf
treead60f47800426691cc8884a48a0f712ccb38ec3e
parent029e844994a1effb2f42cd0ddbac55a92d31bf31
Allow more loads to be folded which were previously prevented from happening
due to ordering issue. i.e. they were selected for chain use first.
Now at load select time, check if it is being selected for a chain use and if
it has only a single real use. If so, return a HANDLENODE (with the load as
its operand) in its place and record it.
When it is folded or the load is selected for a real use, the isel records it
as the replacement for the HANDLENODE. The replacement is done when all nodes
are selected.
This scheme exposed a couple of problems where cycles can happen. (See comments
in EmitMatchCode() for descriptions of the problems and their workaround /
solutions.) These problems have been resolved with a small compile time
penality.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25995 91177308-0d34-0410-b5e6-96231b3b80d8
utils/TableGen/DAGISelEmitter.cpp
utils/TableGen/DAGISelEmitter.h