diff options
author | Owen Anderson <resistor@mac.com> | 2008-08-30 00:38:46 +0000 |
---|---|---|
committer | Owen Anderson <resistor@mac.com> | 2008-08-30 00:38:46 +0000 |
commit | cc54e76cc67bbc9badc024ab29053602769bd255 (patch) | |
tree | 9b98442cc75d4858fa188af45ec06ed99596a4ea /include/llvm/CodeGen/FastISel.h | |
parent | ea9eedb7877008082b314b7ab322843fe2d402b5 (diff) | |
download | external_llvm-cc54e76cc67bbc9badc024ab29053602769bd255.zip external_llvm-cc54e76cc67bbc9badc024ab29053602769bd255.tar.gz external_llvm-cc54e76cc67bbc9badc024ab29053602769bd255.tar.bz2 |
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
Diffstat (limited to 'include/llvm/CodeGen/FastISel.h')
-rw-r--r-- | include/llvm/CodeGen/FastISel.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/llvm/CodeGen/FastISel.h b/include/llvm/CodeGen/FastISel.h index 364f82e..61b4fb1 100644 --- a/include/llvm/CodeGen/FastISel.h +++ b/include/llvm/CodeGen/FastISel.h @@ -225,6 +225,9 @@ private: bool SelectCast(Instruction *I, ISD::NodeType Opcode, DenseMap<const Value*, unsigned> &ValueMap); + + void UpdateValueMap(Instruction* I, unsigned Reg, + DenseMap<const Value*, unsigned> &ValueMap); }; } |