Commit b6c96af1 by Karl Schimpf

Turn off dump/emit routines when building minimal subzero.

Remove the dump/emit routines when ALLOW_DUMP=0. Also fixes some verbosity messages to not print if ALLOW_DUMP=0. Note: emit routines needed for emitIAS are not turned off. BUG=None R=stichnot@chromium.org Review URL: https://codereview.chromium.org/686913005
parent 70d0a054
......@@ -14,6 +14,6 @@ include $(LEVEL)/Makefile.common
CXX.Flags += -std=c++11
CPP.Defines += -DALLOW_TEXT_ASM=1 -DALLOW_DUMP=1 -DALLOW_LLVM_CL=1 \
-DALLOW_LLVM_IR=1 -DALLOW_LLVM_IR_AS_INPUT=1
CPP.Defines += -DALLOW_DUMP=1 -DALLOW_LLVM_CL=1 -DALLOW_LLVM_IR=1 \
-DALLOW_LLVM_IR_AS_INPUT=1 -DALLOW_DISABLE_IR_GEN=1
......@@ -50,13 +50,11 @@ CXX_DEFINES =
ifdef MINIMAL
OBJDIR := $(OBJDIR)+Min
CXX_DEFINES += -DALLOW_TEXT_ASM=0 -DALLOW_DUMP=0 -DALLOW_LLVM_CL=0 \
-DALLOW_LLVM_IR=0 -DALLOW_LLVM_IR_AS_INPUT=0 \
-DALLOW_DISABLE_IR_GEN=0
CXX_DEFINES += -DALLOW_DUMP=0 -DALLOW_LLVM_CL=0 -DALLOW_LLVM_IR=0 \
-DALLOW_LLVM_IR_AS_INPUT=0 -DALLOW_DISABLE_IR_GEN=0
else
CXX_DEFINES += -DALLOW_TEXT_ASM=1 -DALLOW_DUMP=1 -DALLOW_LLVM_CL=1 \
-DALLOW_LLVM_IR=1 -DALLOW_LLVM_IR_AS_INPUT=1 \
-DALLOW_DISABLE_IR_GEN=1
CXX_DEFINES += -DALLOW_DUMP=1 -DALLOW_LLVM_CL=1 -DALLOW_LLVM_IR=1 \
-DALLOW_LLVM_IR_AS_INPUT=1 -DALLOW_DISABLE_IR_GEN=1
endif
ifdef NOASSERT
......
......@@ -396,6 +396,7 @@ void Cfg::doBranchOpt() {
// ======================== Dump routines ======================== //
void Cfg::emitTextHeader(const IceString &MangledName) {
// Note: Still used by emit IAS.
Ostream &Str = Ctx->getStrEmit();
Str << "\t.text\n";
if (Ctx->getFlags().FunctionSections)
......@@ -412,6 +413,8 @@ void Cfg::emitTextHeader(const IceString &MangledName) {
}
void Cfg::emit() {
if (!ALLOW_DUMP)
return;
TimerMarker T(TimerStack::TT_emit, this);
if (Ctx->getFlags().DecorateAsm) {
renumberInstructions();
......@@ -449,6 +452,8 @@ void Cfg::emitIAS() {
// Dumps the IR with an optional introductory message.
void Cfg::dump(const IceString &Message) {
if (!ALLOW_DUMP)
return;
if (!Ctx->isVerbose())
return;
Ostream &Str = Ctx->getStrDump();
......
......@@ -798,6 +798,8 @@ namespace {
void emitRegisterUsage(Ostream &Str, const Cfg *Func, const CfgNode *Node,
bool IsLiveIn, std::vector<SizeT> &LiveRegCount) {
if (!ALLOW_DUMP)
return;
Liveness *Liveness = Func->getLiveness();
const LivenessBV *Live;
if (IsLiveIn) {
......@@ -828,6 +830,8 @@ void emitRegisterUsage(Ostream &Str, const Cfg *Func, const CfgNode *Node,
void emitLiveRangesEnded(Ostream &Str, const Cfg *Func, const Inst *Instr,
std::vector<SizeT> &LiveRegCount) {
if (!ALLOW_DUMP)
return;
bool First = true;
Variable *Dest = Instr->getDest();
if (Dest && Dest->hasReg())
......@@ -873,6 +877,8 @@ void updateStats(Cfg *Func, const Inst *I) {
} // end of anonymous namespace
void CfgNode::emit(Cfg *Func) const {
if (!ALLOW_DUMP)
return;
Func->setCurrentNode(this);
Ostream &Str = Func->getContext()->getStrEmit();
Liveness *Liveness = Func->getLiveness();
......@@ -930,6 +936,8 @@ void CfgNode::emitIAS(Cfg *Func) const {
}
void CfgNode::dump(Cfg *Func) const {
if (!ALLOW_DUMP)
return;
Func->setCurrentNode(this);
Ostream &Str = Func->getContext()->getStrDump();
Liveness *Liveness = Func->getLiveness();
......
......@@ -439,6 +439,8 @@ void GlobalContext::setTimerName(TimerStackIdT StackID,
}
void GlobalContext::dumpStats(const IceString &Name, bool Final) {
if (!ALLOW_DUMP)
return;
if (Flags.DumpStats) {
if (Final) {
StatsCumulative.dump(Name, getStrDump());
......@@ -450,6 +452,8 @@ void GlobalContext::dumpStats(const IceString &Name, bool Final) {
}
void GlobalContext::dumpTimers(TimerStackIdT StackID, bool DumpCumulative) {
if (!ALLOW_DUMP)
return;
assert(Timers.size() > StackID);
Timers[StackID].dump(getStrDump(), DumpCumulative);
}
......
......@@ -48,6 +48,8 @@ public:
void updateSpills() { ++Spills; }
void updateFills() { ++Fills; }
void dump(const IceString &Name, Ostream &Str) {
if (!ALLOW_DUMP)
return;
Str << "|" << Name << "|Inst Count |" << InstructionsEmitted << "\n";
Str << "|" << Name << "|Regs Saved |" << RegistersSaved << "\n";
Str << "|" << Name << "|Frame Bytes |" << FrameBytes << "\n";
......
......@@ -27,6 +27,8 @@ char hexdigit(unsigned X) { return X < 10 ? '0' + X : 'A' + X - 10; }
void dumpLinkage(Ice::Ostream &Stream,
llvm::GlobalValue::LinkageTypes Linkage) {
if (!ALLOW_DUMP)
return;
switch (Linkage) {
case llvm::GlobalValue::ExternalLinkage:
Stream << "external";
......@@ -44,6 +46,8 @@ void dumpLinkage(Ice::Ostream &Stream,
}
void dumpCallingConv(Ice::Ostream &, llvm::CallingConv::ID CallingConv) {
if (!ALLOW_DUMP)
return;
if (CallingConv == llvm::CallingConv::C)
return;
std::string Buffer;
......@@ -65,10 +69,14 @@ FunctionDeclaration::create(GlobalContext *Ctx, const FuncSigType &Signature,
}
void FunctionDeclaration::dumpType(Ostream &Stream) const {
if (!ALLOW_DUMP)
return;
Stream << Signature;
}
void FunctionDeclaration::dump(GlobalContext *Ctx, Ostream &Stream) const {
if (!ALLOW_DUMP)
return;
if (IsProto)
Stream << "declare ";
::dumpLinkage(Stream, Linkage);
......@@ -95,6 +103,8 @@ VariableDeclaration::~VariableDeclaration() {
}
void VariableDeclaration::dumpType(Ostream &Stream) const {
if (!ALLOW_DUMP)
return;
if (Initializers.size() == 1) {
Initializers.front()->dumpType(Stream);
} else {
......@@ -113,6 +123,8 @@ void VariableDeclaration::dumpType(Ostream &Stream) const {
}
void VariableDeclaration::dump(GlobalContext *Ctx, Ostream &Stream) const {
if (!ALLOW_DUMP)
return;
Stream << "@" << ((Ctx && !getSuppressMangling())
? Ctx->mangleName(Name) : Name) << " = ";
::dumpLinkage(Stream, Linkage);
......@@ -143,11 +155,15 @@ void VariableDeclaration::dump(GlobalContext *Ctx, Ostream &Stream) const {
}
void VariableDeclaration::Initializer::dumpType(Ostream &Stream) const {
if (!ALLOW_DUMP)
return;
Stream << "[" << getNumBytes() << " x " << Ice::IceType_i8 << "]";
}
void VariableDeclaration::DataInitializer::dump(
GlobalContext *, Ostream &Stream) const {
if (!ALLOW_DUMP)
return;
dumpType(Stream);
Stream << " c\"";
// Code taken from PrintEscapedString() in AsmWriter.cpp. Keep
......@@ -164,16 +180,22 @@ void VariableDeclaration::DataInitializer::dump(
void VariableDeclaration::ZeroInitializer::dump(
GlobalContext *, Ostream &Stream) const {
if (!ALLOW_DUMP)
return;
dumpType(Stream);
Stream << " zeroinitializer";
}
void VariableDeclaration::RelocInitializer::dumpType(Ostream &Stream) const {
if (!ALLOW_DUMP)
return;
Stream << Ice::IceType_i32;
}
void VariableDeclaration::RelocInitializer::dump(
GlobalContext *Ctx, Ostream &Stream) const {
if (!ALLOW_DUMP)
return;
if (Offset != 0) {
dumpType(Stream);
Stream << " add (";
......
......@@ -61,6 +61,8 @@ public:
/// Prints out the global declaration.
virtual void dump(GlobalContext *Ctx, Ostream &Stream) const = 0;
void dump(Ostream &Stream) const {
if (!ALLOW_DUMP)
return;
GlobalContext *const Ctx = nullptr;
dump(Ctx, Stream);
}
......@@ -149,7 +151,8 @@ public:
virtual SizeT getNumBytes() const = 0;
virtual void dump(GlobalContext *Ctx, Ostream &Stream) const = 0;
void dump(Ostream &Stream) const {
dump(nullptr, Stream);
if (ALLOW_DUMP)
dump(nullptr, Stream);
}
virtual void dumpType(Ostream &Stream) const;
......
......@@ -449,9 +449,17 @@ InstFakeUse::InstFakeUse(Cfg *Func, Variable *Src)
InstFakeKill::InstFakeKill(Cfg *Func, const Inst *Linked)
: InstHighLevel(Func, Inst::FakeKill, 0, NULL), Linked(Linked) {}
Type InstCall::getReturnType() const {
if (Dest == NULL)
return IceType_void;
return Dest->getType();
}
// ======================== Dump routines ======================== //
void Inst::dumpDecorated(const Cfg *Func) const {
if (!ALLOW_DUMP)
return;
Ostream &Str = Func->getContext()->getStrDump();
if (!Func->getContext()->isVerbose(IceV_Deleted) &&
(isDeleted() || isRedundantAssign()))
......@@ -474,6 +482,8 @@ void Inst::dumpDecorated(const Cfg *Func) const {
}
void Inst::dump(const Cfg *Func) const {
if (!ALLOW_DUMP)
return;
Ostream &Str = Func->getContext()->getStrDump();
dumpDest(Func);
Str << " =~ ";
......@@ -481,6 +491,8 @@ void Inst::dump(const Cfg *Func) const {
}
void Inst::dumpExtras(const Cfg *Func) const {
if (!ALLOW_DUMP)
return;
Ostream &Str = Func->getContext()->getStrDump();
bool First = true;
// Print "LIVEEND={a,b,c}" for all source operands whose live ranges
......@@ -507,6 +519,8 @@ void Inst::dumpExtras(const Cfg *Func) const {
}
void Inst::dumpSources(const Cfg *Func) const {
if (!ALLOW_DUMP)
return;
Ostream &Str = Func->getContext()->getStrDump();
for (SizeT I = 0; I < getSrcSize(); ++I) {
if (I > 0)
......@@ -516,6 +530,8 @@ void Inst::dumpSources(const Cfg *Func) const {
}
void Inst::emitSources(const Cfg *Func) const {
if (!ALLOW_DUMP)
return;
Ostream &Str = Func->getContext()->getStrEmit();
for (SizeT I = 0; I < getSrcSize(); ++I) {
if (I > 0)
......@@ -525,11 +541,15 @@ void Inst::emitSources(const Cfg *Func) const {
}
void Inst::dumpDest(const Cfg *Func) const {
if (!ALLOW_DUMP)
return;
if (getDest())
getDest()->dump(Func);
}
void InstAlloca::dump(const Cfg *Func) const {
if (!ALLOW_DUMP)
return;
Ostream &Str = Func->getContext()->getStrDump();
dumpDest(Func);
Str << " = alloca i8, i32 ";
......@@ -539,6 +559,8 @@ void InstAlloca::dump(const Cfg *Func) const {
}
void InstArithmetic::dump(const Cfg *Func) const {
if (!ALLOW_DUMP)
return;
Ostream &Str = Func->getContext()->getStrDump();
dumpDest(Func);
Str << " = " << InstArithmeticAttributes[getOp()].DisplayString << " "
......@@ -547,6 +569,8 @@ void InstArithmetic::dump(const Cfg *Func) const {
}
void InstAssign::dump(const Cfg *Func) const {
if (!ALLOW_DUMP)
return;
Ostream &Str = Func->getContext()->getStrDump();
dumpDest(Func);
Str << " = " << getDest()->getType() << " ";
......@@ -554,6 +578,8 @@ void InstAssign::dump(const Cfg *Func) const {
}
void InstBr::dump(const Cfg *Func) const {
if (!ALLOW_DUMP)
return;
Ostream &Str = Func->getContext()->getStrDump();
dumpDest(Func);
Str << "br ";
......@@ -565,13 +591,9 @@ void InstBr::dump(const Cfg *Func) const {
Str << "label %" << getTargetFalse()->getName();
}
Type InstCall::getReturnType() const {
if (Dest == NULL)
return IceType_void;
return Dest->getType();
}
void InstCall::dump(const Cfg *Func) const {
if (!ALLOW_DUMP)
return;
Ostream &Str = Func->getContext()->getStrDump();
if (getDest()) {
dumpDest(Func);
......@@ -595,6 +617,8 @@ void InstCall::dump(const Cfg *Func) const {
}
void InstCast::dump(const Cfg *Func) const {
if (!ALLOW_DUMP)
return;
Ostream &Str = Func->getContext()->getStrDump();
dumpDest(Func);
Str << " = " << InstCastAttributes[getCastKind()].DisplayString << " "
......@@ -604,6 +628,8 @@ void InstCast::dump(const Cfg *Func) const {
}
void InstIcmp::dump(const Cfg *Func) const {
if (!ALLOW_DUMP)
return;
Ostream &Str = Func->getContext()->getStrDump();
dumpDest(Func);
Str << " = icmp " << InstIcmpAttributes[getCondition()].DisplayString << " "
......@@ -612,6 +638,8 @@ void InstIcmp::dump(const Cfg *Func) const {
}
void InstExtractElement::dump(const Cfg *Func) const {
if (!ALLOW_DUMP)
return;
Ostream &Str = Func->getContext()->getStrDump();
dumpDest(Func);
Str << " = extractelement ";
......@@ -623,6 +651,8 @@ void InstExtractElement::dump(const Cfg *Func) const {
}
void InstInsertElement::dump(const Cfg *Func) const {
if (!ALLOW_DUMP)
return;
Ostream &Str = Func->getContext()->getStrDump();
dumpDest(Func);
Str << " = insertelement ";
......@@ -637,6 +667,8 @@ void InstInsertElement::dump(const Cfg *Func) const {
}
void InstFcmp::dump(const Cfg *Func) const {
if (!ALLOW_DUMP)
return;
Ostream &Str = Func->getContext()->getStrDump();
dumpDest(Func);
Str << " = fcmp " << InstFcmpAttributes[getCondition()].DisplayString << " "
......@@ -645,6 +677,8 @@ void InstFcmp::dump(const Cfg *Func) const {
}
void InstLoad::dump(const Cfg *Func) const {
if (!ALLOW_DUMP)
return;
Ostream &Str = Func->getContext()->getStrDump();
dumpDest(Func);
Type Ty = getDest()->getType();
......@@ -654,6 +688,8 @@ void InstLoad::dump(const Cfg *Func) const {
}
void InstStore::dump(const Cfg *Func) const {
if (!ALLOW_DUMP)
return;
Ostream &Str = Func->getContext()->getStrDump();
Type Ty = getData()->getType();
Str << "store " << Ty << " ";
......@@ -664,6 +700,8 @@ void InstStore::dump(const Cfg *Func) const {
}
void InstSwitch::dump(const Cfg *Func) const {
if (!ALLOW_DUMP)
return;
Ostream &Str = Func->getContext()->getStrDump();
Type Ty = getComparison()->getType();
Str << "switch " << Ty << " ";
......@@ -677,6 +715,8 @@ void InstSwitch::dump(const Cfg *Func) const {
}
void InstPhi::dump(const Cfg *Func) const {
if (!ALLOW_DUMP)
return;
Ostream &Str = Func->getContext()->getStrDump();
dumpDest(Func);
Str << " = phi " << getDest()->getType() << " ";
......@@ -690,6 +730,8 @@ void InstPhi::dump(const Cfg *Func) const {
}
void InstRet::dump(const Cfg *Func) const {
if (!ALLOW_DUMP)
return;
Ostream &Str = Func->getContext()->getStrDump();
Type Ty = hasRetValue() ? getRetValue()->getType() : IceType_void;
Str << "ret " << Ty;
......@@ -700,6 +742,8 @@ void InstRet::dump(const Cfg *Func) const {
}
void InstSelect::dump(const Cfg *Func) const {
if (!ALLOW_DUMP)
return;
Ostream &Str = Func->getContext()->getStrDump();
dumpDest(Func);
Operand *Condition = getCondition();
......@@ -714,11 +758,15 @@ void InstSelect::dump(const Cfg *Func) const {
}
void InstUnreachable::dump(const Cfg *Func) const {
if (!ALLOW_DUMP)
return;
Ostream &Str = Func->getContext()->getStrDump();
Str << "unreachable";
}
void InstFakeDef::emit(const Cfg *Func) const {
if (!ALLOW_DUMP)
return;
// Go ahead and "emit" these for now, since they are relatively
// rare.
Ostream &Str = Func->getContext()->getStrEmit();
......@@ -729,6 +777,8 @@ void InstFakeDef::emit(const Cfg *Func) const {
}
void InstFakeDef::dump(const Cfg *Func) const {
if (!ALLOW_DUMP)
return;
Ostream &Str = Func->getContext()->getStrDump();
dumpDest(Func);
Str << " = def.pseudo ";
......@@ -738,6 +788,8 @@ void InstFakeDef::dump(const Cfg *Func) const {
void InstFakeUse::emit(const Cfg *Func) const { (void)Func; }
void InstFakeUse::dump(const Cfg *Func) const {
if (!ALLOW_DUMP)
return;
Ostream &Str = Func->getContext()->getStrDump();
Str << "use.pseudo ";
dumpSources(Func);
......@@ -746,6 +798,8 @@ void InstFakeUse::dump(const Cfg *Func) const {
void InstFakeKill::emit(const Cfg *Func) const { (void)Func; }
void InstFakeKill::dump(const Cfg *Func) const {
if (!ALLOW_DUMP)
return;
Ostream &Str = Func->getContext()->getStrDump();
if (Linked->isDeleted())
Str << "// ";
......@@ -753,6 +807,8 @@ void InstFakeKill::dump(const Cfg *Func) const {
}
void InstTarget::dump(const Cfg *Func) const {
if (!ALLOW_DUMP)
return;
Ostream &Str = Func->getContext()->getStrDump();
Str << "[TARGET] ";
Inst::dump(Func);
......
......@@ -838,8 +838,8 @@ protected:
// Override the default ilist traits so that Inst's private ctor and
// deleted dtor aren't invoked.
template <>
struct llvm::ilist_traits<Ice::Inst> : public llvm::ilist_default_traits<
Ice::Inst> {
struct llvm::ilist_traits<Ice::Inst>
: public llvm::ilist_default_traits<Ice::Inst> {
Ice::Inst *createSentinel() const {
return static_cast<Ice::Inst *>(&Sentinel);
}
......
......@@ -41,7 +41,8 @@ public:
};
using Operand::dump;
void dump(const Cfg *, Ostream &Str) const override {
Str << "<OperandX8632>";
if (ALLOW_DUMP)
Str << "<OperandX8632>";
}
protected:
......@@ -465,6 +466,8 @@ public:
InstX8632InplaceopGPR(Func, SrcDest);
}
void emit(const Cfg *Func) const override {
if (!ALLOW_DUMP)
return;
Ostream &Str = Func->getContext()->getStrEmit();
assert(getSrcSize() == 1);
Str << "\t" << Opcode << "\t";
......@@ -477,6 +480,8 @@ public:
emitIASOpTyGPR(Func, Ty, Var, Emitter);
}
void dump(const Cfg *Func) const override {
if (!ALLOW_DUMP)
return;
Ostream &Str = Func->getContext()->getStrDump();
dumpDest(Func);
Str << " = " << Opcode << "." << getDest()->getType() << " ";
......@@ -513,6 +518,8 @@ public:
InstX8632UnaryopGPR(Func, Dest, Src);
}
void emit(const Cfg *Func) const override {
if (!ALLOW_DUMP)
return;
Ostream &Str = Func->getContext()->getStrEmit();
assert(getSrcSize() == 1);
Type SrcTy = getSrc(0)->getType();
......@@ -536,6 +543,8 @@ public:
emitIASRegOpTyGPR(Func, Ty, Var, Src, Emitter);
}
void dump(const Cfg *Func) const override {
if (!ALLOW_DUMP)
return;
Ostream &Str = Func->getContext()->getStrDump();
dumpDest(Func);
Str << " = " << Opcode << "." << getSrc(0)->getType() << " ";
......@@ -568,6 +577,8 @@ public:
InstX8632UnaryopXmm(Func, Dest, Src);
}
void emit(const Cfg *Func) const override {
if (!ALLOW_DUMP)
return;
Ostream &Str = Func->getContext()->getStrEmit();
assert(getSrcSize() == 1);
Str << "\t" << Opcode << "\t";
......@@ -581,6 +592,8 @@ public:
emitIASRegOpTyXMM(Func, Ty, getDest(), getSrc(0), Emitter);
}
void dump(const Cfg *Func) const override {
if (!ALLOW_DUMP)
return;
Ostream &Str = Func->getContext()->getStrDump();
dumpDest(Func);
Str << " = " << Opcode << "." << getDest()->getType() << " ";
......@@ -620,6 +633,8 @@ public:
InstX8632BinopGPRShift(Func, Dest, Source);
}
void emit(const Cfg *Func) const override {
if (!ALLOW_DUMP)
return;
const bool ShiftHack = true;
emitTwoAddress(Opcode, this, Func, ShiftHack);
}
......@@ -629,6 +644,8 @@ public:
emitIASGPRShift(Func, Ty, getDest(), getSrc(1), Emitter);
}
void dump(const Cfg *Func) const override {
if (!ALLOW_DUMP)
return;
Ostream &Str = Func->getContext()->getStrDump();
dumpDest(Func);
Str << " = " << Opcode << "." << getDest()->getType() << " ";
......@@ -659,6 +676,8 @@ public:
InstX8632BinopGPR(Func, Dest, Source);
}
void emit(const Cfg *Func) const override {
if (!ALLOW_DUMP)
return;
const bool ShiftHack = false;
emitTwoAddress(Opcode, this, Func, ShiftHack);
}
......@@ -668,6 +687,8 @@ public:
emitIASRegOpTyGPR(Func, Ty, getDest(), getSrc(1), Emitter);
}
void dump(const Cfg *Func) const override {
if (!ALLOW_DUMP)
return;
Ostream &Str = Func->getContext()->getStrDump();
dumpDest(Func);
Str << " = " << Opcode << "." << getDest()->getType() << " ";
......@@ -698,6 +719,8 @@ public:
InstX8632BinopXmm(Func, Dest, Source);
}
void emit(const Cfg *Func) const override {
if (!ALLOW_DUMP)
return;
const bool ShiftHack = false;
emitTwoAddress(Opcode, this, Func, ShiftHack);
}
......@@ -709,6 +732,8 @@ public:
emitIASRegOpTyXMM(Func, Ty, getDest(), getSrc(1), Emitter);
}
void dump(const Cfg *Func) const override {
if (!ALLOW_DUMP)
return;
Ostream &Str = Func->getContext()->getStrDump();
dumpDest(Func);
Str << " = " << Opcode << "." << getDest()->getType() << " ";
......@@ -744,6 +769,8 @@ public:
InstX8632BinopXmmShift(Func, Dest, Source);
}
void emit(const Cfg *Func) const override {
if (!ALLOW_DUMP)
return;
const bool ShiftHack = false;
emitTwoAddress(Opcode, this, Func, ShiftHack);
}
......@@ -756,6 +783,8 @@ public:
emitIASXmmShift(Func, ElementTy, getDest(), getSrc(1), Emitter);
}
void dump(const Cfg *Func) const override {
if (!ALLOW_DUMP)
return;
Ostream &Str = Func->getContext()->getStrDump();
dumpDest(Func);
Str << " = " << Opcode << "." << getDest()->getType() << " ";
......@@ -786,6 +815,8 @@ public:
InstX8632Ternop(Func, Dest, Source1, Source2);
}
void emit(const Cfg *Func) const override {
if (!ALLOW_DUMP)
return;
Ostream &Str = Func->getContext()->getStrEmit();
assert(getSrcSize() == 3);
Str << "\t" << Opcode << "\t";
......@@ -797,6 +828,8 @@ public:
}
void emitIAS(const Cfg *Func) const override;
void dump(const Cfg *Func) const override {
if (!ALLOW_DUMP)
return;
Ostream &Str = Func->getContext()->getStrDump();
dumpDest(Func);
Str << " = " << Opcode << "." << getDest()->getType() << " ";
......@@ -828,6 +861,8 @@ public:
InstX8632ThreeAddressop(Func, Dest, Source0, Source1);
}
void emit(const Cfg *Func) const override {
if (!ALLOW_DUMP)
return;
Ostream &Str = Func->getContext()->getStrEmit();
assert(getSrcSize() == 2);
Str << "\t" << Opcode << "\t";
......@@ -839,6 +874,8 @@ public:
}
void emitIAS(const Cfg *Func) const override;
void dump(const Cfg *Func) const override {
if (!ALLOW_DUMP)
return;
Ostream &Str = Func->getContext()->getStrDump();
dumpDest(Func);
Str << " = " << Opcode << "." << getDest()->getType() << " ";
......@@ -877,6 +914,8 @@ public:
void emit(const Cfg *Func) const override;
void emitIAS(const Cfg *Func) const override;
void dump(const Cfg *Func) const override {
if (!ALLOW_DUMP)
return;
Ostream &Str = Func->getContext()->getStrDump();
Str << Opcode << "." << getDest()->getType() << " ";
dumpDest(Func);
......
......@@ -427,10 +427,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;
......@@ -458,6 +461,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;
......@@ -471,12 +476,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);
......@@ -488,6 +497,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) {
......@@ -499,11 +510,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
......
......@@ -65,10 +65,15 @@ public:
// situation where Func==NULL.
virtual void dump(const Cfg *Func, Ostream &Str) const = 0;
void dump(const Cfg *Func) const {
if (!ALLOW_DUMP)
return;
assert(Func);
dump(Func, Func->getContext()->getStrDump());
}
void dump(Ostream &Str) const { dump(NULL, Str); }
void dump(Ostream &Str) const {
if (ALLOW_DUMP)
dump(NULL, Str);
}
// Query whether this object was allocated in isolation, or added to
// some higher-level pool. This determines whether a containing
......@@ -148,7 +153,10 @@ public:
// specialization.
void emit(GlobalContext *Ctx) const override;
using Constant::dump;
void dump(const Cfg *, Ostream &Str) const override { Str << getValue(); }
void dump(const Cfg *, Ostream &Str) const override {
if (ALLOW_DUMP)
Str << getValue();
}
static bool classof(const Operand *Operand) {
return Operand->getKind() == K;
......@@ -167,6 +175,8 @@ typedef ConstantPrimitive<float, Operand::kConstFloat> ConstantFloat;
typedef ConstantPrimitive<double, Operand::kConstDouble> ConstantDouble;
template <> inline void ConstantInteger32::dump(const Cfg *, Ostream &Str) const {
if (!ALLOW_DUMP)
return;
if (getType() == IceType_i1)
Str << (getValue() ? "true" : "false");
else
......@@ -174,6 +184,8 @@ template <> inline void ConstantInteger32::dump(const Cfg *, Ostream &Str) const
}
template <> inline void ConstantInteger64::dump(const Cfg *, Ostream &Str) const {
if (!ALLOW_DUMP)
return;
assert(getType() == IceType_i64);
Str << static_cast<int64_t>(getValue());
}
......@@ -259,7 +271,10 @@ public:
using Constant::dump;
// The target needs to implement this.
void emit(GlobalContext *Ctx) const override;
void dump(const Cfg *, Ostream &Str) const override { Str << "undef"; }
void dump(const Cfg *, Ostream &Str) const override {
if (ALLOW_DUMP)
Str << "undef";
}
static bool classof(const Operand *Operand) {
return Operand->getKind() == kConstUndef;
......
......@@ -46,6 +46,8 @@ bool overlapsDefs(const Cfg *Func, const Variable *Item, const Variable *Var) {
void dumpDisableOverlap(const Cfg *Func, const Variable *Var,
const char *Reason) {
if (!ALLOW_DUMP)
return;
if (Func->getContext()->isVerbose(IceV_LinearScan)) {
VariablesMetadata *VMetadata = Func->getVMetadata();
Ostream &Str = Func->getContext()->getStrDump();
......@@ -62,6 +64,8 @@ void dumpDisableOverlap(const Cfg *Func, const Variable *Var,
}
void dumpLiveRange(const Variable *Var, const Cfg *Func) {
if (!ALLOW_DUMP)
return;
Ostream &Str = Func->getContext()->getStrDump();
const static size_t BufLen = 30;
char buf[BufLen];
......@@ -252,7 +256,8 @@ void LinearScan::scan(const llvm::SmallBitVector &RegMaskFull) {
TimerMarker T(TimerStack::TT_linearScan, Func);
assert(RegMaskFull.any()); // Sanity check
Ostream &Str = Func->getContext()->getStrDump();
bool Verbose = Func->getContext()->isVerbose(IceV_LinearScan);
const bool Verbose =
ALLOW_DUMP && Func->getContext()->isVerbose(IceV_LinearScan);
Func->resetCurrentNode();
VariablesMetadata *VMetadata = Func->getVMetadata();
......@@ -691,6 +696,8 @@ void LinearScan::scan(const llvm::SmallBitVector &RegMaskFull) {
// ======================== Dump routines ======================== //
void LinearScan::dump(Cfg *Func) const {
if (!ALLOW_DUMP)
return;
Ostream &Str = Func->getContext()->getStrDump();
if (!Func->getContext()->isVerbose(IceV_LinearScan))
return;
......
......@@ -898,7 +898,7 @@ void TargetX8632::addProlog(CfgNode *Node) {
Var->setStackOffset(Linked->getStackOffset());
}
if (Func->getContext()->isVerbose(IceV_Frame)) {
if (ALLOW_DUMP && Func->getContext()->isVerbose(IceV_Frame)) {
Ostream &Str = Func->getContext()->getStrDump();
Str << "Stack layout:\n";
......@@ -996,6 +996,7 @@ const char *PoolTypeConverter<double>::AsmTag = ".quad";
const char *PoolTypeConverter<double>::PrintfString = "0x%llx";
template <typename T> void TargetX8632::emitConstantPool() const {
// Note: Still used by emit IAS.
Ostream &Str = Ctx->getStrEmit();
Type Ty = T::Ty;
SizeT Align = typeAlignInBytes(Ty);
......@@ -1024,6 +1025,7 @@ template <typename T> void TargetX8632::emitConstantPool() const {
}
void TargetX8632::emitConstants() const {
// Note: Still used by emit IAS.
emitConstantPool<PoolTypeConverter<float> >();
emitConstantPool<PoolTypeConverter<double> >();
......@@ -3561,6 +3563,8 @@ bool isAdd(const Inst *Inst) {
void dumpAddressOpt(const Cfg *Func, const Variable *Base,
const Variable *Index, uint16_t Shift, int32_t Offset,
const Inst *Reason) {
if (!ALLOW_DUMP)
return;
if (!Func->getContext()->isVerbose(IceV_AddrOpt))
return;
Ostream &Str = Func->getContext()->getStrDump();
......@@ -4528,6 +4532,8 @@ void TargetX8632::postLower() {
}
template <> void ConstantInteger32::emit(GlobalContext *Ctx) const {
if (!ALLOW_DUMP)
return;
Ostream &Str = Ctx->getStrEmit();
Str << "$" << (int32_t)getValue();
}
......@@ -4537,11 +4543,15 @@ template <> void ConstantInteger64::emit(GlobalContext *) const {
}
template <> void ConstantFloat::emit(GlobalContext *Ctx) const {
if (!ALLOW_DUMP)
return;
Ostream &Str = Ctx->getStrEmit();
Str << ".L$" << IceType_f32 << "$" << getPoolEntryID();
}
template <> void ConstantDouble::emit(GlobalContext *Ctx) const {
if (!ALLOW_DUMP)
return;
Ostream &Str = Ctx->getStrEmit();
Str << ".L$" << IceType_f64 << "$" << getPoolEntryID();
}
......
......@@ -127,6 +127,8 @@ typedef std::multimap<double, IceString> DumpMapType;
// Dump the Map items in reverse order of their time contribution.
void dumpHelper(Ostream &Str, const DumpMapType &Map, double TotalTime) {
if (!ALLOW_DUMP)
return;
// TODO(stichnot): Use llvm::make_range with LLVM 3.5.
for (auto I = Map.rbegin(), E = Map.rend(); I != E; ++I) {
char buf[80];
......@@ -142,6 +144,8 @@ void dumpHelper(Ostream &Str, const DumpMapType &Map, double TotalTime) {
// MaxVal=5 ==> "[%1lu] "
// MaxVal=9876 ==> "[%4lu] "
void makePrintfFormatString(char *Buf, size_t BufLen, size_t MaxVal) {
if (!ALLOW_DUMP)
return;
int NumDigits = 0;
do {
++NumDigits;
......@@ -153,6 +157,8 @@ void makePrintfFormatString(char *Buf, size_t BufLen, size_t MaxVal) {
} // end of anonymous namespace
void TimerStack::dump(Ostream &Str, bool DumpCumulative) {
if (!ALLOW_DUMP)
return;
const bool UpdateCounts = true;
update(UpdateCounts);
double TotalTime = LastTimestamp - FirstTimestamp;
......
......@@ -106,8 +106,8 @@ void Translator::lowerGlobals(
llvm::OwningPtr<TargetGlobalInitLowering> GlobalLowering(
TargetGlobalInitLowering::createLowering(Ctx->getTargetArch(), Ctx));
bool DisableTranslation = Ctx->getFlags().DisableTranslation;
bool DumpGlobalVariables =
Ctx->isVerbose() && Ctx->getFlags().VerboseFocusOn.empty();
const bool DumpGlobalVariables =
ALLOW_DUMP && Ctx->isVerbose() && Ctx->getFlags().VerboseFocusOn.empty();
Ostream &Stream = Ctx->getStrDump();
const IceString &TranslateOnly = Ctx->getFlags().TranslateOnly;
for (const Ice::VariableDeclaration *Global : VariableDeclarations) {
......
......@@ -260,6 +260,8 @@ const char *typeString(Type Ty) {
}
void FuncSigType::dump(Ostream &Stream) const {
if (!ALLOW_DUMP)
return;
Stream << ReturnType << " (";
bool IsFirst = true;
for (const Type ArgTy : ArgList) {
......
......@@ -87,11 +87,15 @@ private:
};
Ice::Ostream &operator<<(Ice::Ostream &Stream, const ExtendedType &Ty) {
if (!ALLOW_DUMP)
return Stream;
Ty.dump(Stream);
return Stream;
}
Ice::Ostream &operator<<(Ice::Ostream &Stream, ExtendedType::TypeKind Kind) {
if (!ALLOW_DUMP)
return Stream;
Stream << "ExtendedType::";
switch (Kind) {
case ExtendedType::Undefined:
......@@ -138,6 +142,8 @@ public:
};
void ExtendedType::dump(Ice::Ostream &Stream) const {
if (!ALLOW_DUMP)
return;
Stream << Kind;
switch (Kind) {
case Simple: {
......@@ -545,7 +551,13 @@ protected:
std::string Buffer;
raw_string_ostream StrBuf(Buffer);
StrBuf << "(" << format("%" PRIu64 ":%u", (Bit / 8),
static_cast<unsigned>(Bit % 8)) << ") " << Message;
static_cast<unsigned>(Bit % 8)) << ") ";
// Note: If dump routines have been turned off, the error messages
// will not be readable. Hence, replace with simple error.
if (ALLOW_DUMP)
StrBuf << Message;
else
StrBuf << "Invalid input record";
return Context->Error(StrBuf.str());
}
......@@ -1394,6 +1406,8 @@ private:
void dumpVectorIndexCheckValue(raw_ostream &Stream,
VectorIndexCheckValue Value) const {
if (!ALLOW_DUMP)
return;
switch (Value) {
default:
report_fatal_error("Unknown VectorIndexCheckValue");
......
......@@ -192,8 +192,7 @@ static int GetReturnValue(int Val) {
static struct {
const char *FlagName;
int FlagValue;
} ConditionalBuildAttributes[] = {{"text_asm", ALLOW_TEXT_ASM},
{"dump", ALLOW_DUMP},
} ConditionalBuildAttributes[] = {{"dump", ALLOW_DUMP},
{"llvm_cl", ALLOW_LLVM_CL},
{"llvm_ir", ALLOW_LLVM_IR},
{"llvm_ir_as_input", ALLOW_LLVM_IR_AS_INPUT},
......@@ -236,8 +235,12 @@ int main(int argc, char **argv) {
DisableTranslation = true;
Ice::VerboseMask VMask = Ice::IceV_None;
for (unsigned i = 0; i != VerboseList.size(); ++i)
VMask |= VerboseList[i];
// Don't generate verbose messages if routines
// to dump messages are not available.
if (ALLOW_DUMP) {
for (unsigned i = 0; i != VerboseList.size(); ++i)
VMask |= VerboseList[i];
}
std::ofstream Ofs;
if (OutputFilename != "-") {
......
; This is a very early test that just checks the representation of i32
; arithmetic instructions. No assembly tests are done.
; REQUIRES: allow_dump
; RUN: %p2i -i %s --args --verbose inst -ias=0 | FileCheck %s
define i32 @Add(i32 %a, i32 %b) {
......
......@@ -4,6 +4,8 @@
; we don't lower to a cmp instructions with an immediate as the first
; source operand.
; REQUIRES: allow_dump
; RUN: %p2i -i %s --args -O2 --verbose inst | FileCheck %s
; RUN: %p2i -i %s --args -Om1 --verbose inst | FileCheck %s
......
; Test of global initializers.
; REQUIRES: allow_dump
; Test -ias=0 to test the lea "hack" until we are fully confident in -ias=1
; RUN: %p2i -i %s --args --verbose none -ias=0 | FileCheck %s
......
; Tests if we handle global variables with relocation initializers.
; REQUIRES: allow_dump
; Test that we handle it in the ICE converter.
; RUN: %lc2i -i %s --args -verbose inst | %iflc FileCheck %s
......
; Simple test of the load instruction.
; REQUIRES: allow_dump
; RUN: %p2i -i %s --args --verbose inst | FileCheck %s
define void @load_i64(i32 %addr_arg) {
......
; This is a smoke test of nop insertion.
; REQUIRES: allow_dump
; Don't use integrated-as because this currently depends on the # variant
; assembler comment.
; RUN: %p2i -i %s -a -rng-seed=1 -nop-insertion -nop-insertion-percentage=50 \
......
; Simple test of the store instruction.
; REQUIRES: allow_dump
; RUN: %p2i -i %s --args --verbose inst | FileCheck %s
define void @store_i64(i32 %addr_arg) {
......
; Test if we can read alloca instructions.
; REQUIRES: allow_dump
; RUN: %p2i -i %s --insts | FileCheck %s
; RUN: %if --need=allow_disable_ir_gen --command \
; RUN: %p2i -i %s --args -notranslate -timing -no-ir-gen \
......
; Tests if we can read binary operators.
; REQUIRES: allow_dump
; RUN: %p2i -i %s --insts | FileCheck %s
; RUN: %l2i -i %s --insts | %ifl FileCheck %s
; RUN: %lc2i -i %s --insts | %iflc FileCheck %s
......
; Tests if we handle a branch instructions.
; REQUIRES: allow_dump
; RUN: %p2i -i %s --insts | FileCheck %s
; RUN: %if --need=allow_disable_ir_gen --command \
; RUN: %p2i -i %s --args -notranslate -timing -no-ir-gen \
......
; Test parsing indirect calls in Subzero.
; REQUIRES: allow_dump
; RUN: %p2i -i %s --insts | FileCheck %s
; RUN: %if --need=allow_disable_ir_gen --command \
; RUN: %p2i -i %s --args -notranslate -timing -no-ir-gen \
......
; Test handling of call instructions.
; REQUIRES: allow_dump
; RUN: %p2i -i %s --insts | FileCheck %s
; RUN: %if --need=allow_disable_ir_gen --command \
; RUN: %p2i -i %s --args -notranslate -timing -no-ir-gen \
......
; Tests if we can read cast operations.
; REQUIRES: allow_dump
; RUN: %p2i -i %s --insts --no-local-syms | FileCheck %s
; RUN: %if --need=allow_disable_ir_gen --command \
; RUN: %p2i -i %s --args -notranslate -timing -no-ir-gen \
......
; Test if we can read compare instructions.
; REQUIRES: allow_dump
; RUN: %p2i -i %s --insts | FileCheck %s
; RUN: %if --need=allow_disable_ir_gen --command \
; RUN: %p2i -i %s --args -notranslate -timing -no-ir-gen \
......
; Test handling of constants in function blocks.
; REQUIRES: allow_dump
; RUN: %p2i -i %s --insts | FileCheck %s
; RUN: %if --need=allow_disable_ir_gen --command \
; RUN: %p2i -i %s --args -notranslate -timing -no-ir-gen \
......
; Test use forward type references in function blocks.
; REQUIRES: allow_dump
; RUN: %p2i -i %s --insts | FileCheck %s
; RUN: llvm-as < %s | pnacl-freeze | pnacl-bcdis -no-records \
; RUN: | FileCheck --check-prefix=DUMP %s
......
; Test of global initializers.
; REQUIRES: allow_dump
; RUN: %p2i -i %s --insts | FileCheck %s
; RUN: %l2i -i %s --insts | %ifl FileCheck %s
; RUN: %lc2i -i %s --insts | %iflc FileCheck %s
......
; Tests if we handle global variables with relocation initializers.
; REQUIRES: allow_dump
; RUN: %p2i -i %s --insts | FileCheck %s
; RUN: %l2i -i %s --insts | %ifl FileCheck %s
; RUN: %lc2i -i %s --insts | %iflc FileCheck %s
......
......@@ -2,7 +2,9 @@
; errors when malformed. Note: We can only test literal indexing since
; llvm-as will not allow other bad forms of these instructions.
; RUN: llvm-as < %s | pnacl-freeze | not %llvm2ice -notranslate \
; REQUIRES: allow_dump
; RUN: llvm-as < %s | pnacl-freeze \
; RUN: | not %llvm2ice -notranslate -build-on-read \
; RUN: -allow-pnacl-reader-error-recovery | FileCheck %s
define void @ExtractV4xi1(<4 x i1> %v, i32 %i) {
......
; Tests insertelement and extractelement vector instructions.
; REQUIRES: allow_dump
; RUN: %p2i -i %s --insts | FileCheck %s
; RUN: %l2i -i %s --insts | %ifl FileCheck %s
; RUN: %lc2i -i %s --insts | %iflc FileCheck %s
......
; Test if we can read load instructions.
; REQUIRES: allow_dump
; RUN: %p2i --no-local-syms -i %s --insts | FileCheck %s
; RUN: %if --need=allow_disable_ir_gen --command \
; RUN: %p2i -i %s --args -notranslate -timing -no-ir-gen \
......
; Test parsing NaCl atomic instructions.
; REQUIRES: allow_dump
; RUN: %p2i -i %s --insts | FileCheck %s
; RUN: %if --need=allow_disable_ir_gen --command \
; RUN: %p2i -i %s --args -notranslate -timing -no-ir-gen \
......
......@@ -3,11 +3,26 @@
; TODO(kschimpf) Find way to run this through p2i. Note: Can't do this
; currently because run-llvm2ice.py raises exception on error,
; and output is lost.
; RUN: llvm-as < %s | pnacl-freeze -allow-local-symbol-tables \
; RUN: | not %llvm2ice -notranslate -verbose=inst \
; RUN: -allow-pnacl-reader-error-recovery \
; RUN: -allow-local-symbol-tables \
; RUN: | FileCheck %s
; RUN: %if --need=allow_dump --command \
; RUN: llvm-as < %s \
; RUN: | %if --need=allow_dump --command \
; RUN: pnacl-freeze -allow-local-symbol-tables \
; RUN: | %if --need=allow_dump --command \
; RUN: not %llvm2ice -notranslate -verbose=inst -build-on-read \
; RUN: -allow-pnacl-reader-error-recovery \
; RUN: -allow-local-symbol-tables \
; RUN: | %if --need=allow_dump --command \
; RUN: FileCheck %s
; RUN: %if --need=no_dump --command \
; RUN: llvm-as < %s \
; RUN: | %if --need=no_dump --command \
; RUN: pnacl-freeze -allow-local-symbol-tables \
; RUN: | %if --need=no_dump --command \
; RUN: not %llvm2ice -notranslate -verbose=inst -build-on-read \
; RUN: -allow-pnacl-reader-error-recovery -allow-local-symbol-tables \
; RUN: | %if --need=no_dump --command \
; RUN: FileCheck --check-prefix=MIN %s
declare i32 @llvm.fake.i32(i32)
......@@ -16,5 +31,6 @@ define i32 @testFake(i32 %v) {
ret i32 %r
}
; CHECK: Error: (218:6) Invalid PNaCl intrinsic call to llvm.fake.i32
; CHECK: Error: ({{.*}}) Invalid PNaCl intrinsic call to llvm.fake.i32
; MIN: Error: ({{.*}}) Invalid input record
; This tests parsing NaCl intrinsics not related to atomic operations.
; REQUIRES: allow_dump
; RUN: %p2i -i %s --insts | FileCheck %s
; RUN: %if --need=allow_disable_ir_gen --command \
; RUN: %p2i -i %s --args -notranslate -timing -no-ir-gen \
......
; Test reading phi instructions.
; REQUIRES: allow_dump
; RUN: %p2i -i %s --insts | FileCheck %s
; RUN: %if --need=allow_disable_ir_gen --command \
; RUN: %p2i -i %s --args -notranslate -timing -no-ir-gen \
......
; Tests if we can read select instructions.
; REQUIRES: allow_dump
; RUN: %p2i -i %s --insts | FileCheck %s
; RUN: %if --need=allow_disable_ir_gen --command \
; RUN: %p2i -i %s --args -notranslate -timing -no-ir-gen \
......
; Test if we can read store instructions.
; REQUIRES: allow_dump
; RUN: %p2i -i %s --insts --no-local-syms | FileCheck %s
; RUN: %if --need=allow_disable_ir_gen --command \
; RUN: %p2i -i %s --args -notranslate -timing -no-ir-gen \
......
; Test switch instructions.
; REQUIRES: allow_dump
; RUN: %p2i -i %s --insts | FileCheck %s
; RUN: %if --need=allow_disable_ir_gen --command \
; RUN: %p2i -i %s --args -notranslate -timing -no-ir-gen \
......
; Tests that we name unnamed global addresses.
; REQUIRES: allow_dump
; Check that Subzero's bitcode reader handles renaming correctly.
; RUN: %p2i --no-local-syms -i %s --insts | FileCheck %s
; RUN: %l2i --no-local-syms -i %s --insts | %ifl FileCheck %s
......
; Test parsing unreachable instruction.
; REQUIRES: allow_dump
; RUN: %p2i -i %s --insts | FileCheck %s
; RUN: %if --need=allow_disable_ir_gen --command \
; RUN: %p2i -i %s --args -notranslate -timing -no-ir-gen \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment