forked from OSchip/llvm-project
Print <def,read-undef> to avoid confusion.
The <undef> flag on a def operand only applies to partial register redefinitions. Only print the flag when relevant, and print it as <def,read-undef> to make it clearer what it means. llvm-svn: 155239
This commit is contained in:
parent
6d66ce67d7
commit
7111a630d5
|
@ -255,6 +255,10 @@ void MachineOperand::print(raw_ostream &OS, const TargetMachine *TM) const {
|
|||
OS << "imp-";
|
||||
OS << "def";
|
||||
NeedComma = true;
|
||||
// <def,read-undef> only makes sense when getSubReg() is set.
|
||||
// Don't clutter the output otherwise.
|
||||
if (isUndef() && getSubReg())
|
||||
OS << ",read-undef";
|
||||
} else if (isImplicit()) {
|
||||
OS << "imp-use";
|
||||
NeedComma = true;
|
||||
|
@ -271,7 +275,7 @@ void MachineOperand::print(raw_ostream &OS, const TargetMachine *TM) const {
|
|||
OS << "dead";
|
||||
NeedComma = true;
|
||||
}
|
||||
if (isUndef()) {
|
||||
if (isUndef() && isUse()) {
|
||||
if (NeedComma) OS << ',';
|
||||
OS << "undef";
|
||||
NeedComma = true;
|
||||
|
|
Loading…
Reference in New Issue