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

Side by Side Diff: src/IceTargetLoweringX8632.h

Issue 413903002: Subzero: Add a peephole to fuse cmpxchg w/ later cmp+branch. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: blank Created 6 years, 4 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/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 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 virtual void lowerLoad(const InstLoad *Inst); 90 virtual void lowerLoad(const InstLoad *Inst);
91 virtual void lowerPhi(const InstPhi *Inst); 91 virtual void lowerPhi(const InstPhi *Inst);
92 virtual void lowerRet(const InstRet *Inst); 92 virtual void lowerRet(const InstRet *Inst);
93 virtual void lowerSelect(const InstSelect *Inst); 93 virtual void lowerSelect(const InstSelect *Inst);
94 virtual void lowerStore(const InstStore *Inst); 94 virtual void lowerStore(const InstStore *Inst);
95 virtual void lowerSwitch(const InstSwitch *Inst); 95 virtual void lowerSwitch(const InstSwitch *Inst);
96 virtual void lowerUnreachable(const InstUnreachable *Inst); 96 virtual void lowerUnreachable(const InstUnreachable *Inst);
97 virtual void doAddressOptLoad(); 97 virtual void doAddressOptLoad();
98 virtual void doAddressOptStore(); 98 virtual void doAddressOptStore();
99 99
100 // Naive lowering of cmpxchg.
100 void lowerAtomicCmpxchg(Variable *DestPrev, Operand *Ptr, Operand *Expected, 101 void lowerAtomicCmpxchg(Variable *DestPrev, Operand *Ptr, Operand *Expected,
101 Operand *Desired); 102 Operand *Desired);
103 // Attempt a more optimized lowering of cmpxchg. Returns true if optimized.
104 bool tryOptimizedCmpxchgCmpBr(Variable *DestPrev, Operand *Ptr,
105 Operand *Expected, Operand *Desired);
102 void lowerAtomicRMW(Variable *Dest, uint32_t Operation, Operand *Ptr, 106 void lowerAtomicRMW(Variable *Dest, uint32_t Operation, Operand *Ptr,
103 Operand *Val); 107 Operand *Val);
104 void lowerCountZeros(bool Cttz, Type Ty, Variable *Dest, Operand *FirstVal, 108 void lowerCountZeros(bool Cttz, Type Ty, Variable *Dest, Operand *FirstVal,
105 Operand *SecondVal); 109 Operand *SecondVal);
106 110
107 typedef void (TargetX8632::*LowerBinOp)(Variable *, Operand *); 111 typedef void (TargetX8632::*LowerBinOp)(Variable *, Operand *);
108 void expandAtomicRMWAsCmpxchg(LowerBinOp op_lo, LowerBinOp op_hi, 112 void expandAtomicRMWAsCmpxchg(LowerBinOp op_lo, LowerBinOp op_hi,
109 Variable *Dest, Operand *Ptr, Operand *Val); 113 Variable *Dest, Operand *Ptr, Operand *Val);
110 114
111 void eliminateNextVectorSextInstruction(Variable *SignExtendedResult); 115 void eliminateNextVectorSextInstruction(Variable *SignExtendedResult);
(...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after
461 virtual ~TargetGlobalInitX8632() {} 465 virtual ~TargetGlobalInitX8632() {}
462 }; 466 };
463 467
464 template <> void ConstantInteger::emit(GlobalContext *Ctx) const; 468 template <> void ConstantInteger::emit(GlobalContext *Ctx) const;
465 template <> void ConstantFloat::emit(GlobalContext *Ctx) const; 469 template <> void ConstantFloat::emit(GlobalContext *Ctx) const;
466 template <> void ConstantDouble::emit(GlobalContext *Ctx) const; 470 template <> void ConstantDouble::emit(GlobalContext *Ctx) const;
467 471
468 } // end of namespace Ice 472 } // end of namespace Ice
469 473
470 #endif // SUBZERO_SRC_ICETARGETLOWERINGX8632_H 474 #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