mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-23 14:25:07 +00:00
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
This commit is contained in:
@@ -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);
|
||||
};
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user