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

Side by Side Diff: src/IceTargetLoweringX8632.cpp

Issue 1197223002: Subzero: Use C++11 member initializers where practical. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Rebase 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 unified diff | Download patch
« no previous file with comments | « src/IceTargetLoweringX8632.h ('k') | src/IceThreading.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 //===- subzero/src/IceTargetLoweringX8632.cpp - x86-32 lowering -----------===// 1 //===- subzero/src/IceTargetLoweringX8632.cpp - x86-32 lowering -----------===//
2 // 2 //
3 // The Subzero Code Generator 3 // The Subzero Code Generator
4 // 4 //
5 // This file is distributed under the University of Illinois Open Source 5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details. 6 // License. See LICENSE.TXT for details.
7 // 7 //
8 //===----------------------------------------------------------------------===// 8 //===----------------------------------------------------------------------===//
9 // 9 //
10 // This file implements the TargetLoweringX8632 class, which 10 // This file implements the TargetLoweringX8632 class, which
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after
258 ~BoolFlagSaver() { Flag = OldValue; } 258 ~BoolFlagSaver() { Flag = OldValue; }
259 259
260 private: 260 private:
261 const bool OldValue; 261 const bool OldValue;
262 bool &Flag; 262 bool &Flag;
263 }; 263 };
264 264
265 } // end of anonymous namespace 265 } // end of anonymous namespace
266 266
267 BoolFoldingEntry::BoolFoldingEntry(Inst *I) 267 BoolFoldingEntry::BoolFoldingEntry(Inst *I)
268 : Instr(I), IsComplex(BoolFolding::hasComplexLowering(I)), IsLiveOut(true), 268 : Instr(I), IsComplex(BoolFolding::hasComplexLowering(I)) {}
269 NumUses(0) {}
270 269
271 BoolFolding::BoolFoldingProducerKind 270 BoolFolding::BoolFoldingProducerKind
272 BoolFolding::getProducerKind(const Inst *Instr) { 271 BoolFolding::getProducerKind(const Inst *Instr) {
273 if (llvm::isa<InstIcmp>(Instr)) { 272 if (llvm::isa<InstIcmp>(Instr)) {
274 if (Instr->getSrc(0)->getType() != IceType_i64) 273 if (Instr->getSrc(0)->getType() != IceType_i64)
275 return PK_Icmp32; 274 return PK_Icmp32;
276 return PK_None; // TODO(stichnot): actually PK_Icmp64; 275 return PK_None; // TODO(stichnot): actually PK_Icmp64;
277 } 276 }
278 return PK_None; // TODO(stichnot): remove this 277 return PK_None; // TODO(stichnot): remove this
279 278
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
403 I.second.Instr->dump(Func); 402 I.second.Instr->dump(Func);
404 Str << "\n"; 403 Str << "\n";
405 } 404 }
406 } 405 }
407 406
408 void TargetX8632::initNodeForLowering(CfgNode *Node) { 407 void TargetX8632::initNodeForLowering(CfgNode *Node) {
409 FoldingInfo.init(Node); 408 FoldingInfo.init(Node);
410 FoldingInfo.dump(Func); 409 FoldingInfo.dump(Func);
411 } 410 }
412 411
413 TargetX8632::TargetX8632(Cfg *Func) 412 TargetX8632::TargetX8632(Cfg *Func) : TargetLowering(Func) {
414 : TargetLowering(Func), InstructionSet(X86InstructionSet::Begin),
415 IsEbpBasedFrame(false), NeedsStackAlignment(false), SpillAreaSizeBytes(0),
416 RandomizationPoolingPaused(false) {
417 static_assert((X86InstructionSet::End - X86InstructionSet::Begin) == 413 static_assert((X86InstructionSet::End - X86InstructionSet::Begin) ==
418 (TargetInstructionSet::X86InstructionSet_End - 414 (TargetInstructionSet::X86InstructionSet_End -
419 TargetInstructionSet::X86InstructionSet_Begin), 415 TargetInstructionSet::X86InstructionSet_Begin),
420 "X86InstructionSet range different from TargetInstructionSet"); 416 "X86InstructionSet range different from TargetInstructionSet");
421 if (Func->getContext()->getFlags().getTargetInstructionSet() != 417 if (Func->getContext()->getFlags().getTargetInstructionSet() !=
422 TargetInstructionSet::BaseInstructionSet) { 418 TargetInstructionSet::BaseInstructionSet) {
423 InstructionSet = static_cast<X86InstructionSet>( 419 InstructionSet = static_cast<X86InstructionSet>(
424 (Func->getContext()->getFlags().getTargetInstructionSet() - 420 (Func->getContext()->getFlags().getTargetInstructionSet() -
425 TargetInstructionSet::X86InstructionSet_Begin) + 421 TargetInstructionSet::X86InstructionSet_Begin) +
426 X86InstructionSet::Begin); 422 X86InstructionSet::Begin);
(...skipping 5286 matching lines...) Expand 10 before | Expand all | Expand 10 after
5713 } 5709 }
5714 assert("Unsupported -randomize-pool-immediates option" && false); 5710 assert("Unsupported -randomize-pool-immediates option" && false);
5715 } 5711 }
5716 } 5712 }
5717 // the offset is not eligible for blinding or pooling, return the original 5713 // the offset is not eligible for blinding or pooling, return the original
5718 // mem operand 5714 // mem operand
5719 return MemOperand; 5715 return MemOperand;
5720 } 5716 }
5721 5717
5722 } // end of namespace Ice 5718 } // end of namespace Ice
OLDNEW
« no previous file with comments | « src/IceTargetLoweringX8632.h ('k') | src/IceThreading.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698