llvm.org GIT mirror llvm / 2da3691
Move some helper methods to being static functions in the implementation file. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167696 91177308-0d34-0410-b5e6-96231b3b80d8 Craig Topper 7 years ago
2 changed file(s) with 7 addition(s) and 20 deletion(s). Raw diff Collapse all Expand all
1219412194 // X86 Scheduler Hooks
1219512195 //===----------------------------------------------------------------------===//
1219612196
12197 // private utility function
12198
1219912197 /// Utility function to emit xbegin specifying the start of an RTM region.
12200 MachineBasicBlock *
12201 X86TargetLowering::EmitXBegin(MachineInstr *MI, MachineBasicBlock *MBB) const {
12198 static MachineBasicBlock *EmitXBegin(MachineInstr *MI, MachineBasicBlock *MBB,
12199 const TargetInstrInfo *TII) {
1220212200 DebugLoc DL = MI->getDebugLoc();
12203 const TargetInstrInfo *TII = getTargetMachine().getInstrInfo();
1220412201
1220512202 const BasicBlock *BB = MBB->getBasicBlock();
1220612203 MachineFunction::iterator I = MBB;
1291112908 return BB;
1291212909 }
1291312910
12914 MachineBasicBlock *
12915 X86TargetLowering::EmitMonitor(MachineInstr *MI, MachineBasicBlock *BB) const {
12911 static MachineBasicBlock * EmitMonitor(MachineInstr *MI, MachineBasicBlock *BB,
12912 const TargetInstrInfo *TII,
12913 const X86Subtarget* Subtarget) {
1291612914 DebugLoc dl = MI->getDebugLoc();
12917 const TargetInstrInfo *TII = getTargetMachine().getInstrInfo();
1291812915
1291912916 // Address into RAX/EAX, other two args into ECX, EDX.
1292012917 unsigned MemOpc = Subtarget->is64Bit() ? X86::LEA64r : X86::LEA32r;
1394813945
1394913946 // Thread synchronization.
1395013947 case X86::MONITOR:
13951 return EmitMonitor(MI, BB);
13948 return EmitMonitor(MI, BB, getTargetMachine().getInstrInfo(), Subtarget);
1395213949
1395313950 // xbegin
1395413951 case X86::XBEGIN:
13955 return EmitXBegin(MI, BB);
13952 return EmitXBegin(MI, BB, getTargetMachine().getInstrInfo());
1395613953
1395713954 // Atomic Lowering.
1395813955 case X86::ATOMAND8:
870870 const SmallVectorImpl &Outs,
871871 LLVMContext &Context) const;
872872
873 /// Utility functions to emit monitor and mwait instructions. These
874 /// need to make sure that the arguments to the intrinsic are in the
875 /// correct registers.
876 MachineBasicBlock *EmitMonitor(MachineInstr *MI,
877 MachineBasicBlock *BB) const;
878
879873 /// Utility function to emit atomic-load-arith operations (and, or, xor,
880874 /// nand, max, min, umax, umin). It takes the corresponding instruction to
881875 /// expand, the associated machine basic block, and the associated X86
888882 MachineBasicBlock *EmitAtomicLoadArith6432(MachineInstr *MI,
889883 MachineBasicBlock *MBB) const;
890884
891 /// Utility function to emit xbegin specifying the start of an RTM region.
892 MachineBasicBlock *EmitXBegin(MachineInstr *MI,
893 MachineBasicBlock *MBB) const;
894
895885 // Utility function to emit the low-level va_arg code for X86-64.
896886 MachineBasicBlock *EmitVAARG64WithCustomInserter(
897887 MachineInstr *MI,