From ffaee3755604e8227cefb209d4741f108ae16b0e Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Tue, 5 Aug 2003 03:59:01 +0000 Subject: [PATCH] No functional changes, comment the fix I just put in git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7590 91177308-0d34-0410-b5e6-96231b3b80d8 --- support/tools/TableGen/CodeEmitterGen.cpp | 9 +++++---- utils/TableGen/CodeEmitterGen.cpp | 9 +++++---- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/support/tools/TableGen/CodeEmitterGen.cpp b/support/tools/TableGen/CodeEmitterGen.cpp index f3b238c613c..b98e71216d4 100644 --- a/support/tools/TableGen/CodeEmitterGen.cpp +++ b/support/tools/TableGen/CodeEmitterGen.cpp @@ -54,9 +54,8 @@ void CodeEmitterGen::run(std::ostream &o) { std::map OpContinuous; for (unsigned i = 0, e = Vals.size(); i != e; ++i) { if (!Vals[i].getPrefix() && !Vals[i].getValue()->isComplete() && - /* ignore annul and predict bits since no one sets them yet */ - Vals[i].getName() != "annul" && Vals[i].getName() != "predict") - { + // ignore annul and predict bits since no one sets them yet + Vals[i].getName() != "annul" && Vals[i].getName() != "predict") { // Is the operand continuous? If so, we can just mask and OR it in // instead of doing it bit-by-bit, saving a lot in runtime cost. const BitsInit *InstInit = BI; @@ -112,6 +111,8 @@ void CodeEmitterGen::run(std::ostream &o) { } } + // If we have found no bit in "Inst" which comes from this field, then + // this is not an operand!! if (beginBitInInst != -1) { o << " // op" << op << ": " << Vals[i].getName() << "\n" << " int64_t op" << op @@ -164,7 +165,7 @@ void CodeEmitterGen::run(std::ostream &o) { // Scan through the field looking for bit initializers of the current // variable... for (int i = FieldInitializer->getNumBits()-1; i >= 0; --i) { - if (BitInit *BI=dynamic_cast(FieldInitializer->getBit(i))) + if (BitInit *BI = dynamic_cast(FieldInitializer->getBit(i))) { DEBUG(o << " // bit init: f: " << f << ", i: " << i << "\n"); } else if (UnsetInit *UI = diff --git a/utils/TableGen/CodeEmitterGen.cpp b/utils/TableGen/CodeEmitterGen.cpp index f3b238c613c..b98e71216d4 100644 --- a/utils/TableGen/CodeEmitterGen.cpp +++ b/utils/TableGen/CodeEmitterGen.cpp @@ -54,9 +54,8 @@ void CodeEmitterGen::run(std::ostream &o) { std::map OpContinuous; for (unsigned i = 0, e = Vals.size(); i != e; ++i) { if (!Vals[i].getPrefix() && !Vals[i].getValue()->isComplete() && - /* ignore annul and predict bits since no one sets them yet */ - Vals[i].getName() != "annul" && Vals[i].getName() != "predict") - { + // ignore annul and predict bits since no one sets them yet + Vals[i].getName() != "annul" && Vals[i].getName() != "predict") { // Is the operand continuous? If so, we can just mask and OR it in // instead of doing it bit-by-bit, saving a lot in runtime cost. const BitsInit *InstInit = BI; @@ -112,6 +111,8 @@ void CodeEmitterGen::run(std::ostream &o) { } } + // If we have found no bit in "Inst" which comes from this field, then + // this is not an operand!! if (beginBitInInst != -1) { o << " // op" << op << ": " << Vals[i].getName() << "\n" << " int64_t op" << op @@ -164,7 +165,7 @@ void CodeEmitterGen::run(std::ostream &o) { // Scan through the field looking for bit initializers of the current // variable... for (int i = FieldInitializer->getNumBits()-1; i >= 0; --i) { - if (BitInit *BI=dynamic_cast(FieldInitializer->getBit(i))) + if (BitInit *BI = dynamic_cast(FieldInitializer->getBit(i))) { DEBUG(o << " // bit init: f: " << f << ", i: " << i << "\n"); } else if (UnsetInit *UI =