mirror of
https://github.com/RPCS3/llvm.git
synced 2024-12-14 23:48:56 +00:00
Don't allow the automatically updated MI flags to be set directly.
The bundle-related MI flags need to be kept in sync with the neighboring instructions. Don't allow the bulk flag-setting setFlags() function to change them. Also don't copy MI flags when cloning an instruction. The clone's bundle flags will be set when it is explicitly inserted into a bundle. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170459 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
9b04104a5e
commit
bd7b36e780
@ -150,7 +150,9 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
void setFlags(unsigned flags) {
|
void setFlags(unsigned flags) {
|
||||||
Flags = flags;
|
// Filter out the automatically maintained flags.
|
||||||
|
unsigned Mask = BundledPred | BundledSucc;
|
||||||
|
Flags = (Flags & Mask) | (flags & ~Mask);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// clearFlag - Clear a MI flag.
|
/// clearFlag - Clear a MI flag.
|
||||||
|
@ -556,8 +556,8 @@ MachineInstr::MachineInstr(MachineFunction &MF, const MachineInstr &MI)
|
|||||||
for (unsigned i = 0; i != MI.getNumOperands(); ++i)
|
for (unsigned i = 0; i != MI.getNumOperands(); ++i)
|
||||||
addOperand(MI.getOperand(i));
|
addOperand(MI.getOperand(i));
|
||||||
|
|
||||||
// Copy all the flags.
|
// Copy all the sensible flags.
|
||||||
Flags = MI.Flags;
|
setFlags(MI.Flags);
|
||||||
|
|
||||||
// Set parent to null.
|
// Set parent to null.
|
||||||
Parent = 0;
|
Parent = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user