LLVM 22.0.0git
PPCInstrInfo.h
Go to the documentation of this file.
1//===-- PPCInstrInfo.h - PowerPC Instruction Information --------*- C++ -*-===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8//
9// This file contains the PowerPC implementation of the TargetInstrInfo class.
10//
11//===----------------------------------------------------------------------===//
12
13#ifndef LLVM_LIB_TARGET_POWERPC_PPCINSTRINFO_H
14#define LLVM_LIB_TARGET_POWERPC_PPCINSTRINFO_H
15
17#include "PPC.h"
18#include "PPCRegisterInfo.h"
19#include "llvm/ADT/SmallSet.h"
22
23#define GET_INSTRINFO_HEADER
24#include "PPCGenInstrInfo.inc"
25
26namespace llvm {
27
28// Instructions that have an immediate form might be convertible to that
29// form if the correct input is a result of a load immediate. In order to
30// know whether the transformation is special, we might need to know some
31// of the details of the two forms.
33 // Is the immediate field in the immediate form signed or unsigned?
35 // Does the immediate need to be a multiple of some value?
37 // Is R0/X0 treated specially by the original r+r instruction?
38 // If so, in which operand?
40 // Is R0/X0 treated specially by the new r+i instruction?
41 // If so, in which operand?
43 // Is the operation commutative?
45 // The operand number to check for add-immediate def.
47 // The operand number for the immediate.
49 // The opcode of the new instruction.
51 // The size of the immediate.
53 // The immediate should be truncated to N bits.
55 // Is the instruction summing the operand
57};
58
59// Information required to convert an instruction to just a materialized
60// immediate.
62 unsigned Imm : 16;
63 unsigned Is64Bit : 1;
64 unsigned SetCR : 1;
65};
66
67// Index into the OpcodesForSpill array.
88 SOK_LastOpcodeSpill // This must be last on the enum.
89};
90
91// PPC MachineCombiner patterns
93 // These are patterns matched by the PowerPC to reassociate FMA chains.
96
97 // These are patterns matched by the PowerPC to reassociate FMA and FSUB to
98 // reduce register pressure.
101
102};
103
104// Define list of load and store spill opcodes.
105#define NoInstr PPC::INSTRUCTION_LIST_END
106#define Pwr8LoadOpcodes \
107 {PPC::LWZ, \
108 PPC::LD, \
109 PPC::LFD, \
110 PPC::LFS, \
111 PPC::RESTORE_CR, \
112 PPC::RESTORE_CRBIT, \
113 PPC::LVX, \
114 PPC::LXVD2X, \
115 PPC::LXSDX, \
116 PPC::LXSSPX, \
117 PPC::SPILLTOVSR_LD, \
118 NoInstr, \
119 NoInstr, \
120 NoInstr, \
121 NoInstr, \
122 NoInstr, \
123 NoInstr, \
124 PPC::EVLDD, \
125 PPC::RESTORE_QUADWORD}
126
127#define Pwr9LoadOpcodes \
128 {PPC::LWZ, \
129 PPC::LD, \
130 PPC::LFD, \
131 PPC::LFS, \
132 PPC::RESTORE_CR, \
133 PPC::RESTORE_CRBIT, \
134 PPC::LVX, \
135 PPC::LXV, \
136 PPC::DFLOADf64, \
137 PPC::DFLOADf32, \
138 PPC::SPILLTOVSR_LD, \
139 NoInstr, \
140 NoInstr, \
141 NoInstr, \
142 NoInstr, \
143 NoInstr, \
144 NoInstr, \
145 NoInstr, \
146 PPC::RESTORE_QUADWORD}
147
148#define Pwr10LoadOpcodes \
149 {PPC::LWZ, \
150 PPC::LD, \
151 PPC::LFD, \
152 PPC::LFS, \
153 PPC::RESTORE_CR, \
154 PPC::RESTORE_CRBIT, \
155 PPC::LVX, \
156 PPC::LXV, \
157 PPC::DFLOADf64, \
158 PPC::DFLOADf32, \
159 PPC::SPILLTOVSR_LD, \
160 PPC::LXVP, \
161 PPC::RESTORE_ACC, \
162 PPC::RESTORE_UACC, \
163 NoInstr, \
164 NoInstr, \
165 NoInstr, \
166 NoInstr, \
167 PPC::RESTORE_QUADWORD}
168
169#define FutureLoadOpcodes \
170 {PPC::LWZ, \
171 PPC::LD, \
172 PPC::LFD, \
173 PPC::LFS, \
174 PPC::RESTORE_CR, \
175 PPC::RESTORE_CRBIT, \
176 PPC::LVX, \
177 PPC::LXV, \
178 PPC::DFLOADf64, \
179 PPC::DFLOADf32, \
180 PPC::SPILLTOVSR_LD, \
181 PPC::LXVP, \
182 PPC::RESTORE_ACC, \
183 PPC::RESTORE_UACC, \
184 PPC::RESTORE_WACC, \
185 PPC::RESTORE_DMRP, \
186 PPC::RESTORE_DMR, \
187 NoInstr, \
188 PPC::RESTORE_QUADWORD}
189
190#define Pwr8StoreOpcodes \
191 {PPC::STW, \
192 PPC::STD, \
193 PPC::STFD, \
194 PPC::STFS, \
195 PPC::SPILL_CR, \
196 PPC::SPILL_CRBIT, \
197 PPC::STVX, \
198 PPC::STXVD2X, \
199 PPC::STXSDX, \
200 PPC::STXSSPX, \
201 PPC::SPILLTOVSR_ST, \
202 NoInstr, \
203 NoInstr, \
204 NoInstr, \
205 NoInstr, \
206 NoInstr, \
207 NoInstr, \
208 PPC::EVSTDD, \
209 PPC::SPILL_QUADWORD}
210
211#define Pwr9StoreOpcodes \
212 {PPC::STW, \
213 PPC::STD, \
214 PPC::STFD, \
215 PPC::STFS, \
216 PPC::SPILL_CR, \
217 PPC::SPILL_CRBIT, \
218 PPC::STVX, \
219 PPC::STXV, \
220 PPC::DFSTOREf64, \
221 PPC::DFSTOREf32, \
222 PPC::SPILLTOVSR_ST, \
223 NoInstr, \
224 NoInstr, \
225 NoInstr, \
226 NoInstr, \
227 NoInstr, \
228 NoInstr, \
229 NoInstr, \
230 PPC::SPILL_QUADWORD}
231
232#define Pwr10StoreOpcodes \
233 {PPC::STW, \
234 PPC::STD, \
235 PPC::STFD, \
236 PPC::STFS, \
237 PPC::SPILL_CR, \
238 PPC::SPILL_CRBIT, \
239 PPC::STVX, \
240 PPC::STXV, \
241 PPC::DFSTOREf64, \
242 PPC::DFSTOREf32, \
243 PPC::SPILLTOVSR_ST, \
244 PPC::STXVP, \
245 PPC::SPILL_ACC, \
246 PPC::SPILL_UACC, \
247 NoInstr, \
248 NoInstr, \
249 NoInstr, \
250 NoInstr, \
251 PPC::SPILL_QUADWORD}
252
253#define FutureStoreOpcodes \
254 {PPC::STW, \
255 PPC::STD, \
256 PPC::STFD, \
257 PPC::STFS, \
258 PPC::SPILL_CR, \
259 PPC::SPILL_CRBIT, \
260 PPC::STVX, \
261 PPC::STXV, \
262 PPC::DFSTOREf64, \
263 PPC::DFSTOREf32, \
264 PPC::SPILLTOVSR_ST, \
265 PPC::STXVP, \
266 PPC::SPILL_ACC, \
267 PPC::SPILL_UACC, \
268 PPC::SPILL_WACC, \
269 PPC::SPILL_DMRP, \
270 PPC::SPILL_DMR, \
271 NoInstr, \
272 PPC::SPILL_QUADWORD}
273
274// Initialize arrays for load and store spill opcodes on supported subtargets.
275#define StoreOpcodesForSpill \
276 { Pwr8StoreOpcodes, Pwr9StoreOpcodes, Pwr10StoreOpcodes, FutureStoreOpcodes }
277#define LoadOpcodesForSpill \
278 { Pwr8LoadOpcodes, Pwr9LoadOpcodes, Pwr10LoadOpcodes, FutureLoadOpcodes }
279
280class PPCSubtarget;
282 PPCSubtarget &Subtarget;
283 const PPCRegisterInfo RI;
284 const unsigned StoreSpillOpcodesArray[4][SOK_LastOpcodeSpill] =
286 const unsigned LoadSpillOpcodesArray[4][SOK_LastOpcodeSpill] =
288
289 void StoreRegToStackSlot(MachineFunction &MF, unsigned SrcReg, bool isKill,
290 int FrameIdx, const TargetRegisterClass *RC,
291 SmallVectorImpl<MachineInstr *> &NewMIs) const;
292 void LoadRegFromStackSlot(MachineFunction &MF, const DebugLoc &DL,
293 unsigned DestReg, int FrameIdx,
294 const TargetRegisterClass *RC,
295 SmallVectorImpl<MachineInstr *> &NewMIs) const;
296
297 // Replace the instruction with single LI if possible. \p DefMI must be LI or
298 // LI8.
299 bool simplifyToLI(MachineInstr &MI, MachineInstr &DefMI,
300 unsigned OpNoForForwarding, MachineInstr **KilledDef) const;
301 // If the inst is imm-form and its register operand is produced by a ADDI, put
302 // the imm into the inst directly and remove the ADDI if possible.
303 bool transformToNewImmFormFedByAdd(MachineInstr &MI, MachineInstr &DefMI,
304 unsigned OpNoForForwarding) const;
305 // If the inst is x-form and has imm-form and one of its operand is produced
306 // by a LI, put the imm into the inst directly and remove the LI if possible.
307 bool transformToImmFormFedByLI(MachineInstr &MI, const ImmInstrInfo &III,
308 unsigned ConstantOpNo,
309 MachineInstr &DefMI) const;
310 // If the inst is x-form and has imm-form and one of its operand is produced
311 // by an add-immediate, try to transform it when possible.
312 bool transformToImmFormFedByAdd(MachineInstr &MI, const ImmInstrInfo &III,
313 unsigned ConstantOpNo, MachineInstr &DefMI,
314 bool KillDefMI) const;
315 // Try to find that, if the instruction 'MI' contains any operand that
316 // could be forwarded from some inst that feeds it. If yes, return the
317 // Def of that operand. And OpNoForForwarding is the operand index in
318 // the 'MI' for that 'Def'. If we see another use of this Def between
319 // the Def and the MI, SeenIntermediateUse becomes 'true'.
320 MachineInstr *getForwardingDefMI(MachineInstr &MI,
321 unsigned &OpNoForForwarding,
322 bool &SeenIntermediateUse) const;
323
324 // Can the user MI have it's source at index \p OpNoForForwarding
325 // forwarded from an add-immediate that feeds it?
326 bool isUseMIElgibleForForwarding(MachineInstr &MI, const ImmInstrInfo &III,
327 unsigned OpNoForForwarding) const;
328 bool isDefMIElgibleForForwarding(MachineInstr &DefMI,
329 const ImmInstrInfo &III,
330 MachineOperand *&ImmMO,
331 MachineOperand *&RegMO) const;
332 bool isImmElgibleForForwarding(const MachineOperand &ImmMO,
333 const MachineInstr &DefMI,
334 const ImmInstrInfo &III,
335 int64_t &Imm,
336 int64_t BaseImm = 0) const;
337 bool isRegElgibleForForwarding(const MachineOperand &RegMO,
338 const MachineInstr &DefMI,
339 const MachineInstr &MI, bool KillDefMI,
340 bool &IsFwdFeederRegKilled,
341 bool &SeenIntermediateUse) const;
342 unsigned getSpillTarget() const;
343 ArrayRef<unsigned> getStoreOpcodesForSpillArray() const;
344 ArrayRef<unsigned> getLoadOpcodesForSpillArray() const;
345 unsigned getSpillIndex(const TargetRegisterClass *RC) const;
346 int16_t getFMAOpIdxInfo(unsigned Opcode) const;
347 void reassociateFMA(MachineInstr &Root, unsigned Pattern,
350 DenseMap<Register, unsigned> &InstrIdxForVirtReg) const;
352 generateLoadForNewConst(unsigned Idx, MachineInstr *MI, Type *Ty,
353 SmallVectorImpl<MachineInstr *> &InsInstrs) const;
354 virtual void anchor();
355
356protected:
357 /// Commutes the operands in the given instruction.
358 /// The commutable operands are specified by their indices OpIdx1 and OpIdx2.
359 ///
360 /// Do not call this method for a non-commutable instruction or for
361 /// non-commutable pair of operand indices OpIdx1 and OpIdx2.
362 /// Even though the instruction is commutable, the method may still
363 /// fail to commute the operands, null pointer is returned in such cases.
364 ///
365 /// For example, we can commute rlwimi instructions, but only if the
366 /// rotate amt is zero. We also have to munge the immediates a bit.
368 unsigned OpIdx1,
369 unsigned OpIdx2) const override;
370
371public:
372 explicit PPCInstrInfo(PPCSubtarget &STI);
373
376
377 /// getRegisterInfo - TargetInstrInfo is a superset of MRegister info. As
378 /// such, whenever a client has an instance of instruction info, it should
379 /// always be able to get register info as well (through this method).
380 ///
381 const PPCRegisterInfo &getRegisterInfo() const { return RI; }
382
383 bool isXFormMemOp(unsigned Opcode) const {
384 return get(Opcode).TSFlags & PPCII::XFormMemOp;
385 }
386 bool isPrefixed(unsigned Opcode) const {
387 return get(Opcode).TSFlags & PPCII::Prefixed;
388 }
389 bool isSExt32To64(unsigned Opcode) const {
390 return get(Opcode).TSFlags & PPCII::SExt32To64;
391 }
392 bool isZExt32To64(unsigned Opcode) const {
393 return get(Opcode).TSFlags & PPCII::ZExt32To64;
394 }
395 bool isMemriOp(unsigned Opcode) const {
396 return get(Opcode).TSFlags & PPCII::MemriOp;
397 }
398
399 static bool isSameClassPhysRegCopy(unsigned Opcode) {
400 unsigned CopyOpcodes[] = {PPC::OR, PPC::OR8, PPC::FMR,
401 PPC::VOR, PPC::XXLOR, PPC::XXLORf,
402 PPC::XSCPSGNDP, PPC::MCRF, PPC::CROR,
403 PPC::EVOR, -1U};
404 for (int i = 0; CopyOpcodes[i] != -1U; i++)
405 if (Opcode == CopyOpcodes[i])
406 return true;
407 return false;
408 }
409
410 static bool hasPCRelFlag(unsigned TF) {
416 }
417
418 static bool hasGOTFlag(unsigned TF) {
423 }
424
425 static bool hasTLSFlag(unsigned TF) {
426 return TF == PPCII::MO_TLSGD_FLAG || TF == PPCII::MO_TPREL_FLAG ||
432 TF == PPCII::MO_TLSLD_LO || TF == PPCII::MO_TLS ||
434 }
435
438 const ScheduleDAG *DAG) const override;
441 const ScheduleDAG *DAG) const override;
442
443 unsigned getInstrLatency(const InstrItineraryData *ItinData,
444 const MachineInstr &MI,
445 unsigned *PredCost = nullptr) const override;
446
447 std::optional<unsigned> getOperandLatency(const InstrItineraryData *ItinData,
448 const MachineInstr &DefMI,
449 unsigned DefIdx,
450 const MachineInstr &UseMI,
451 unsigned UseIdx) const override;
452 std::optional<unsigned> getOperandLatency(const InstrItineraryData *ItinData,
453 SDNode *DefNode, unsigned DefIdx,
454 SDNode *UseNode,
455 unsigned UseIdx) const override {
456 return PPCGenInstrInfo::getOperandLatency(ItinData, DefNode, DefIdx,
457 UseNode, UseIdx);
458 }
459
460 bool hasLowDefLatency(const TargetSchedModel &SchedModel,
461 const MachineInstr &DefMI,
462 unsigned DefIdx) const override {
463 // Machine LICM should hoist all instructions in low-register-pressure
464 // situations; none are sufficiently free to justify leaving in a loop
465 // body.
466 return false;
467 }
468
469 bool useMachineCombiner() const override {
470 return true;
471 }
472
473 /// When getMachineCombinerPatterns() finds patterns, this function generates
474 /// the instructions that could replace the original code sequence
476 MachineInstr &Root, unsigned Pattern,
479 DenseMap<Register, unsigned> &InstrIdxForVirtReg) const override;
480
481 /// Return true when there is potentially a faster code sequence for a fma
482 /// chain ending in \p Root. All potential patterns are output in the \p
483 /// P array.
485 bool DoRegPressureReduce) const;
486
487 CombinerObjective getCombinerObjective(unsigned Pattern) const override;
488
489 /// Return true when there is potentially a faster code sequence
490 /// for an instruction chain ending in <Root>. All potential patterns are
491 /// output in the <Pattern> array.
494 bool DoRegPressureReduce) const override;
495
496 /// On PowerPC, we leverage machine combiner pass to reduce register pressure
497 /// when the register pressure is high for one BB.
498 /// Return true if register pressure for \p MBB is high and ABI is supported
499 /// to reduce register pressure. Otherwise return false.
501 const MachineBasicBlock *MBB,
502 const RegisterClassInfo *RegClassInfo) const override;
503
504 /// Fixup the placeholders we put in genAlternativeCodeSequence() for
505 /// MachineCombiner.
506 void
507 finalizeInsInstrs(MachineInstr &Root, unsigned &Pattern,
508 SmallVectorImpl<MachineInstr *> &InsInstrs) const override;
509
511 bool Invert) const override;
512
513 /// On PowerPC, we try to reassociate FMA chain which will increase
514 /// instruction size. Set extension resource length limit to 1 for edge case.
515 /// Resource Length is calculated by scaled resource usage in getCycles().
516 /// Because of the division in getCycles(), it returns different cycles due to
517 /// legacy scaled resource usage. So new resource length may be same with
518 /// legacy or 1 bigger than legacy.
519 /// We need to execlude the 1 bigger case even the resource length is not
520 /// perserved for more FMA chain reassociations on PowerPC.
521 int getExtendResourceLenLimit() const override { return 1; }
522
523 // PowerPC specific version of setSpecialOperandAttr that copies Flags to MI
524 // and clears nuw, nsw, and exact flags.
526 void setSpecialOperandAttr(MachineInstr &MI, uint32_t Flags) const;
527
529 Register &SrcReg, Register &DstReg,
530 unsigned &SubIdx) const override;
532 int &FrameIndex) const override;
533 bool isReallyTriviallyReMaterializable(const MachineInstr &MI) const override;
535 int &FrameIndex) const override;
536
537 bool findCommutedOpIndices(const MachineInstr &MI, unsigned &SrcOpIdx1,
538 unsigned &SrcOpIdx2) const override;
539
541 MachineBasicBlock::iterator MI) const override;
542
543
544 // Branch analysis.
546 MachineBasicBlock *&FBB,
548 bool AllowModify) const override;
550 int *BytesRemoved = nullptr) const override;
553 const DebugLoc &DL,
554 int *BytesAdded = nullptr) const override;
555
556 // Select analysis.
558 Register, Register, Register, int &, int &,
559 int &) const override;
561 const DebugLoc &DL, Register DstReg,
563 Register FalseReg) const override;
564
566 const DebugLoc &DL, Register DestReg, Register SrcReg,
567 bool KillSrc, bool RenamableDest = false,
568 bool RenamableSrc = false) const override;
569
572 bool isKill, int FrameIndex, const TargetRegisterClass *RC,
573 const TargetRegisterInfo *TRI, Register VReg,
574 MachineInstr::MIFlag Flags = MachineInstr::NoFlags) const override;
575
576 // Emits a register spill without updating the register class for vector
577 // registers. This ensures that when we spill a vector register the
578 // element order in the register is the same as it was in memory.
581 unsigned SrcReg, bool isKill, int FrameIndex,
582 const TargetRegisterClass *RC,
583 const TargetRegisterInfo *TRI) const;
584
587 Register DestReg, int FrameIndex, const TargetRegisterClass *RC,
588 const TargetRegisterInfo *TRI, Register VReg,
589 MachineInstr::MIFlag Flags = MachineInstr::NoFlags) const override;
590
591 // Emits a register reload without updating the register class for vector
592 // registers. This ensures that when we reload a vector register the
593 // element order in the register is the same as it was in memory.
596 unsigned DestReg, int FrameIndex,
597 const TargetRegisterClass *RC,
598 const TargetRegisterInfo *TRI) const;
599
600 unsigned getStoreOpcodeForSpill(const TargetRegisterClass *RC) const;
601
602 unsigned getLoadOpcodeForSpill(const TargetRegisterClass *RC) const;
603
604 bool
606
608 MachineRegisterInfo *MRI) const override;
609
611 Register Reg) const;
612
613 // If conversion by predication (only supported by some branch instructions).
614 // All of the profitability checks always return true; it is always
615 // profitable to use the predicated branches.
617 unsigned NumCycles, unsigned ExtraPredCycles,
618 BranchProbability Probability) const override {
619 return true;
620 }
621
623 unsigned NumT, unsigned ExtraT,
624 MachineBasicBlock &FMBB,
625 unsigned NumF, unsigned ExtraF,
626 BranchProbability Probability) const override;
627
629 BranchProbability Probability) const override {
630 return true;
631 }
632
634 MachineBasicBlock &FMBB) const override {
635 return false;
636 }
637
638 // Predication support.
639 bool isPredicated(const MachineInstr &MI) const override;
640
642 const MachineBasicBlock *MBB,
643 const MachineFunction &MF) const override;
644
646 ArrayRef<MachineOperand> Pred) const override;
647
649 ArrayRef<MachineOperand> Pred2) const override;
650
651 bool ClobbersPredicate(MachineInstr &MI, std::vector<MachineOperand> &Pred,
652 bool SkipDead) const override;
653
654 // Comparison optimization.
655
656 bool analyzeCompare(const MachineInstr &MI, Register &SrcReg,
657 Register &SrcReg2, int64_t &Mask,
658 int64_t &Value) const override;
659
660 bool optimizeCompareInstr(MachineInstr &CmpInstr, Register SrcReg,
661 Register SrcReg2, int64_t Mask, int64_t Value,
662 const MachineRegisterInfo *MRI) const override;
663
664
665 /// Return true if get the base operand, byte offset of an instruction and
666 /// the memory width. Width is the size of memory that is being
667 /// loaded/stored (e.g. 1, 2, 4, 8).
669 const MachineOperand *&BaseOp,
670 int64_t &Offset, LocationSize &Width,
671 const TargetRegisterInfo *TRI) const;
672
673 bool optimizeCmpPostRA(MachineInstr &MI) const;
674
675 /// Get the base operand and byte offset of an instruction that reads/writes
676 /// memory.
678 const MachineInstr &LdSt,
680 bool &OffsetIsScalable, LocationSize &Width,
681 const TargetRegisterInfo *TRI) const override;
682
683 /// Returns true if the two given memory operations should be scheduled
684 /// adjacent.
686 int64_t Offset1, bool OffsetIsScalable1,
688 int64_t Offset2, bool OffsetIsScalable2,
689 unsigned ClusterSize,
690 unsigned NumBytes) const override;
691
692 /// Return true if two MIs access different memory addresses and false
693 /// otherwise
694 bool
696 const MachineInstr &MIb) const override;
697
698 /// GetInstSize - Return the number of bytes of code the specified
699 /// instruction may be. This returns the maximum number of bytes.
700 ///
701 unsigned getInstSizeInBytes(const MachineInstr &MI) const override;
702
703 MCInst getNop() const override;
704
705 std::pair<unsigned, unsigned>
706 decomposeMachineOperandsTargetFlags(unsigned TF) const override;
707
710
711 // Expand VSX Memory Pseudo instruction to either a VSX or a FP instruction.
713
714 // Lower pseudo instructions after register allocation.
715 bool expandPostRAPseudo(MachineInstr &MI) const override;
716
717 const TargetRegisterClass *updatedRC(const TargetRegisterClass *RC) const;
718 static int getRecordFormOpcode(unsigned Opcode);
719
720 bool isTOCSaveMI(const MachineInstr &MI) const;
721
722 std::pair<bool, bool>
723 isSignOrZeroExtended(const unsigned Reg, const unsigned BinOpDepth,
724 const MachineRegisterInfo *MRI) const;
725
726 // Return true if the register is sign-extended from 32 to 64 bits.
727 bool isSignExtended(const unsigned Reg,
728 const MachineRegisterInfo *MRI) const {
729 return isSignOrZeroExtended(Reg, 0, MRI).first;
730 }
731
732 // Return true if the register is zero-extended from 32 to 64 bits.
733 bool isZeroExtended(const unsigned Reg,
734 const MachineRegisterInfo *MRI) const {
735 return isSignOrZeroExtended(Reg, 0, MRI).second;
736 }
739 unsigned BinOpDepth,
740 LiveVariables *LV) const;
741
743 SmallSet<Register, 4> &RegsToUpdate,
744 MachineInstr **KilledDef = nullptr) const;
745 bool foldFrameOffset(MachineInstr &MI) const;
746 bool combineRLWINM(MachineInstr &MI, MachineInstr **ToErase = nullptr) const;
747 bool isADDIInstrEligibleForFolding(MachineInstr &ADDIMI, int64_t &Imm) const;
749 bool isImmInstrEligibleForFolding(MachineInstr &MI, unsigned &BaseReg,
750 unsigned &XFormOpcode,
751 int64_t &OffsetOfImmInstr,
752 ImmInstrInfo &III) const;
753 bool isValidToBeChangedReg(MachineInstr *ADDMI, unsigned Index,
754 MachineInstr *&ADDIMI, int64_t &OffsetAddi,
755 int64_t OffsetImm) const;
756
757 void replaceInstrWithLI(MachineInstr &MI, const LoadImmediateInfo &LII) const;
758 void replaceInstrOperandWithImm(MachineInstr &MI, unsigned OpNo,
759 int64_t Imm) const;
760
761 bool instrHasImmForm(unsigned Opc, bool IsVFReg, ImmInstrInfo &III,
762 bool PostRA) const;
763
764 // In PostRA phase, try to find instruction defines \p Reg before \p MI.
765 // \p SeenIntermediate is set to true if uses between DefMI and \p MI exist.
767 bool &SeenIntermediateUse) const;
768
769 // Materialize immediate after RA.
772 const DebugLoc &DL, Register Reg,
773 int64_t Imm) const;
774
775 /// Check \p Opcode is BDNZ (Decrement CTR and branch if it is still nonzero).
776 bool isBDNZ(unsigned Opcode) const;
777
778 /// Find the hardware loop instruction used to set-up the specified loop.
779 /// On PPC, we have two instructions used to set-up the hardware loop
780 /// (MTCTRloop, MTCTR8loop) with corresponding endloop (BDNZ, BDNZ8)
781 /// instructions to indicate the end of a loop.
785
786 /// Analyze loop L, which must be a single-basic-block loop, and if the
787 /// conditions can be understood enough produce a PipelinerLoopInfo object.
788 std::unique_ptr<TargetInstrInfo::PipelinerLoopInfo>
789 analyzeLoopForPipelining(MachineBasicBlock *LoopBB) const override;
790};
791
792}
793
794#endif
unsigned const MachineRegisterInfo * MRI
MachineInstrBuilder & UseMI
MachineInstrBuilder MachineInstrBuilder & DefMI
MachineBasicBlock & MBB
MachineBasicBlock MachineBasicBlock::iterator DebugLoc DL
MachineBasicBlock MachineBasicBlock::iterator MBBI
Returns the sub type a function will return at a given Idx Should correspond to the result type of an ExtractValue instruction executed with just that one unsigned Idx
uint32_t Index
IRTranslator LLVM IR MI
#define I(x, y, z)
Definition: MD5.cpp:58
Register Reg
Register const TargetRegisterInfo * TRI
uint64_t IntrinsicInst * II
#define LoadOpcodesForSpill
Definition: PPCInstrInfo.h:277
#define StoreOpcodesForSpill
Definition: PPCInstrInfo.h:275
const SmallVectorImpl< MachineOperand > MachineBasicBlock * TBB
const SmallVectorImpl< MachineOperand > & Cond
This file defines the SmallSet class.
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
Definition: ArrayRef.h:41
This is an important base class in LLVM.
Definition: Constant.h:43
A debug info location.
Definition: DebugLoc.h:124
Itinerary data supplied by a subtarget to be used by a target.
Instances of this class represent a single low-level machine instruction.
Definition: MCInst.h:188
Representation of each machine instruction.
Definition: MachineInstr.h:72
MachineOperand class - Representation of each machine instruction operand.
MachineRegisterInfo - Keep track of information for virtual and physical registers,...
Register isLoadFromStackSlot(const MachineInstr &MI, int &FrameIndex) const override
Register isStoreToStackSlot(const MachineInstr &MI, int &FrameIndex) const override
bool isSchedulingBoundary(const MachineInstr &MI, const MachineBasicBlock *MBB, const MachineFunction &MF) const override
void loadRegFromStackSlot(MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI, Register DestReg, int FrameIndex, const TargetRegisterClass *RC, const TargetRegisterInfo *TRI, Register VReg, MachineInstr::MIFlag Flags=MachineInstr::NoFlags) const override
bool getFMAPatterns(MachineInstr &Root, SmallVectorImpl< unsigned > &Patterns, bool DoRegPressureReduce) const
Return true when there is potentially a faster code sequence for a fma chain ending in Root.
bool combineRLWINM(MachineInstr &MI, MachineInstr **ToErase=nullptr) const
bool isReallyTriviallyReMaterializable(const MachineInstr &MI) const override
void storeRegToStackSlot(MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI, Register SrcReg, bool isKill, int FrameIndex, const TargetRegisterClass *RC, const TargetRegisterInfo *TRI, Register VReg, MachineInstr::MIFlag Flags=MachineInstr::NoFlags) const override
const TargetRegisterClass * updatedRC(const TargetRegisterClass *RC) const
bool isPredicated(const MachineInstr &MI) const override
bool expandVSXMemPseudo(MachineInstr &MI) const
bool onlyFoldImmediate(MachineInstr &UseMI, MachineInstr &DefMI, Register Reg) const
int getExtendResourceLenLimit() const override
On PowerPC, we try to reassociate FMA chain which will increase instruction size.
Definition: PPCInstrInfo.h:521
bool isPrefixed(unsigned Opcode) const
Definition: PPCInstrInfo.h:386
void copyPhysReg(MachineBasicBlock &MBB, MachineBasicBlock::iterator I, const DebugLoc &DL, Register DestReg, Register SrcReg, bool KillSrc, bool RenamableDest=false, bool RenamableSrc=false) const override
void finalizeInsInstrs(MachineInstr &Root, unsigned &Pattern, SmallVectorImpl< MachineInstr * > &InsInstrs) const override
Fixup the placeholders we put in genAlternativeCodeSequence() for MachineCombiner.
MCInst getNop() const override
Return the noop instruction to use for a noop.
static int getRecordFormOpcode(unsigned Opcode)
MachineInstr * commuteInstructionImpl(MachineInstr &MI, bool NewMI, unsigned OpIdx1, unsigned OpIdx2) const override
Commutes the operands in the given instruction.
bool isXFormMemOp(unsigned Opcode) const
Definition: PPCInstrInfo.h:383
const PPCRegisterInfo & getRegisterInfo() const
getRegisterInfo - TargetInstrInfo is a superset of MRegister info.
Definition: PPCInstrInfo.h:381
CombinerObjective getCombinerObjective(unsigned Pattern) const override
void loadRegFromStackSlotNoUpd(MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI, unsigned DestReg, int FrameIndex, const TargetRegisterClass *RC, const TargetRegisterInfo *TRI) const
unsigned getStoreOpcodeForSpill(const TargetRegisterClass *RC) const
unsigned getLoadOpcodeForSpill(const TargetRegisterClass *RC) const
void promoteInstr32To64ForElimEXTSW(const Register &Reg, MachineRegisterInfo *MRI, unsigned BinOpDepth, LiveVariables *LV) const
bool isTOCSaveMI(const MachineInstr &MI) const
ScheduleHazardRecognizer * CreateTargetPostRAHazardRecognizer(const InstrItineraryData *II, const ScheduleDAG *DAG) const override
CreateTargetPostRAHazardRecognizer - Return the postRA hazard recognizer to use for this target when ...
bool isSExt32To64(unsigned Opcode) const
Definition: PPCInstrInfo.h:389
bool foldImmediate(MachineInstr &UseMI, MachineInstr &DefMI, Register Reg, MachineRegisterInfo *MRI) const override
bool isBDNZ(unsigned Opcode) const
Check Opcode is BDNZ (Decrement CTR and branch if it is still nonzero).
std::optional< unsigned > getOperandLatency(const InstrItineraryData *ItinData, SDNode *DefNode, unsigned DefIdx, SDNode *UseNode, unsigned UseIdx) const override
Definition: PPCInstrInfo.h:452
bool reverseBranchCondition(SmallVectorImpl< MachineOperand > &Cond) const override
bool isZeroExtended(const unsigned Reg, const MachineRegisterInfo *MRI) const
Definition: PPCInstrInfo.h:733
std::pair< unsigned, unsigned > decomposeMachineOperandsTargetFlags(unsigned TF) const override
std::pair< bool, bool > isSignOrZeroExtended(const unsigned Reg, const unsigned BinOpDepth, const MachineRegisterInfo *MRI) const
bool expandPostRAPseudo(MachineInstr &MI) const override
bool isProfitableToIfCvt(MachineBasicBlock &MBB, unsigned NumCycles, unsigned ExtraPredCycles, BranchProbability Probability) const override
Definition: PPCInstrInfo.h:616
void insertNoop(MachineBasicBlock &MBB, MachineBasicBlock::iterator MI) const override
bool isValidToBeChangedReg(MachineInstr *ADDMI, unsigned Index, MachineInstr *&ADDIMI, int64_t &OffsetAddi, int64_t OffsetImm) const
bool optimizeCompareInstr(MachineInstr &CmpInstr, Register SrcReg, Register SrcReg2, int64_t Mask, int64_t Value, const MachineRegisterInfo *MRI) const override
ArrayRef< std::pair< unsigned, const char * > > getSerializableDirectMachineOperandTargetFlags() const override
std::optional< unsigned > getOperandLatency(const InstrItineraryData *ItinData, const MachineInstr &DefMI, unsigned DefIdx, const MachineInstr &UseMI, unsigned UseIdx) const override
void materializeImmPostRA(MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI, const DebugLoc &DL, Register Reg, int64_t Imm) const
bool isADDInstrEligibleForFolding(MachineInstr &ADDMI) const
bool isZExt32To64(unsigned Opcode) const
Definition: PPCInstrInfo.h:392
bool areMemAccessesTriviallyDisjoint(const MachineInstr &MIa, const MachineInstr &MIb) const override
Return true if two MIs access different memory addresses and false otherwise.
bool SubsumesPredicate(ArrayRef< MachineOperand > Pred1, ArrayRef< MachineOperand > Pred2) const override
ScheduleHazardRecognizer * CreateTargetHazardRecognizer(const TargetSubtargetInfo *STI, const ScheduleDAG *DAG) const override
CreateTargetHazardRecognizer - Return the hazard recognizer to use for this target when scheduling th...
static bool isSameClassPhysRegCopy(unsigned Opcode)
Definition: PPCInstrInfo.h:399
bool canInsertSelect(const MachineBasicBlock &, ArrayRef< MachineOperand > Cond, Register, Register, Register, int &, int &, int &) const override
bool getMemOperandsWithOffsetWidth(const MachineInstr &LdSt, SmallVectorImpl< const MachineOperand * > &BaseOps, int64_t &Offset, bool &OffsetIsScalable, LocationSize &Width, const TargetRegisterInfo *TRI) const override
Get the base operand and byte offset of an instruction that reads/writes memory.
void setSpecialOperandAttr(MachineInstr &MI, uint32_t Flags) const
bool isADDIInstrEligibleForFolding(MachineInstr &ADDIMI, int64_t &Imm) const
bool useMachineCombiner() const override
Definition: PPCInstrInfo.h:469
void storeRegToStackSlotNoUpd(MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI, unsigned SrcReg, bool isKill, int FrameIndex, const TargetRegisterClass *RC, const TargetRegisterInfo *TRI) const
bool foldFrameOffset(MachineInstr &MI) const
bool isLoadFromConstantPool(MachineInstr *I) const
MachineInstr * findLoopInstr(MachineBasicBlock &PreHeader, SmallPtrSet< MachineBasicBlock *, 8 > &Visited) const
Find the hardware loop instruction used to set-up the specified loop.
unsigned removeBranch(MachineBasicBlock &MBB, int *BytesRemoved=nullptr) const override
unsigned getInstrLatency(const InstrItineraryData *ItinData, const MachineInstr &MI, unsigned *PredCost=nullptr) const override
bool isProfitableToUnpredicate(MachineBasicBlock &TMBB, MachineBasicBlock &FMBB) const override
Definition: PPCInstrInfo.h:633
bool isCoalescableExtInstr(const MachineInstr &MI, Register &SrcReg, Register &DstReg, unsigned &SubIdx) const override
bool convertToImmediateForm(MachineInstr &MI, SmallSet< Register, 4 > &RegsToUpdate, MachineInstr **KilledDef=nullptr) const
bool isAssociativeAndCommutative(const MachineInstr &Inst, bool Invert) const override
bool analyzeCompare(const MachineInstr &MI, Register &SrcReg, Register &SrcReg2, int64_t &Mask, int64_t &Value) const override
bool hasLowDefLatency(const TargetSchedModel &SchedModel, const MachineInstr &DefMI, unsigned DefIdx) const override
Definition: PPCInstrInfo.h:460
bool isProfitableToDupForIfCvt(MachineBasicBlock &MBB, unsigned NumCycles, BranchProbability Probability) const override
Definition: PPCInstrInfo.h:628
bool getMemOperandWithOffsetWidth(const MachineInstr &LdSt, const MachineOperand *&BaseOp, int64_t &Offset, LocationSize &Width, const TargetRegisterInfo *TRI) const
Return true if get the base operand, byte offset of an instruction and the memory width.
bool isMemriOp(unsigned Opcode) const
Definition: PPCInstrInfo.h:395
unsigned insertBranch(MachineBasicBlock &MBB, MachineBasicBlock *TBB, MachineBasicBlock *FBB, ArrayRef< MachineOperand > Cond, const DebugLoc &DL, int *BytesAdded=nullptr) const override
static bool hasTLSFlag(unsigned TF)
Definition: PPCInstrInfo.h:425
bool shouldReduceRegisterPressure(const MachineBasicBlock *MBB, const RegisterClassInfo *RegClassInfo) const override
On PowerPC, we leverage machine combiner pass to reduce register pressure when the register pressure ...
void genAlternativeCodeSequence(MachineInstr &Root, unsigned Pattern, SmallVectorImpl< MachineInstr * > &InsInstrs, SmallVectorImpl< MachineInstr * > &DelInstrs, DenseMap< Register, unsigned > &InstrIdxForVirtReg) const override
When getMachineCombinerPatterns() finds patterns, this function generates the instructions that could...
bool isSignExtended(const unsigned Reg, const MachineRegisterInfo *MRI) const
Definition: PPCInstrInfo.h:727
void replaceInstrOperandWithImm(MachineInstr &MI, unsigned OpNo, int64_t Imm) const
unsigned getInstSizeInBytes(const MachineInstr &MI) const override
GetInstSize - Return the number of bytes of code the specified instruction may be.
std::unique_ptr< TargetInstrInfo::PipelinerLoopInfo > analyzeLoopForPipelining(MachineBasicBlock *LoopBB) const override
Analyze loop L, which must be a single-basic-block loop, and if the conditions can be understood enou...
bool shouldClusterMemOps(ArrayRef< const MachineOperand * > BaseOps1, int64_t Offset1, bool OffsetIsScalable1, ArrayRef< const MachineOperand * > BaseOps2, int64_t Offset2, bool OffsetIsScalable2, unsigned ClusterSize, unsigned NumBytes) const override
Returns true if the two given memory operations should be scheduled adjacent.
static bool hasPCRelFlag(unsigned TF)
Definition: PPCInstrInfo.h:410
void replaceInstrWithLI(MachineInstr &MI, const LoadImmediateInfo &LII) const
bool isImmInstrEligibleForFolding(MachineInstr &MI, unsigned &BaseReg, unsigned &XFormOpcode, int64_t &OffsetOfImmInstr, ImmInstrInfo &III) const
bool PredicateInstruction(MachineInstr &MI, ArrayRef< MachineOperand > Pred) const override
bool getMachineCombinerPatterns(MachineInstr &Root, SmallVectorImpl< unsigned > &Patterns, bool DoRegPressureReduce) const override
Return true when there is potentially a faster code sequence for an instruction chain ending in <Root...
bool optimizeCmpPostRA(MachineInstr &MI) const
bool analyzeBranch(MachineBasicBlock &MBB, MachineBasicBlock *&TBB, MachineBasicBlock *&FBB, SmallVectorImpl< MachineOperand > &Cond, bool AllowModify) const override
const Constant * getConstantFromConstantPool(MachineInstr *I) const
bool ClobbersPredicate(MachineInstr &MI, std::vector< MachineOperand > &Pred, bool SkipDead) const override
static bool hasGOTFlag(unsigned TF)
Definition: PPCInstrInfo.h:418
void insertSelect(MachineBasicBlock &MBB, MachineBasicBlock::iterator MI, const DebugLoc &DL, Register DstReg, ArrayRef< MachineOperand > Cond, Register TrueReg, Register FalseReg) const override
bool findCommutedOpIndices(const MachineInstr &MI, unsigned &SrcOpIdx1, unsigned &SrcOpIdx2) const override
bool instrHasImmForm(unsigned Opc, bool IsVFReg, ImmInstrInfo &III, bool PostRA) const
MachineInstr * getDefMIPostRA(unsigned Reg, MachineInstr &MI, bool &SeenIntermediateUse) const
Wrapper class representing virtual and physical registers.
Definition: Register.h:19
Represents one node in the SelectionDAG.
HazardRecognizer - This determines whether or not an instruction can be issued this cycle,...
SmallPtrSet - This class implements a set which is optimized for holding SmallSize or less elements.
Definition: SmallPtrSet.h:541
SmallSet - This maintains a set of unique values, optimizing for the case when the set is small (less...
Definition: SmallSet.h:134
This class consists of common code factored out of the SmallVector class to reduce code duplication b...
Definition: SmallVector.h:574
virtual void setSpecialOperandAttr(MachineInstr &OldMI1, MachineInstr &OldMI2, MachineInstr &NewMI1, MachineInstr &NewMI2) const
This is an architecture-specific helper function of reassociateOps.
TargetRegisterInfo base class - We assume that the target defines a static array of TargetRegisterDes...
Provide an instruction scheduling machine model to CodeGen passes.
TargetSubtargetInfo - Generic base class for all target subtargets.
The instances of the Type class are immutable: once they are created, they are never changed.
Definition: Type.h:45
LLVM Value Representation.
Definition: Value.h:75
@ MO_TLSLD_LO
Definition: PPC.h:184
@ MO_TPREL_PCREL_FLAG
MO_TPREL_PCREL_FLAG = MO_PCREL_FLAG | MO_TPREL_FLAG.
Definition: PPC.h:197
@ MO_GOT_TPREL_PCREL_FLAG
MO_GOT_TPREL_PCREL_FLAG - A combintaion of flags, if these bits are set they should produce the reloc...
Definition: PPC.h:172
@ MO_GOT_PCREL_FLAG
MO_GOT_PCREL_FLAG = MO_PCREL_FLAG | MO_GOT_FLAG.
Definition: PPC.h:203
@ MO_TLSGDM_FLAG
MO_TLSGDM_FLAG - If this bit is set the symbol reference is relative to the region handle of TLS Gene...
Definition: PPC.h:154
@ MO_PCREL_FLAG
MO_PCREL_FLAG - If this bit is set, the symbol reference is relative to the current instruction addre...
Definition: PPC.h:121
@ MO_TLSLD_FLAG
MO_TLSLD_FLAG - If this bit is set the symbol reference is relative to TLS Local Dynamic model.
Definition: PPC.h:150
@ MO_TLS_PCREL_FLAG
MO_TPREL_PCREL_FLAG = MO_PCREL_FLAG | MO_TLS.
Definition: PPC.h:200
@ MO_GOT_FLAG
MO_GOT_FLAG - If this bit is set the symbol reference is to be computed via the GOT.
Definition: PPC.h:126
@ MO_TPREL_HA
Definition: PPC.h:179
@ MO_DTPREL_LO
These values identify relocations on immediates folded into memory operations.
Definition: PPC.h:183
@ MO_TLS
Symbol for VK_TLS fixup attached to an ADD instruction.
Definition: PPC.h:188
@ MO_TPREL_FLAG
MO_TPREL_FLAG - If this bit is set, the symbol reference is relative to the thread pointer and the sy...
Definition: PPC.h:140
@ MO_TPREL_LO
Definition: PPC.h:178
@ MO_GOT_TLSLD_PCREL_FLAG
MO_GOT_TLSLD_PCREL_FLAG - A combintaion of flags, if these bits are set they should produce the reloc...
Definition: PPC.h:166
@ MO_TLSGD_FLAG
MO_TLSGD_FLAG - If this bit is set the symbol reference is relative to TLS General Dynamic model for ...
Definition: PPC.h:135
@ MO_GOT_TLSGD_PCREL_FLAG
MO_GOT_TLSGD_PCREL_FLAG - A combintaion of flags, if these bits are set they should produce the reloc...
Definition: PPC.h:160
@ ZExt32To64
This instruction produced a zero extended result.
@ SExt32To64
This instruction produced a sign extended result.
@ Prefixed
This instruction is prefixed.
@ MemriOp
This instruction takes a register+immediate memory operand.
@ XFormMemOp
This instruction is an X-Form memory operation.
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18
@ Offset
Definition: DWP.cpp:477
decltype(auto) get(const PointerIntPair< PointerTy, IntBits, IntType, PtrTraits, Info > &Pair)
CombinerObjective
The combiner's goal may differ based on which pattern it is attempting to optimize.
PPCMachineCombinerPattern
Definition: PPCInstrInfo.h:92
@ REASSOC_XY_BCA
Definition: PPCInstrInfo.h:99
@ REASSOC_XY_BAC
Definition: PPCInstrInfo.h:100
@ REASSOC_XY_AMM_BMM
Definition: PPCInstrInfo.h:94
@ REASSOC_XMM_AMM_BMM
Definition: PPCInstrInfo.h:95
SpillOpcodeKey
Definition: PPCInstrInfo.h:68
@ SOK_CRBitSpill
Definition: PPCInstrInfo.h:74
@ SOK_VSXVectorSpill
Definition: PPCInstrInfo.h:76
@ SOK_SpillToVSR
Definition: PPCInstrInfo.h:79
@ SOK_Int4Spill
Definition: PPCInstrInfo.h:69
@ SOK_PairedVecSpill
Definition: PPCInstrInfo.h:80
@ SOK_VectorFloat8Spill
Definition: PPCInstrInfo.h:77
@ SOK_UAccumulatorSpill
Definition: PPCInstrInfo.h:82
@ SOK_PairedG8Spill
Definition: PPCInstrInfo.h:87
@ SOK_DMRSpill
Definition: PPCInstrInfo.h:85
@ SOK_VectorFloat4Spill
Definition: PPCInstrInfo.h:78
@ SOK_Float8Spill
Definition: PPCInstrInfo.h:71
@ SOK_Float4Spill
Definition: PPCInstrInfo.h:72
@ SOK_VRVectorSpill
Definition: PPCInstrInfo.h:75
@ SOK_WAccumulatorSpill
Definition: PPCInstrInfo.h:83
@ SOK_SPESpill
Definition: PPCInstrInfo.h:86
@ SOK_CRSpill
Definition: PPCInstrInfo.h:73
@ SOK_AccumulatorSpill
Definition: PPCInstrInfo.h:81
@ SOK_Int8Spill
Definition: PPCInstrInfo.h:70
@ SOK_LastOpcodeSpill
Definition: PPCInstrInfo.h:88
@ SOK_DMRpSpill
Definition: PPCInstrInfo.h:84
uint64_t IsSummingOperands
Definition: PPCInstrInfo.h:56
uint64_t OpNoForForwarding
Definition: PPCInstrInfo.h:46
uint64_t ImmMustBeMultipleOf
Definition: PPCInstrInfo.h:36
uint64_t IsCommutative
Definition: PPCInstrInfo.h:44
uint64_t ZeroIsSpecialNew
Definition: PPCInstrInfo.h:42
uint64_t TruncateImmTo
Definition: PPCInstrInfo.h:54
uint64_t ZeroIsSpecialOrig
Definition: PPCInstrInfo.h:39