mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-21 08:17:40 +00:00
Don't allow TargetFlags on MO_Register MachineOperands.
Register operands are manipulated by a lot of target-independent code, and it is not always possible to preserve target flags. That means it is not safe to use target flags on register operands. None of the targets in the tree are using register operand target flags. External targets should be using immediate operands to annotate instructions with operand modifiers. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@162770 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -208,8 +208,8 @@ bool MachineOperand::isIdenticalTo(const MachineOperand &Other) const {
|
||||
hash_code llvm::hash_value(const MachineOperand &MO) {
|
||||
switch (MO.getType()) {
|
||||
case MachineOperand::MO_Register:
|
||||
return hash_combine(MO.getType(), MO.getTargetFlags(), MO.getReg(),
|
||||
MO.getSubReg(), MO.isDef());
|
||||
// Register operands don't have target flags.
|
||||
return hash_combine(MO.getType(), MO.getReg(), MO.getSubReg(), MO.isDef());
|
||||
case MachineOperand::MO_Immediate:
|
||||
return hash_combine(MO.getType(), MO.getTargetFlags(), MO.getImm());
|
||||
case MachineOperand::MO_CImmediate:
|
||||
|
||||
Reference in New Issue
Block a user