Chromium Code Reviews| Index: src/IceTargetLoweringX86Base.h |
| diff --git a/src/IceTargetLoweringX86Base.h b/src/IceTargetLoweringX86Base.h |
| index 71972eb95e1de0df57e04d53db172e75f5af654c..6f7758d336919869d9bc4a0be85de954bcf63c05 100644 |
| --- a/src/IceTargetLoweringX86Base.h |
| +++ b/src/IceTargetLoweringX86Base.h |
| @@ -151,18 +151,6 @@ protected: |
| void lowerExtractElement(const InstExtractElement *Inst) override; |
| void lowerFcmp(const InstFcmp *Inst) override; |
| void lowerIcmp(const InstIcmp *Inst) override; |
| - /// Complains loudly if invoked because the cpu can handle 64-bit types |
| - /// natively. |
| - template <typename T = Traits> |
| - typename std::enable_if<T::Is64Bit, void>::type |
| - lowerIcmp64(const InstIcmp *) { |
| - llvm::report_fatal_error( |
| - "Hey, yo! This is x86-64. Watcha doin'? (lowerIcmp64)"); |
| - } |
| - /// x86lowerIcmp64 handles 64-bit icmp lowering. |
| - template <typename T = Traits> |
| - typename std::enable_if<!T::Is64Bit, void>::type |
| - lowerIcmp64(const InstIcmp *Inst); |
| void lowerIntrinsicCall(const InstIntrinsicCall *Inst) override; |
| void lowerInsertElement(const InstInsertElement *Inst) override; |
| @@ -722,6 +710,31 @@ private: |
| void lowerShift64(InstArithmetic::OpKind Op, Operand *Src0Lo, Operand *Src0Hi, |
| Operand *Src1Lo, Variable *DestLo, Variable *DestHi); |
| + |
| + // Emit the code for a combined compare and branch, or sets the destination |
|
Jim Stichnoth
2015/10/16 13:58:11
Probably use /// style for consistency?
sehr
2015/10/16 18:10:22
Done.
|
| + // variable of the compare if branch is nullptr. |
| + void lowerIcmpAndBr(const InstIcmp *Icmp, const InstBr *Br = nullptr); |
|
Jim Stichnoth
2015/10/16 13:58:10
You're always calling this with 2 explicit args, s
sehr
2015/10/16 18:10:22
Done.
|
| + |
| + // Emit a setcc instruction if Br == nullptr; otherwise emit a branch. |
| + void setccOrBr(typename Traits::Cond::BrCond Condition, Variable *Dest, |
| + const InstBr *Br); |
| + |
| + // Emit a mov [1|0] instruction if Br == nullptr; otherwise emit a branch. |
| + void movOrBr(bool IcmpResult, Variable *Dest, const InstBr *Br); |
| + |
| + /// Complains loudly if invoked because the cpu can handle 64-bit types |
| + /// natively. |
| + template <typename T = Traits> |
| + typename std::enable_if<T::Is64Bit, void>::type |
| + lowerIcmp64(const InstIcmp *, const InstBr *) { |
| + llvm::report_fatal_error( |
| + "Hey, yo! This is x86-64. Watcha doin'? (lowerIcmp64)"); |
| + } |
| + /// x86lowerIcmp64 handles 64-bit icmp lowering. |
| + template <typename T = Traits> |
| + typename std::enable_if<!T::Is64Bit, void>::type |
| + lowerIcmp64(const InstIcmp *Icmp, const InstBr *Br); |
| + |
| BoolFolding FoldingInfo; |
| }; |
| } // end of namespace X86Internal |