Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(512)

Unified Diff: src/IceTargetLoweringX8632.cpp

Issue 686913005: Turn off dump/emit routines when building minimal subzero. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Fix nits. Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/IceTargetLoweringX8632.cpp
diff --git a/src/IceTargetLoweringX8632.cpp b/src/IceTargetLoweringX8632.cpp
index cd40e096443558d3e03c90067d7cab57e495688a..82d20b422e22c7829a6f248469f88a0fd00c53bd 100644
--- a/src/IceTargetLoweringX8632.cpp
+++ b/src/IceTargetLoweringX8632.cpp
@@ -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();
}
« no previous file with comments | « src/IceRegAlloc.cpp ('k') | src/IceTimerTree.cpp » ('j') | tests_lit/reader_tests/alloca.ll » ('J')

Powered by Google App Engine
This is Rietveld 408576698