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

Side by Side Diff: src/IceOperand.h

Issue 1347223003: Subzero. Implements TargetDataARM32::lowerConstants. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: addresses comments. Created 5 years, 3 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/IceCfg.cpp ('k') | src/IceTargetLoweringARM32.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/IceOperand.h - High-level operands -----------*- C++ -*-===// 1 //===- subzero/src/IceOperand.h - High-level operands -----------*- C++ -*-===//
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 /// \file 10 /// \file
(...skipping 527 matching lines...) Expand 10 before | Expand all | Expand 10 after
538 538
539 // Variable64On32 represents a 64-bit variable on a 32-bit architecture. In 539 // Variable64On32 represents a 64-bit variable on a 32-bit architecture. In
540 // this situation the variable must be split into a low and a high word. 540 // this situation the variable must be split into a low and a high word.
541 class Variable64On32 : public Variable { 541 class Variable64On32 : public Variable {
542 Variable64On32() = delete; 542 Variable64On32() = delete;
543 Variable64On32(const Variable64On32 &) = delete; 543 Variable64On32(const Variable64On32 &) = delete;
544 Variable64On32 &operator=(const Variable64On32 &) = delete; 544 Variable64On32 &operator=(const Variable64On32 &) = delete;
545 545
546 public: 546 public:
547 static Variable64On32 *create(Cfg *Func, Type Ty, SizeT Index) { 547 static Variable64On32 *create(Cfg *Func, Type Ty, SizeT Index) {
548 return new (Func->allocate<Variable64On32>()) Variable64On32( 548 return new (Func->allocate<Variable64On32>())
549 kVariable64On32, Ty, Index); 549 Variable64On32(kVariable64On32, Ty, Index);
550 } 550 }
551 551
552 void setName(Cfg *Func, const IceString &NewName) override { 552 void setName(Cfg *Func, const IceString &NewName) override {
553 Variable::setName(Func, NewName); 553 Variable::setName(Func, NewName);
554 if (LoVar && HiVar) { 554 if (LoVar && HiVar) {
555 LoVar->setName(Func, getName(Func) + "__lo"); 555 LoVar->setName(Func, getName(Func) + "__lo");
556 HiVar->setName(Func, getName(Func) + "__hi"); 556 HiVar->setName(Func, getName(Func) + "__hi");
557 } 557 }
558 } 558 }
559 559
(...skipping 24 matching lines...) Expand all
584 LoVar->setName(Func, getName(Func) + "__lo"); 584 LoVar->setName(Func, getName(Func) + "__lo");
585 HiVar->setName(Func, getName(Func) + "__hi"); 585 HiVar->setName(Func, getName(Func) + "__hi");
586 } 586 }
587 587
588 static bool classof(const Operand *Operand) { 588 static bool classof(const Operand *Operand) {
589 OperandKind Kind = Operand->getKind(); 589 OperandKind Kind = Operand->getKind();
590 return Kind == kVariable64On32; 590 return Kind == kVariable64On32;
591 } 591 }
592 592
593 protected: 593 protected:
594 Variable64On32(OperandKind K, Type Ty, SizeT Index) 594 Variable64On32(OperandKind K, Type Ty, SizeT Index) : Variable(K, Ty, Index) {
595 : Variable(K, Ty, Index) {
596 assert(typeWidthInBytes(Ty) == 8); 595 assert(typeWidthInBytes(Ty) == 8);
597 } 596 }
598 597
599 Variable *LoVar = nullptr; 598 Variable *LoVar = nullptr;
600 Variable *HiVar = nullptr; 599 Variable *HiVar = nullptr;
601 }; 600 };
602 601
603 enum MetadataKind { 602 enum MetadataKind {
604 VMK_Uses, /// Track only uses, not defs 603 VMK_Uses, /// Track only uses, not defs
605 VMK_SingleDefs, /// Track uses+defs, but only record single def 604 VMK_SingleDefs, /// Track uses+defs, but only record single def
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
701 private: 700 private:
702 const Cfg *Func; 701 const Cfg *Func;
703 MetadataKind Kind; 702 MetadataKind Kind;
704 CfgVector<VariableTracking> Metadata; 703 CfgVector<VariableTracking> Metadata;
705 const static InstDefList NoDefinitions; 704 const static InstDefList NoDefinitions;
706 }; 705 };
707 706
708 } // end of namespace Ice 707 } // end of namespace Ice
709 708
710 #endif // SUBZERO_SRC_ICEOPERAND_H 709 #endif // SUBZERO_SRC_ICEOPERAND_H
OLDNEW
« no previous file with comments | « src/IceCfg.cpp ('k') | src/IceTargetLoweringARM32.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698