Fix an issue where a use might be selected before a def, and then we didn't respect...
authorOwen Anderson <resistor@mac.com>
Sat, 30 Aug 2008 00:38:46 +0000 (00:38 +0000)
committerOwen Anderson <resistor@mac.com>
Sat, 30 Aug 2008 00:38:46 +0000 (00:38 +0000)
commitcc54e76cc67bbc9badc024ab29053602769bd255
tree9b98442cc75d4858fa188af45ec06ed99596a4ea
parentea9eedb7877008082b314b7ab322843fe2d402b5
Fix an issue where a use might be selected before a def, and then we didn't respect the pre-chosen vreg
assignment when selecting the def.  This is the naive solution to the problem: insert a copy to the pre-chosen
vreg.  Other solutions might be preferable, such as:
  1) Passing the dest reg into FastEmit_.  However, this would require the higher level code to know about reg classes, which they don't currently.
  2) Selecting blocks in reverse postorder.  This has some compile time cost for computing the order, and we'd need to measure its impact.

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