19
19
#include " llvm/CodeGen/MachineInstr.h"
20
20
#include " llvm/CodeGen/TargetRegisterInfo.h"
21
21
#include " llvm/IR/DebugInfoMetadata.h"
22
+ #include " llvm/Support/Compiler.h"
22
23
#include < optional>
23
24
24
25
#include " LiveDebugValues.h"
@@ -204,8 +205,8 @@ class ValueIDNum {
204
205
.str ();
205
206
}
206
207
207
- static ValueIDNum EmptyValue;
208
- static ValueIDNum TombstoneValue;
208
+ LLVM_ABI static ValueIDNum EmptyValue;
209
+ LLVM_ABI static ValueIDNum TombstoneValue;
209
210
};
210
211
211
212
} // End namespace LiveDebugValues
@@ -425,7 +426,7 @@ struct DbgOpID {
425
426
DbgOpID (uint32_t RawID) : RawID(RawID) {}
426
427
DbgOpID (bool IsConst, uint32_t Index) : ID({IsConst, Index}) {}
427
428
428
- static DbgOpID UndefID;
429
+ LLVM_ABI static DbgOpID UndefID;
429
430
430
431
bool operator ==(const DbgOpID &Other) const { return RawID == Other.RawID ; }
431
432
bool operator !=(const DbgOpID &Other) const { return !(*this == Other); }
@@ -788,7 +789,7 @@ class MLocTracker {
788
789
value_type operator *() { return value_type (Idx, ValueMap[LocIdx (Idx)]); }
789
790
};
790
791
791
- MLocTracker (MachineFunction &MF, const TargetInstrInfo &TII,
792
+ LLVM_ABI MLocTracker (MachineFunction &MF, const TargetInstrInfo &TII,
792
793
const TargetRegisterInfo &TRI, const TargetLowering &TLI);
793
794
794
795
// / Produce location ID number for a Register. Provides some small amount of
@@ -903,7 +904,7 @@ class MLocTracker {
903
904
904
905
// / Create a LocIdx for an untracked register ID. Initialize it to either an
905
906
// / mphi value representing a live-in, or a recent register mask clobber.
906
- LocIdx trackRegister (unsigned ID);
907
+ LLVM_ABI LocIdx trackRegister (unsigned ID);
907
908
908
909
LocIdx lookupOrTrackRegister (unsigned ID) {
909
910
LocIdx &Index = LocIDToLocIdx[ID];
@@ -968,7 +969,7 @@ class MLocTracker {
968
969
// / Find LocIdx for SpillLoc \p L, creating a new one if it's not tracked.
969
970
// / Returns std::nullopt when in scenarios where a spill slot could be
970
971
// / tracked, but we would likely run into resource limitations.
971
- std::optional<SpillLocationNo> getOrTrackSpillLoc (SpillLoc L);
972
+ LLVM_ABI std::optional<SpillLocationNo> getOrTrackSpillLoc (SpillLoc L);
972
973
973
974
// Get LocIdx of a spill ID.
974
975
LocIdx getSpillMLoc (unsigned SpillID) {
@@ -1342,7 +1343,7 @@ class InstrRefBasedLDV : public LDVImpl {
1342
1343
// / in an MLocTracker. Convert the observations into a per-block transfer
1343
1344
// / function in \p MLocTransfer, suitable for using with the machine value
1344
1345
// / location dataflow problem.
1345
- void
1346
+ LLVM_ABI void
1346
1347
produceMLocTransferFunction (MachineFunction &MF,
1347
1348
SmallVectorImpl<MLocTransferMap> &MLocTransfer,
1348
1349
unsigned MaxNumBlocks);
@@ -1352,7 +1353,7 @@ class InstrRefBasedLDV : public LDVImpl {
1352
1353
// / live-out arrays to the (initialized to zero) multidimensional arrays in
1353
1354
// / \p MInLocs and \p MOutLocs. The outer dimension is indexed by block
1354
1355
// / number, the inner by LocIdx.
1355
- void buildMLocValueMap (MachineFunction &MF, FuncValueTable &MInLocs,
1356
+ LLVM_ABI void buildMLocValueMap (MachineFunction &MF, FuncValueTable &MInLocs,
1356
1357
FuncValueTable &MOutLocs,
1357
1358
SmallVectorImpl<MLocTransferMap> &MLocTransfer);
1358
1359
@@ -1362,7 +1363,7 @@ class InstrRefBasedLDV : public LDVImpl {
1362
1363
1363
1364
// / Install PHI values into the live-in array for each block, according to
1364
1365
// / the IDF of each register.
1365
- void placeMLocPHIs (MachineFunction &MF,
1366
+ LLVM_ABI void placeMLocPHIs (MachineFunction &MF,
1366
1367
SmallPtrSetImpl<MachineBasicBlock *> &AllBlocks,
1367
1368
FuncValueTable &MInLocs,
1368
1369
SmallVectorImpl<MLocTransferMap> &MLocTransfer);
@@ -1422,7 +1423,7 @@ class InstrRefBasedLDV : public LDVImpl {
1422
1423
// / \p AssignBlocks contains the set of blocks that aren't in \p DILoc's
1423
1424
// / scope, but which do contain DBG_VALUEs, which VarLocBasedImpl tracks
1424
1425
// / locations through.
1425
- void buildVLocValueMap (const DILocation *DILoc,
1426
+ LLVM_ABI void buildVLocValueMap (const DILocation *DILoc,
1426
1427
const SmallSet<DebugVariableID, 4 > &VarsWeCareAbout,
1427
1428
SmallPtrSetImpl<MachineBasicBlock *> &AssignBlocks,
1428
1429
LiveInsT &Output, FuncValueTable &MOutLocs,
@@ -1436,7 +1437,7 @@ class InstrRefBasedLDV : public LDVImpl {
1436
1437
// / \p LiveIn Old live-in value, overwritten with new one if live-in changes.
1437
1438
// / \returns true if any live-ins change value, either from value propagation
1438
1439
// / or PHI elimination.
1439
- bool vlocJoin (MachineBasicBlock &MBB, LiveIdxT &VLOCOutLocs,
1440
+ LLVM_ABI bool vlocJoin (MachineBasicBlock &MBB, LiveIdxT &VLOCOutLocs,
1440
1441
SmallPtrSet<const MachineBasicBlock *, 8 > &BlocksToExplore,
1441
1442
DbgValue &LiveIn);
1442
1443
@@ -1445,7 +1446,7 @@ class InstrRefBasedLDV : public LDVImpl {
1445
1446
// / into that operand join together.
1446
1447
// / \returns true if a joined location was found for every value that needed
1447
1448
// / to be joined.
1448
- bool
1449
+ LLVM_ABI bool
1449
1450
pickVPHILoc (SmallVectorImpl<DbgOpID> &OutValues, const MachineBasicBlock &MBB,
1450
1451
const LiveIdxT &LiveOuts, FuncValueTable &MOutLocs,
1451
1452
const SmallVectorImpl<const MachineBasicBlock *> &BlockOrders);
@@ -1461,7 +1462,7 @@ class InstrRefBasedLDV : public LDVImpl {
1461
1462
1462
1463
// / Boilerplate computation of some initial sets, artifical blocks and
1463
1464
// / RPOT block ordering.
1464
- void initialSetup (MachineFunction &MF);
1465
+ LLVM_ABI void initialSetup (MachineFunction &MF);
1465
1466
1466
1467
// / Produce a map of the last lexical scope that uses a block, using the
1467
1468
// / scopes DFSOut number. Mapping is block-number to DFSOut.
@@ -1490,7 +1491,7 @@ class InstrRefBasedLDV : public LDVImpl {
1490
1491
1491
1492
public:
1492
1493
// / Default construct and initialize the pass.
1493
- InstrRefBasedLDV ();
1494
+ LLVM_ABI InstrRefBasedLDV ();
1494
1495
1495
1496
LLVM_DUMP_METHOD
1496
1497
void dump_mloc_transfer (const MLocTransferMap &mloc_transfer) const ;
0 commit comments