diff options
| author | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2012-08-28 18:05:48 +0000 | 
|---|---|---|
| committer | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2012-08-28 18:05:48 +0000 | 
| commit | dba99d0dfa010af1dda62b3da90b50a7b61915d3 (patch) | |
| tree | 6ec2736f95c321b304e29307dab4ee65a438b5e7 /llvm/lib/CodeGen | |
| parent | bf48b1b8e4d611ed830fd51dfe42729dad7355bf (diff) | |
| download | bcm5719-llvm-dba99d0dfa010af1dda62b3da90b50a7b61915d3.tar.gz bcm5719-llvm-dba99d0dfa010af1dda62b3da90b50a7b61915d3.zip | |
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.
llvm-svn: 162770
Diffstat (limited to 'llvm/lib/CodeGen')
| -rw-r--r-- | llvm/lib/CodeGen/MachineInstr.cpp | 4 | 
1 files changed, 2 insertions, 2 deletions
| diff --git a/llvm/lib/CodeGen/MachineInstr.cpp b/llvm/lib/CodeGen/MachineInstr.cpp index b1668499469..e1060046e26 100644 --- a/llvm/lib/CodeGen/MachineInstr.cpp +++ b/llvm/lib/CodeGen/MachineInstr.cpp @@ -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: | 

