| Index: src/IceOperand.cpp
|
| diff --git a/src/IceOperand.cpp b/src/IceOperand.cpp
|
| index 7870d180b0b5e6458999f3818ff774775ab0726f..4a0ebe19e535bddc62d375ab6be32a9e4a14b647 100644
|
| --- a/src/IceOperand.cpp
|
| +++ b/src/IceOperand.cpp
|
| @@ -431,10 +431,13 @@ const InstDefList VariablesMetadata::NoDefinitions;
|
| // ======================== dump routines ======================== //
|
|
|
| void Variable::emit(const Cfg *Func) const {
|
| - Func->getTarget()->emitVariable(this);
|
| + if (ALLOW_DUMP)
|
| + Func->getTarget()->emitVariable(this);
|
| }
|
|
|
| void Variable::dump(const Cfg *Func, Ostream &Str) const {
|
| + if (!ALLOW_DUMP)
|
| + return;
|
| if (Func == NULL) {
|
| Str << "%" << getName();
|
| return;
|
| @@ -462,6 +465,8 @@ void Variable::dump(const Cfg *Func, Ostream &Str) const {
|
| }
|
|
|
| void ConstantRelocatable::emitWithoutDollar(GlobalContext *Ctx) const {
|
| + if (!ALLOW_DUMP)
|
| + return;
|
| Ostream &Str = Ctx->getStrEmit();
|
| if (SuppressMangling)
|
| Str << Name;
|
| @@ -475,12 +480,16 @@ void ConstantRelocatable::emitWithoutDollar(GlobalContext *Ctx) const {
|
| }
|
|
|
| void ConstantRelocatable::emit(GlobalContext *Ctx) const {
|
| + if (!ALLOW_DUMP)
|
| + return;
|
| Ostream &Str = Ctx->getStrEmit();
|
| Str << "$";
|
| emitWithoutDollar(Ctx);
|
| }
|
|
|
| void ConstantRelocatable::dump(const Cfg *Func, Ostream &Str) const {
|
| + if (!ALLOW_DUMP)
|
| + return;
|
| Str << "@";
|
| if (Func && !SuppressMangling) {
|
| Str << Func->getContext()->mangleName(Name);
|
| @@ -492,6 +501,8 @@ void ConstantRelocatable::dump(const Cfg *Func, Ostream &Str) const {
|
| }
|
|
|
| void LiveRange::dump(Ostream &Str) const {
|
| + if (!ALLOW_DUMP)
|
| + return;
|
| Str << "(weight=" << Weight << ") ";
|
| bool First = true;
|
| for (const RangeElementType &I : Range) {
|
| @@ -503,11 +514,15 @@ void LiveRange::dump(Ostream &Str) const {
|
| }
|
|
|
| Ostream &operator<<(Ostream &Str, const LiveRange &L) {
|
| + if (!ALLOW_DUMP)
|
| + return Str;
|
| L.dump(Str);
|
| return Str;
|
| }
|
|
|
| Ostream &operator<<(Ostream &Str, const RegWeight &W) {
|
| + if (!ALLOW_DUMP)
|
| + return Str;
|
| if (W.getWeight() == RegWeight::Inf)
|
| Str << "Inf";
|
| else
|
|
|