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

Unified Diff: src/IceTargetLoweringX86BaseImpl.h

Issue 1197863003: Subzero: Reduce the amount of #ifdef'd code. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Use constexpr inline functions instead of macros Created 5 years, 6 months 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/IceTargetLoweringX86BaseImpl.h
diff --git a/src/IceTargetLoweringX86BaseImpl.h b/src/IceTargetLoweringX86BaseImpl.h
index b787c03b4572e9d166ee96b3d8cf90cf63cf5e23..5a3a364cb9cf9375b003bcdf5939194c73b7f5b9 100644
--- a/src/IceTargetLoweringX86BaseImpl.h
+++ b/src/IceTargetLoweringX86BaseImpl.h
@@ -249,7 +249,7 @@ BoolFolding<MachineTraits>::getProducerFor(const Operand *Opnd) const {
template <class MachineTraits>
void BoolFolding<MachineTraits>::dump(const Cfg *Func) const {
- if (!ALLOW_DUMP || !Func->isVerbose(IceV_Folding))
+ if (!buildAllowsDump() || !Func->isVerbose(IceV_Folding))
return;
OstreamLocker L(Func->getContext());
Ostream &Str = Func->getContext()->getStrDump();
@@ -842,7 +842,7 @@ template <class Machine> void TargetX86Base<Machine>::lowerArguments() {
int32_t RegNum = RegX8632::Reg_xmm0 + NumXmmArgs;
++NumXmmArgs;
Variable *RegisterArg = Func->makeVariable(Ty);
- if (ALLOW_DUMP)
+ if (buildAllowsDump())
RegisterArg->setName(Func, "home_reg:" + Arg->getName(Func));
RegisterArg->setRegNum(RegNum);
RegisterArg->setIsArg();
@@ -1074,7 +1074,7 @@ template <class Machine> void TargetX86Base<Machine>::addProlog(CfgNode *Node) {
}
this->HasComputedFrame = true;
- if (ALLOW_DUMP && Func->isVerbose(IceV_Frame)) {
+ if (buildAllowsDump() && Func->isVerbose(IceV_Frame)) {
OstreamLocker L(Func->getContext());
Ostream &Str = Func->getContext()->getStrDump();
@@ -1190,7 +1190,7 @@ template <class Machine> void TargetX86Base<Machine>::split64(Variable *Var) {
assert(Hi == nullptr);
Lo = Func->makeVariable(IceType_i32);
Hi = Func->makeVariable(IceType_i32);
- if (ALLOW_DUMP) {
+ if (buildAllowsDump()) {
Lo->setName(Func, Var->getName(Func) + "__lo");
Hi->setName(Func, Var->getName(Func) + "__hi");
}
@@ -4019,7 +4019,7 @@ 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)
+ if (!buildAllowsDump())
return;
if (!Func->isVerbose(IceV_AddrOpt))
return;
@@ -5271,7 +5271,7 @@ void TargetX86Base<Machine>::makeRandomRegisterPermutation(
template <class Machine>
void TargetX86Base<Machine>::emit(const ConstantInteger32 *C) const {
- if (!ALLOW_DUMP)
+ if (!buildAllowsDump())
return;
Ostream &Str = Ctx->getStrEmit();
Str << getConstantPrefix() << C->getValue();
@@ -5284,7 +5284,7 @@ void TargetX86Base<Machine>::emit(const ConstantInteger64 *) const {
template <class Machine>
void TargetX86Base<Machine>::emit(const ConstantFloat *C) const {
- if (!ALLOW_DUMP)
+ if (!buildAllowsDump())
return;
Ostream &Str = Ctx->getStrEmit();
C->emitPoolLabel(Str);
@@ -5292,7 +5292,7 @@ void TargetX86Base<Machine>::emit(const ConstantFloat *C) const {
template <class Machine>
void TargetX86Base<Machine>::emit(const ConstantDouble *C) const {
- if (!ALLOW_DUMP)
+ if (!buildAllowsDump())
return;
Ostream &Str = Ctx->getStrEmit();
C->emitPoolLabel(Str);
« src/IceDefs.h ('K') | « src/IceTargetLoweringX8632.cpp ('k') | src/IceTimerTree.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698