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

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 and format. 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
« no previous file with comments | « src/IceRegAlloc.cpp ('k') | src/IceTimerTree.cpp » ('j') | src/IceTypes.cpp » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/IceTargetLoweringX8632.cpp
diff --git a/src/IceTargetLoweringX8632.cpp b/src/IceTargetLoweringX8632.cpp
index ad8079293732d1830079d07f3ff185b7261d4c1f..5426a2d1e83578ec7985780a3af65e6458d805a7 100644
--- a/src/IceTargetLoweringX8632.cpp
+++ b/src/IceTargetLoweringX8632.cpp
@@ -879,7 +879,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";
@@ -977,6 +977,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);
@@ -1005,6 +1006,7 @@ template <typename T> void TargetX8632::emitConstantPool() const {
}
void TargetX8632::emitConstants() const {
+ // Note: Still used by emit IAS.
emitConstantPool<PoolTypeConverter<float> >();
emitConstantPool<PoolTypeConverter<double> >();
@@ -3547,6 +3549,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();
@@ -4612,6 +4616,8 @@ void TargetX8632::postLower() {
}
template <> void ConstantInteger32::emit(GlobalContext *Ctx) const {
+ if (!ALLOW_DUMP)
+ return;
Ostream &Str = Ctx->getStrEmit();
Str << "$" << (int32_t)getValue();
}
@@ -4621,11 +4627,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') | src/IceTypes.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698