LLVM: include/llvm/CodeGen/LiveInterval.h Source File (original) (raw)

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20#ifndef LLVM_CODEGEN_LIVEINTERVAL_H

21#define LLVM_CODEGEN_LIVEINTERVAL_H

22

34#include

35#include

36#include

37#include

38#include

39#include

40#include

41#include

42

43namespace llvm {

44

49

50

51

52

53

55 public:

57

58

60

61

63

64

66

67

69

70

74

75

76

77

78

80

81

83

84

86

89 };

90

95

96

97

98

100 VNInfo *const EarlyVal;

101 VNInfo *const LateVal;

103 const bool Kill;

104

105 public:

107 bool Kill)

108 : EarlyVal(EarlyVal), LateVal(LateVal), EndPoint(EndPoint), Kill(Kill)

109 {}

110

111

112

113

115 return EarlyVal;

116 }

117

118

119

120

124

125

127 return EndPoint.isDead();

128 }

129

130

131

133 return isDeadDef() ? nullptr : LateVal;

134 }

135

136

137

139 return LateVal;

140 }

141

142

143

145 return EarlyVal == LateVal ? nullptr : LateVal;

146 }

147

148

149

150

151

152

153

154

155

157 return EndPoint;

158 }

159 };

160

161

162

163

164

165

167 public:

168

169

170

174 VNInfo *valno = nullptr;

175

176

178

181 assert(S < E && "Cannot create empty or backwards segment");

182 }

183

184

188

189

191 assert((S < E) && "Backwards interval?");

193 }

194

201

203 return !(*this == Other);

204 }

205

207 };

208

211

214

215

216

217

220

223

226

229

232

235

238

242

246

247

251

252

253

256 "Copying of LiveRanges with active SegmentSets is not supported");

258 }

259

260

262 if (this == &Other)

263 return;

264

266 "Copying of LiveRanges with active SegmentSets is not supported");

267

270

273 }

274

275

276

277

278

279

283 return end();

284 while (I->end <= Pos) ++I;

285 return I;

286 }

287

291 return end();

292 while (I->end <= Pos) ++I;

293 return I;

294 }

295

296

297

298

299

300

301

302

304

308

313

317

319

321

323

324

325

327 return valnos[ValNo];

328 }

330 return valnos[ValNo];

331 }

332

333

337

338

339

342 new (VNInfoAllocator) VNInfo((unsigned)valnos.size(), Def);

343 valnos.push_back(VNI);

344 return VNI;

345 }

346

347

348

349

351

352

353

355

356

357

361 new (VNInfoAllocator) VNInfo((unsigned)valnos.size(), *orig);

362 valnos.push_back(VNI);

363 return VNI;

364 }

365

366

367

369

370

371

372

373

375

376

377

378

379

380

383

384

385

386

387

388

391

393

394

396 assert(empty() && "Call to beginIndex() on empty range.");

397 return segments.front().start;

398 }

399

400

401

403 assert(empty() && "Call to endIndex() on empty range.");

405 }

406

410

413 return r != end() && r->start <= index;

414 }

415

416

417

420 return I == end() ? nullptr : &*I;

421 }

422

423

424

427 return I == end() ? nullptr : &*I;

428 }

429

430

433 return I == end() ? nullptr : I->valno;

434 }

435

436

437

438

441 return I == end() ? nullptr : I->valno;

442 }

443

444

445

448 return I != end() && I->start <= Idx ? I : end();

449 }

450

453 return I != end() && I->start <= Idx ? I : end();

454 }

455

456

457

459 if (other.empty())

460 return false;

462 }

463

464

465

466

467

468

471

472

473

475

476

477

478

481

482

483

484

485

487

488

489

490

492

493

494

495

496

497

498

499

500

501

502

503

504

505

506

510

511

512

513

514

515

517

518

519

520

522 const int *RHSValNoAssignments,

524

525

526

527

528

530 return beginIndex() > Start.getBaseIndex() &&

532 }

533

534

535

536

538 bool RemoveDeadValNo = false);

539

543

544

546

547

549

550

551

552

554

557 if (I == E)

559

560

561

562

563 VNInfo *EarlyVal = nullptr;

564 VNInfo *LateVal = nullptr;

566 bool Kill = false;

568 EarlyVal = I->valno;

569 EndPoint = I->end;

570

572 Kill = true;

573 if (++I == E)

574 return LiveQueryResult(EarlyVal, LateVal, EndPoint, Kill);

575 }

576

577

578

579

581 EarlyVal = nullptr;

582 }

583

584

586 LateVal = I->valno;

587 EndPoint = I->end;

588 }

589 return LiveQueryResult(EarlyVal, LateVal, EndPoint, Kill);

590 }

591

592

593

595

596

597

602 return false;

603 return true;

604 }

605

606

607

608

610

614 return thisIndex < otherIndex;

615 }

616

617

618

622 return Begin <= Idx && Idx < End;

623 });

624 }

625

626

627

628

629

631

632

633

634

635

636

637

638 template <typename Range, typename OutputIt>

641 auto Idx = R.begin(), EndIdx = R.end();

643 bool Found = false;

644 while (Idx != EndIdx && Seg != EndSeg) {

645

646

647 if (Seg->end <= *Idx) {

648 Seg =

649 std::upper_bound(++Seg, EndSeg, *Idx, [=](auto V, const auto &S) {

650 return V < S.end;

651 });

652 if (Seg == EndSeg)

653 break;

654 }

655 auto NotLessStart = std::lower_bound(Idx, EndIdx, Seg->start);

656 if (NotLessStart == EndIdx)

657 break;

658 auto NotLessEnd = std::lower_bound(NotLessStart, EndIdx, Seg->end);

659 if (NotLessEnd != NotLessStart) {

660 Found = true;

661 O = std::copy(NotLessStart, NotLessEnd, O);

662 }

663 Idx = NotLessEnd;

664 ++Seg;

665 }

666 return Found;

667 }

668

671

672

673

674

675#ifdef NDEBUG

676 [[nodiscard]] bool verify() const { return true; }

677#else

678 [[nodiscard]] bool verify() const;

679#endif

680

681 protected:

682

684

685 private:

687 void addSegmentToSet(Segment S);

688 void markValNoForDeletion(VNInfo *V);

689 };

690

695

696

697

699 public:

701

702

703

704

706 public:

709

710

712

713

717

720 };

721

722 private:

723 SubRange *SubRanges = nullptr;

724

725 const Register Reg;

726 float Weight = 0.0;

727

728 public:

730 float weight() const { return Weight; }

733

735

739

740 template

742 T *P;

743

744 public:

750

752

759 ++*this;

760 return res;

761 }

763 return P != Other.operator->();

764 }

766 return P == Other.operator->();

767 }

774 };

775

778

785

792

796

800

801

802

806 appendSubRange(Range);

808 }

809

810

811

816 appendSubRange(Range);

818 }

819

820

822 return SubRanges != nullptr;

823 }

824

825

827

828

829

831

832

833

835

836

838

839

841

842

843

848

849

850

851

852

853

854

855

856

857

858

859

860

861

862

863

864

865

866

867

868

869

870

871

872

873

874

875

876

877

878

879

880

881

882

883

884

885

886

887

892 unsigned ComposeSubRegIdx = 0);

893

897 return std::tie(thisIndex, Reg) < std::tie(otherIndex, other.Reg);

898 }

899

902

903

904

905

906#ifdef NDEBUG

908 return true;

909 }

910#else

911 [[nodiscard]] bool verify(const MachineRegisterInfo *MRI = nullptr) const;

912#endif

913

914 private:

915

916 void appendSubRange(SubRange *Range) {

917 Range->Next = SubRanges;

918 SubRanges = Range;

919 }

920

921

922 void freeSubRange(SubRange *S);

923 };

924

930

935

937 const LiveRange::Segment &S);

938

940 return V < S.start;

941 }

942

944 return S.start < V;

945 }

946

947

948

949

950

951

952

953

954

961 void mergeSpills();

962

963 public:

964

965

967

969

970

971

972

974

978

979

980

981 bool isDirty() const { return LastStart.isValid(); }

982

983

984

986

987

989 if (LR != lr && isDirty())

991 LR = lr;

992 }

993

994

996

999 };

1000

1002 X.print(OS);

1003 return OS;

1004 }

1005

1006

1007

1008

1009

1010

1011

1012

1013

1014

1015

1016

1017

1018

1022

1023 public:

1025

1026

1027

1029

1030

1031

1033

1034

1035

1036

1037

1040 };

1041

1042}

1043

1044#endif

unsigned const MachineRegisterInfo * MRI

assert(UImm &&(UImm !=~static_cast< T >(0)) &&"Invalid immediate!")

This file defines the BumpPtrAllocator interface.

static GCRegistry::Add< CoreCLRGC > E("coreclr", "CoreCLR-compatible GC")

Equivalence classes for small integers.

A common definition of LaneBitmask for use in TableGen and CodeGen.

Register const TargetRegisterInfo * TRI

ConstantRange Range(APInt(BitWidth, Low), APInt(BitWidth, High))

This file defines the SmallVector class.

static TableGen::Emitter::OptClass< SkeletonEmitter > X("gen-skeleton-class", "Generate example skeleton class")

ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...

A helper class for register coalescers.

ConnectedVNInfoEqClasses(LiveIntervals &lis)

Definition LiveInterval.h:1024

LLVM_ABI void Distribute(LiveInterval &LI, LiveInterval *LIV[], MachineRegisterInfo &MRI)

Distribute values in LI into a separate LiveIntervals for each connected component.

LLVM_ABI unsigned Classify(const LiveRange &LR)

Classify the values in LR into connected components.

unsigned getEqClass(const VNInfo *VNI) const

getEqClass - Classify creates equivalence classes numbered 0..N.

Definition LiveInterval.h:1032

Definition LiveInterval.h:741

T & reference

Definition LiveInterval.h:748

T value_type

Definition LiveInterval.h:746

T * operator->() const

Definition LiveInterval.h:771

SingleLinkedListIterator< T > operator++(int)

Definition LiveInterval.h:757

std::forward_iterator_tag iterator_category

Definition LiveInterval.h:749

ptrdiff_t difference_type

Definition LiveInterval.h:745

SingleLinkedListIterator(T *P)

Definition LiveInterval.h:751

bool operator==(const SingleLinkedListIterator< T > &Other) const

Definition LiveInterval.h:765

bool operator!=(const SingleLinkedListIterator< T > &Other) const

Definition LiveInterval.h:762

SingleLinkedListIterator< T > & operator++()

Definition LiveInterval.h:753

T & operator*() const

Definition LiveInterval.h:768

T * pointer

Definition LiveInterval.h:747

A live range for subregisters.

Definition LiveInterval.h:705

LLVM_ABI void print(raw_ostream &OS) const

SubRange(LaneBitmask LaneMask)

Constructs a new SubRange object.

Definition LiveInterval.h:711

SubRange * Next

Definition LiveInterval.h:707

LaneBitmask LaneMask

Definition LiveInterval.h:708

LLVM_ABI void dump() const

SubRange(LaneBitmask LaneMask, const LiveRange &Other, BumpPtrAllocator &Allocator)

Constructs a new SubRange object by copying liveness from Other.

Definition LiveInterval.h:714

LiveInterval - This class represents the liveness of a register, or stack slot.

Definition LiveInterval.h:698

LLVM_ABI void removeEmptySubRanges()

Removes all subranges without any segments (subranges without segments are not considered valid and s...

void markNotSpillable()

markNotSpillable - Mark interval as not spillable

Definition LiveInterval.h:840

float weight() const

Definition LiveInterval.h:730

Register reg() const

Definition LiveInterval.h:729

bool isSpillable() const

isSpillable - Can this interval be spilled?

Definition LiveInterval.h:837

bool hasSubRanges() const

Returns true if subregister liveness information is available.

Definition LiveInterval.h:821

LLVM_ABI void dump() const

const_subrange_iterator subrange_begin() const

Definition LiveInterval.h:786

LiveRange super

Definition LiveInterval.h:700

~LiveInterval()

Definition LiveInterval.h:736

SingleLinkedListIterator< SubRange > subrange_iterator

Definition LiveInterval.h:776

LLVM_ABI unsigned getSize() const

getSize - Returns the sum of sizes of all the LiveRange's.

SubRange * createSubRangeFrom(BumpPtrAllocator &Allocator, LaneBitmask LaneMask, const LiveRange &CopyFrom)

Like createSubRange() but the new range is filled with a copy of the liveness information in CopyFrom...

Definition LiveInterval.h:812

iterator_range< subrange_iterator > subranges()

Definition LiveInterval.h:793

LLVM_ABI void refineSubRanges(BumpPtrAllocator &Allocator, LaneBitmask LaneMask, std::function< void(LiveInterval::SubRange &)> Apply, const SlotIndexes &Indexes, const TargetRegisterInfo &TRI, unsigned ComposeSubRegIdx=0)

Refines the subranges to support LaneMask.

const_subrange_iterator subrange_end() const

Definition LiveInterval.h:789

void incrementWeight(float Inc)

Definition LiveInterval.h:731

bool operator<(const LiveInterval &other) const

Definition LiveInterval.h:894

LLVM_ABI void print(raw_ostream &OS) const

LiveInterval(Register Reg, float Weight)

Definition LiveInterval.h:734

iterator_range< const_subrange_iterator > subranges() const

Definition LiveInterval.h:797

subrange_iterator subrange_begin()

Definition LiveInterval.h:779

subrange_iterator subrange_end()

Definition LiveInterval.h:782

SingleLinkedListIterator< const SubRange > const_subrange_iterator

Definition LiveInterval.h:777

LLVM_ABI void computeSubRangeUndefs(SmallVectorImpl< SlotIndex > &Undefs, LaneBitmask LaneMask, const MachineRegisterInfo &MRI, const SlotIndexes &Indexes) const

For a given lane mask LaneMask, compute indexes at which the lane is marked undefined by subregister ...

SubRange * createSubRange(BumpPtrAllocator &Allocator, LaneBitmask LaneMask)

Creates a new empty subregister live range.

Definition LiveInterval.h:803

void setWeight(float Value)

Definition LiveInterval.h:732

LLVM_ABI void clearSubRanges()

Removes all subregister liveness information.

Result of a LiveRange query.

Definition LiveInterval.h:99

VNInfo * valueOutOrDead() const

Returns the value alive at the end of the instruction, if any.

Definition LiveInterval.h:138

bool isDeadDef() const

Return true if this instruction has a dead def.

Definition LiveInterval.h:126

VNInfo * valueIn() const

Return the value that is live-in to the instruction.

Definition LiveInterval.h:114

VNInfo * valueOut() const

Return the value leaving the instruction, if any.

Definition LiveInterval.h:132

VNInfo * valueDefined() const

Return the value defined by this instruction, if any.

Definition LiveInterval.h:144

SlotIndex endPoint() const

Return the end point of the last live range segment to interact with the instruction,...

Definition LiveInterval.h:156

LiveQueryResult(VNInfo *EarlyVal, VNInfo *LateVal, SlotIndex EndPoint, bool Kill)

Definition LiveInterval.h:106

bool isKill() const

Return true if the live-in value is killed by this instruction.

Definition LiveInterval.h:121

Helper class for performant LiveRange bulk updates.

Definition LiveInterval.h:955

LLVM_ABI void print(raw_ostream &) const

void setDest(LiveRange *lr)

Select a different destination live range.

Definition LiveInterval.h:988

LLVM_ABI void flush()

Flush the updater state to LR so it is valid and contains all added segments.

~LiveRangeUpdater()

Definition LiveInterval.h:968

LiveRangeUpdater(LiveRange *lr=nullptr)

Create a LiveRangeUpdater for adding segments to LR.

Definition LiveInterval.h:966

void add(SlotIndex Start, SlotIndex End, VNInfo *VNI)

Definition LiveInterval.h:975

LLVM_ABI void dump() const

bool isDirty() const

Return true if the LR is currently in an invalid state, and flush() needs to be called.

Definition LiveInterval.h:981

LiveRange * getDest() const

Get the current destination live range.

Definition LiveInterval.h:995

LLVM_ABI void add(LiveRange::Segment)

Add a segment to LR and coalesce when possible, just like LR.addSegment().

This class represents the liveness of a register, stack slot, etc.

Definition LiveInterval.h:166

LiveRange(bool UseSegmentSet=false)

Constructs a new LiveRange object.

Definition LiveInterval.h:248

iterator_range< const_vni_iterator > vnis() const

Definition LiveInterval.h:243

VNInfo * getValNumInfo(unsigned ValNo)

getValNumInfo - Returns pointer to the specified val#.

Definition LiveInterval.h:326

LLVM_ABI iterator addSegment(Segment S)

Add the specified Segment to this range, merging segments as appropriate.

Segments::iterator iterator

Definition LiveInterval.h:221

const_iterator FindSegmentContaining(SlotIndex Idx) const

Definition LiveInterval.h:451

const Segment * getSegmentContaining(SlotIndex Idx) const

Return the segment that contains the specified index, or null if there is none.

Definition LiveInterval.h:418

VNInfoList::iterator vni_iterator

Definition LiveInterval.h:230

LLVM_ABI void join(LiveRange &Other, const int *ValNoAssignments, const int *RHSValNoAssignments, SmallVectorImpl< VNInfo * > &NewVNInfo)

join - Join two live ranges (this, and other) together.

LLVM_ABI void MergeValueInAsValue(const LiveRange &RHS, const VNInfo *RHSValNo, VNInfo *LHSValNo)

MergeValueInAsValue - Merge all of the segments of a specific val# in RHS into this live range as the...

iterator_range< vni_iterator > vnis()

Definition LiveInterval.h:239

const_iterator advanceTo(const_iterator I, SlotIndex Pos) const

Definition LiveInterval.h:288

LiveRange(const LiveRange &Other, BumpPtrAllocator &Allocator)

Constructs a new LiveRange object by copying segments and valnos from another LiveRange.

Definition LiveInterval.h:254

VNInfo * createValueCopy(const VNInfo *orig, VNInfo::Allocator &VNInfoAllocator)

Create a copy of the given value.

Definition LiveInterval.h:358

Segments::const_iterator const_iterator

Definition LiveInterval.h:222

bool liveAt(SlotIndex index) const

Definition LiveInterval.h:411

LLVM_ABI VNInfo * createDeadDef(SlotIndex Def, VNInfo::Allocator &VNIAlloc)

createDeadDef - Make sure the range has a value defined at Def.

std::set< Segment > SegmentSet

Definition LiveInterval.h:218

const_iterator find(SlotIndex Pos) const

Definition LiveInterval.h:305

const_iterator begin() const

Definition LiveInterval.h:227

LLVM_ABI bool isLiveAtIndexes(ArrayRef< SlotIndex > Slots) const

bool containsValue(const VNInfo *VNI) const

containsValue - Returns true if VNI belongs to this range.

Definition LiveInterval.h:334

LLVM_ABI bool covers(const LiveRange &Other) const

Returns true if all segments of the Other live range are completely covered by this live range.

vni_iterator vni_begin()

Definition LiveInterval.h:233

iterator advanceTo(iterator I, SlotIndex Pos)

advanceTo - Advance the specified iterator to point to the Segment containing the specified position,...

Definition LiveInterval.h:280

bool isZeroLength(SlotIndexes *Indexes) const

Returns true if the live range is zero length, i.e.

Definition LiveInterval.h:598

std::unique_ptr< SegmentSet > segmentSet

Definition LiveInterval.h:219

LLVM_ABI void removeValNo(VNInfo *ValNo)

removeValNo - Remove all the segments defined by the specified value#.

const_vni_iterator vni_begin() const

Definition LiveInterval.h:236

bool empty() const

Definition LiveInterval.h:392

LLVM_ABI void RenumberValues()

RenumberValues - Renumber all values in order of appearance and remove unused values.

bool overlaps(const LiveRange &other) const

overlaps - Return true if the intersection of the two live ranges is not empty.

Definition LiveInterval.h:458

LLVM_ABI bool overlapsFrom(const LiveRange &Other, const_iterator StartPos) const

overlapsFrom - Return true if the intersection of the two live ranges is not empty.

LiveQueryResult Query(SlotIndex Idx) const

Query Liveness at Idx.

Definition LiveInterval.h:553

iterator end()

Definition LiveInterval.h:225

bool findIndexesLiveAt(Range &&R, OutputIt O) const

Stores indexes from the input index sequence R at which this LiveRange is live to the output O iterat...

Definition LiveInterval.h:639

VNInfo * getVNInfoBefore(SlotIndex Idx) const

getVNInfoBefore - Return the VNInfo that is live up to but not necessarily including Idx,...

Definition LiveInterval.h:439

const_vni_iterator vni_end() const

Definition LiveInterval.h:237

LLVM_ABI std::pair< VNInfo *, bool > extendInBlock(ArrayRef< SlotIndex > Undefs, SlotIndex StartIdx, SlotIndex Kill)

Attempt to extend a value defined after StartIdx to include Use.

bool expiredAt(SlotIndex index) const

Definition LiveInterval.h:407

bool verify() const

Walk the range and assert if any invariants fail to hold.

LLVM_ABI void append(const LiveRange::Segment S)

Append a segment to the list of segments.

friend class LiveRangeUpdater

Definition LiveInterval.h:686

LLVM_ABI VNInfo * MergeValueNumberInto(VNInfo *V1, VNInfo *V2)

MergeValueNumberInto - This method is called when two value numbers are found to be equivalent.

unsigned getNumValNums() const

Definition LiveInterval.h:322

iterator begin()

Definition LiveInterval.h:224

const VNInfo * getValNumInfo(unsigned ValNo) const

Definition LiveInterval.h:329

SlotIndex beginIndex() const

beginIndex - Return the lowest numbered slot covered.

Definition LiveInterval.h:395

Segments segments

Definition LiveInterval.h:212

const_iterator end() const

Definition LiveInterval.h:228

VNInfoList valnos

Definition LiveInterval.h:213

void clear()

Definition LiveInterval.h:309

SlotIndex endIndex() const

endNumber - return the maximum point of the range of the whole, exclusive.

Definition LiveInterval.h:402

LLVM_ABI void MergeSegmentsInAsValue(const LiveRange &RHS, VNInfo *LHSValNo)

Merge all of the live segments of a specific val# in RHS into this live range as the specified value ...

Segment * getSegmentContaining(SlotIndex Idx)

Return the live segment that contains the specified index, or null if there is none.

Definition LiveInterval.h:425

bool isUndefIn(ArrayRef< SlotIndex > Undefs, SlotIndex Begin, SlotIndex End) const

Returns true if there is an explicit "undef" between Begin End.

Definition LiveInterval.h:619

bool containsOneValue() const

Definition LiveInterval.h:320

size_t size() const

Definition LiveInterval.h:314

vni_iterator vni_end()

Definition LiveInterval.h:234

bool hasAtLeastOneValue() const

Definition LiveInterval.h:318

SmallVector< Segment, 2 > Segments

Definition LiveInterval.h:209

VNInfoList::const_iterator const_vni_iterator

Definition LiveInterval.h:231

bool isLocal(SlotIndex Start, SlotIndex End) const

True iff this segment is a single segment that lies between the specified boundaries,...

Definition LiveInterval.h:529

VNInfo * getNextValue(SlotIndex Def, VNInfo::Allocator &VNInfoAllocator)

getNextValue - Create a new value number and return it.

Definition LiveInterval.h:340

iterator FindSegmentContaining(SlotIndex Idx)

Return an iterator to the segment that contains the specified index, or end() if there is none.

Definition LiveInterval.h:446

void assign(const LiveRange &Other, BumpPtrAllocator &Allocator)

Copies values numbers and live segments from Other into this range.

Definition LiveInterval.h:261

LLVM_ABI void removeSegment(SlotIndex Start, SlotIndex End, bool RemoveDeadValNo=false)

Remove the specified interval from this live range.

LLVM_ABI void removeValNoIfDead(VNInfo *ValNo)

Mark ValNo for deletion if no segments in this range use it.

void removeSegment(Segment S, bool RemoveDeadValNo=false)

Definition LiveInterval.h:540

LLVM_ABI void dump() const

SmallVector< VNInfo *, 2 > VNInfoList

Definition LiveInterval.h:210

bool operator<(const LiveRange &other) const

Definition LiveInterval.h:611

LLVM_ABI void print(raw_ostream &OS) const

LLVM_ABI void flushSegmentSet()

Flush segment set into the regular segment vector.

VNInfo * getVNInfoAt(SlotIndex Idx) const

getVNInfoAt - Return the VNInfo that is live at Idx, or NULL.

Definition LiveInterval.h:431

LLVM_ABI iterator find(SlotIndex Pos)

find - Return an iterator pointing to the first segment that ends after Pos, or end().

MachineRegisterInfo - Keep track of information for virtual and physical registers,...

Wrapper class representing virtual and physical registers.

SlotIndex - An opaque wrapper around machine indexes.

static bool isSameInstr(SlotIndex A, SlotIndex B)

isSameInstr - Return true if A and B refer to the same instruction.

static bool isEarlierInstr(SlotIndex A, SlotIndex B)

isEarlierInstr - Return true if A refers to an instruction earlier than B.

SlotIndex getBoundaryIndex() const

Returns the boundary index for associated with this index.

SlotIndex getBaseIndex() const

Returns the base index for associated with this index.

SlotIndex getPrevSlot() const

Returns the previous slot in the index list.

SlotIndex getNextNonNullIndex(SlotIndex Index)

Returns the next non-null index, if one exists.

This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.

TargetRegisterInfo base class - We assume that the target defines a static array of TargetRegisterDes...

VNInfo - Value Number Information.

Definition LiveInterval.h:54

void copyFrom(VNInfo &src)

Copy from the parameter into this VNInfo.

Definition LiveInterval.h:71

LLVM_ABI void dump() const

VNInfo(unsigned i, SlotIndex d)

VNInfo constructor.

Definition LiveInterval.h:65

VNInfo(unsigned i, const VNInfo &orig)

VNInfo constructor, copies values from orig, except for the value number.

Definition LiveInterval.h:68

LLVM_ABI void print(raw_ostream &OS) const

void markUnused()

Mark this value as unused.

Definition LiveInterval.h:85

BumpPtrAllocator Allocator

Definition LiveInterval.h:56

bool isUnused() const

Returns true if this value is unused.

Definition LiveInterval.h:82

unsigned id

The ID number of this value.

Definition LiveInterval.h:59

SlotIndex def

The index of the defining instruction.

Definition LiveInterval.h:62

bool isPHIDef() const

Returns true if this value is defined by a PHI instruction (or was, PHI instructions may have been el...

Definition LiveInterval.h:79

LLVM Value Representation.

A range adaptor for a pair of iterators.

This class implements an extremely fast bulk output stream that can only output to a stream.

This provides a very simple, boring adaptor for a begin and end iterator into a range type.

This is an optimization pass for GlobalISel generic memory operations.

bool operator<(int64_t V1, const APSInt &V2)

iterator_range< T > make_range(T x, T y)

Convenience function for iterating over sub-ranges.

bool any_of(R &&range, UnaryPredicate P)

Provide wrappers to std::any_of which take ranges instead of having to pass begin/end explicitly.

bool is_sorted(R &&Range, Compare C)

Wrapper function around std::is_sorted to check if elements in a range R are sorted with respect to a...

LLVM_ABI const float huge_valf

Use this rather than HUGE_VALF; the latter causes warnings on MSVC.

raw_ostream & operator<<(raw_ostream &OS, const APFixedPoint &FX)

BumpPtrAllocatorImpl<> BumpPtrAllocator

The standard BumpPtrAllocator which just uses the default template parameters.

Implement std::hash so that hash_code can be used in STL containers.

This represents a simple continuous liveness interval for a value.

Definition LiveInterval.h:171

bool operator==(const Segment &Other) const

Definition LiveInterval.h:198

SlotIndex start

Definition LiveInterval.h:172

bool containsInterval(SlotIndex S, SlotIndex E) const

Return true if the given interval, [S, E), is covered by this segment.

Definition LiveInterval.h:190

bool operator!=(const Segment &Other) const

Definition LiveInterval.h:202

Segment(SlotIndex S, SlotIndex E, VNInfo *V)

Definition LiveInterval.h:179

bool contains(SlotIndex I) const

Return true if the index is covered by this segment.

Definition LiveInterval.h:185

VNInfo * valno

Definition LiveInterval.h:174

LLVM_ABI void dump() const

bool operator<(const Segment &Other) const

Definition LiveInterval.h:195

SlotIndex end

Definition LiveInterval.h:173