| OLD | NEW |
| 1 //===- subzero/src/IceTargetLoweringX86Base.h - x86 lowering ----*- C++ -*-===// | 1 //===- subzero/src/IceTargetLoweringX86Base.h - x86 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 /// \file | 10 /// \file |
| (...skipping 564 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 575 _set_dest_nonkillable(); | 575 _set_dest_nonkillable(); |
| 576 Context.insert(InstFakeUse::create(Func, Src)); | 576 Context.insert(InstFakeUse::create(Func, Src)); |
| 577 } | 577 } |
| 578 void _xor(Variable *Dest, Operand *Src0) { | 578 void _xor(Variable *Dest, Operand *Src0) { |
| 579 Context.insert(Traits::Insts::Xor::create(Func, Dest, Src0)); | 579 Context.insert(Traits::Insts::Xor::create(Func, Dest, Src0)); |
| 580 } | 580 } |
| 581 void _xor_rmw(typename Traits::X86OperandMem *DestSrc0, Operand *Src1) { | 581 void _xor_rmw(typename Traits::X86OperandMem *DestSrc0, Operand *Src1) { |
| 582 Context.insert(Traits::Insts::XorRMW::create(Func, DestSrc0, Src1)); | 582 Context.insert(Traits::Insts::XorRMW::create(Func, DestSrc0, Src1)); |
| 583 } | 583 } |
| 584 | 584 |
| 585 void _iaca_start() { |
| 586 if (!BuildDefs::minimal()) |
| 587 Context.insert(Traits::Insts::IacaStart::create(Func)); |
| 588 } |
| 589 void _iaca_end() { |
| 590 if (!BuildDefs::minimal()) |
| 591 Context.insert(Traits::Insts::IacaEnd::create(Func)); |
| 592 } |
| 593 |
| 594 /// This class helps wrap IACA markers around the code generated by the |
| 595 /// current scope. It means you don't need to put an end before each return. |
| 596 class ScopedIacaMark { |
| 597 ScopedIacaMark(const ScopedIacaMark &) = delete; |
| 598 ScopedIacaMark &operator=(const ScopedIacaMark &) = delete; |
| 599 |
| 600 public: |
| 601 ScopedIacaMark(TargetX86Base *Lowering) : Lowering(Lowering) { |
| 602 Lowering->_iaca_start(); |
| 603 } |
| 604 ~ScopedIacaMark() { end(); } |
| 605 void end() { |
| 606 if (!Lowering) |
| 607 return; |
| 608 Lowering->_iaca_end(); |
| 609 Lowering = nullptr; |
| 610 } |
| 611 |
| 612 private: |
| 613 TargetX86Base *Lowering; |
| 614 }; |
| 615 |
| 585 bool optimizeScalarMul(Variable *Dest, Operand *Src0, int32_t Src1); | 616 bool optimizeScalarMul(Variable *Dest, Operand *Src0, int32_t Src1); |
| 586 void findRMW(); | 617 void findRMW(); |
| 587 | 618 |
| 588 typename Traits::InstructionSet InstructionSet = | 619 typename Traits::InstructionSet InstructionSet = |
| 589 Traits::InstructionSet::Begin; | 620 Traits::InstructionSet::Begin; |
| 590 bool IsEbpBasedFrame = false; | 621 bool IsEbpBasedFrame = false; |
| 591 bool NeedsStackAlignment = false; | 622 bool NeedsStackAlignment = false; |
| 592 size_t SpillAreaSizeBytes = 0; | 623 size_t SpillAreaSizeBytes = 0; |
| 593 llvm::SmallBitVector TypeToRegisterSet[IceType_NUM]; | 624 llvm::SmallBitVector TypeToRegisterSet[IceType_NUM]; |
| 594 llvm::SmallBitVector ScratchRegs; | 625 llvm::SmallBitVector ScratchRegs; |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 627 } | 658 } |
| 628 | 659 |
| 629 BoolFolding FoldingInfo; | 660 BoolFolding FoldingInfo; |
| 630 }; | 661 }; |
| 631 } // end of namespace X86Internal | 662 } // end of namespace X86Internal |
| 632 } // end of namespace Ice | 663 } // end of namespace Ice |
| 633 | 664 |
| 634 #include "IceTargetLoweringX86BaseImpl.h" | 665 #include "IceTargetLoweringX86BaseImpl.h" |
| 635 | 666 |
| 636 #endif // SUBZERO_SRC_ICETARGETLOWERINGX86BASE_H | 667 #endif // SUBZERO_SRC_ICETARGETLOWERINGX86BASE_H |
| OLD | NEW |