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

Side by Side Diff: src/IceTargetLoweringX8632.h

Issue 680733002: Subzero: Allow delaying Phi lowering until after register allocation. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Fix vector const undef lowering for phis. 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 unified diff | Download patch
« no previous file with comments | « src/IceTargetLowering.cpp ('k') | src/IceTargetLoweringX8632.cpp » ('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.h - x86-32 lowering ---*- C++ -*-===// 1 //===- subzero/src/IceTargetLoweringX8632.h - x86-32 lowering ---*- 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 // This file declares the TargetLoweringX8632 class, which 10 // This file declares the TargetLoweringX8632 class, which
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 void lowerIcmp(const InstIcmp *Inst) override; 98 void lowerIcmp(const InstIcmp *Inst) override;
99 void lowerIntrinsicCall(const InstIntrinsicCall *Inst) override; 99 void lowerIntrinsicCall(const InstIntrinsicCall *Inst) override;
100 void lowerInsertElement(const InstInsertElement *Inst) override; 100 void lowerInsertElement(const InstInsertElement *Inst) override;
101 void lowerLoad(const InstLoad *Inst) override; 101 void lowerLoad(const InstLoad *Inst) override;
102 void lowerPhi(const InstPhi *Inst) override; 102 void lowerPhi(const InstPhi *Inst) override;
103 void lowerRet(const InstRet *Inst) override; 103 void lowerRet(const InstRet *Inst) override;
104 void lowerSelect(const InstSelect *Inst) override; 104 void lowerSelect(const InstSelect *Inst) override;
105 void lowerStore(const InstStore *Inst) override; 105 void lowerStore(const InstStore *Inst) override;
106 void lowerSwitch(const InstSwitch *Inst) override; 106 void lowerSwitch(const InstSwitch *Inst) override;
107 void lowerUnreachable(const InstUnreachable *Inst) override; 107 void lowerUnreachable(const InstUnreachable *Inst) override;
108 void prelowerPhis() override;
109 void lowerPhiAssignments(CfgNode *Node,
110 const AssignList &Assignments) override;
108 void doAddressOptLoad() override; 111 void doAddressOptLoad() override;
109 void doAddressOptStore() override; 112 void doAddressOptStore() override;
110 void randomlyInsertNop(float Probability) override; 113 void randomlyInsertNop(float Probability) override;
111 114
112 // Naive lowering of cmpxchg. 115 // Naive lowering of cmpxchg.
113 void lowerAtomicCmpxchg(Variable *DestPrev, Operand *Ptr, Operand *Expected, 116 void lowerAtomicCmpxchg(Variable *DestPrev, Operand *Ptr, Operand *Expected,
114 Operand *Desired); 117 Operand *Desired);
115 // Attempt a more optimized lowering of cmpxchg. Returns true if optimized. 118 // Attempt a more optimized lowering of cmpxchg. Returns true if optimized.
116 bool tryOptimizedCmpxchgCmpBr(Variable *DestPrev, Operand *Ptr, 119 bool tryOptimizedCmpxchgCmpBr(Variable *DestPrev, Operand *Ptr,
117 Operand *Expected, Operand *Desired); 120 Operand *Expected, Operand *Desired);
(...skipping 357 matching lines...) Expand 10 before | Expand all | Expand 10 after
475 const X86InstructionSet InstructionSet; 478 const X86InstructionSet InstructionSet;
476 bool IsEbpBasedFrame; 479 bool IsEbpBasedFrame;
477 bool NeedsStackAlignment; 480 bool NeedsStackAlignment;
478 size_t FrameSizeLocals; 481 size_t FrameSizeLocals;
479 size_t SpillAreaSizeBytes; 482 size_t SpillAreaSizeBytes;
480 llvm::SmallBitVector TypeToRegisterSet[IceType_NUM]; 483 llvm::SmallBitVector TypeToRegisterSet[IceType_NUM];
481 llvm::SmallBitVector ScratchRegs; 484 llvm::SmallBitVector ScratchRegs;
482 llvm::SmallBitVector RegsUsed; 485 llvm::SmallBitVector RegsUsed;
483 SizeT NextLabelNumber; 486 SizeT NextLabelNumber;
484 bool ComputedLiveRanges; 487 bool ComputedLiveRanges;
485 VarList PhysicalRegisters; 488 VarList PhysicalRegisters[IceType_NUM];
486 static IceString RegNames[]; 489 static IceString RegNames[];
487 490
488 private: 491 private:
489 ~TargetX8632() override {} 492 ~TargetX8632() override {}
490 template <typename T> void emitConstantPool() const; 493 template <typename T> void emitConstantPool() const;
491 }; 494 };
492 495
493 class TargetGlobalInitX8632 : public TargetGlobalInitLowering { 496 class TargetGlobalInitX8632 : public TargetGlobalInitLowering {
494 TargetGlobalInitX8632(const TargetGlobalInitX8632 &) = delete; 497 TargetGlobalInitX8632(const TargetGlobalInitX8632 &) = delete;
495 TargetGlobalInitX8632 &operator=(const TargetGlobalInitX8632 &) = delete; 498 TargetGlobalInitX8632 &operator=(const TargetGlobalInitX8632 &) = delete;
(...skipping 13 matching lines...) Expand all
509 }; 512 };
510 513
511 template <> void ConstantInteger32::emit(GlobalContext *Ctx) const; 514 template <> void ConstantInteger32::emit(GlobalContext *Ctx) const;
512 template <> void ConstantInteger64::emit(GlobalContext *Ctx) const; 515 template <> void ConstantInteger64::emit(GlobalContext *Ctx) const;
513 template <> void ConstantFloat::emit(GlobalContext *Ctx) const; 516 template <> void ConstantFloat::emit(GlobalContext *Ctx) const;
514 template <> void ConstantDouble::emit(GlobalContext *Ctx) const; 517 template <> void ConstantDouble::emit(GlobalContext *Ctx) const;
515 518
516 } // end of namespace Ice 519 } // end of namespace Ice
517 520
518 #endif // SUBZERO_SRC_ICETARGETLOWERINGX8632_H 521 #endif // SUBZERO_SRC_ICETARGETLOWERINGX8632_H
OLDNEW
« no previous file with comments | « src/IceTargetLowering.cpp ('k') | src/IceTargetLoweringX8632.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698