Lines Matching +full:num +full:- +full:transfer +full:- +full:bits
1 //===- InstrRefBasedImpl.h - Tracking Debug Value MIs ---------------------===//
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
44 /// DebugVariables as identities of variables. It's much more compile-time
54 return It->second;
65 return ItPair.first->second;
76 /// Handle-class for a particular "location". This value-type uniquely
91 assert(L < (1 << NUM_LOC_BITS) && "Machine locations must fit in 24 bits");
97 --L.Location;
137 /// bit-constrained. Each value identifies the instruction and machine location
140 /// one-based, and definitions that are PHIs have instruction number zero.
160 // Default-initialize to EmptyValue. This is necessary to make IndexedMaps
200 : Twine("live-in"))
291 /// Thin wrapper around an integer -- designed to give more type safety to
321 assert(MI.getDebugExpression()->getNumLocationOperands() == 0 ||
343 return IsVariadic ? DIExpr->getNumLocationOperands() : 1;
409 /// DbgOp is a constant, meaning that for simple equality or const-ness checks
445 /// within the current function. Allows 2-way lookup, with `find` returning the
489 return ExistingIt->second;
498 return ExistingIt->second;
515 /// This class also stores meta-information about how the value is qualified.
522 /// machine-value for every operand, and sets them to the corresponding
523 /// machine-values when we have found all of them.
535 Undef, // Represents a DBG_VALUE $noreg in the transfer function only.
543 /// Discriminator for whether this is a constant or an in-program value.
563 this->DbgOps[Idx] = DbgOps[Idx];
666 /// target machine than the actual working-set size of the function. On x86 for
679 /// Slot Num (%stack.0) /
714 /// as the number of registers on the target -- if the value in the register
730 /// Unique-ification of spill. Used to number them -- their LocID number is
736 unsigned CurBB = -1;
741 /// Number of slot indexes the target has -- distinct segments of a stack
742 /// slot that can take on the value of a subregister, when a super-register
752 /// Pair for describing a position within a stack slot -- first the size in
753 /// bits, then the offset.
776 const LocIdx Idx; /// Read-only index of this location.
818 unsigned SlotNo = Spill.id() - 1;
829 unsigned SlotNo = Spill.id() - 1;
839 ID -= NumRegs;
842 return SpillLocationNo(ID + 1); // The UniqueVector is one-based.
845 /// Returns the spill-slot size/offs that a location ID corresponds to.
848 ID -= NumRegs;
850 return StackIdxesToPos.find(Idx)->second;
868 // Iterate over all tracked locations, and load each locations live-in
874 /// Wipe any un-necessary location records after traversing a block.
877 // or setMPhis should be called before this object is re-used. Just
899 void setMLoc(LocIdx L, ValueIDNum Num) {
901 LocIdxToIDNum[L] = Num;
911 /// mphi value representing a live-in, or a recent register mask clobber.
1014 std::string IDAsString(const ValueIDNum &Num) const;
1044 /// Ref to function-wide map of DebugVariable <=> ID-numbers.
1047 /// Needs to be a MapVector because we determine order-in-the-input-MIR from
1051 /// determine the blocks live-out variable value. The Vars container forms the
1052 /// transfer function for this block, as part of the dataflow analysis. The
1071 MI.getDebugLoc()->getInlinedAt());
1081 Result.first->second = Rec;
1094 for (auto FragmentInfo : Overlaps->second) {
1111 Result.first->second = Rec;
1135 /// Machine location/value transfer function, a mapping of which locations
1139 /// Live in/out structure for the variable values: a per-block map of
1145 /// Type for a live-in value: the predecessor block, and its value.
1148 /// Vector (per block) of a collection (inner smallvector) of live-ins.
1184 unsigned CurBB = -1;
1189 /// Variable tracker -- listens to DBG_VALUEs occurring as InstrRefBasedImpl
1208 /// Pair of MachineInstr, and its 1-based offset into the containing block.
1222 /// The value number read by the DBG_PHI -- or std::nullopt if it didn't
1225 /// Register/Stack location the DBG_PHI reads -- or std::nullopt if it
1234 /// location problem -- we use LLVMs SSA Updater to fix changes by
1272 /// - Is this instruction a store to a spill slot?
1273 /// - Is there a register operand that is both used and killed?
1311 /// Stores value-information about where this PHI occurred, and what
1336 /// forming another mini-ssa problem to solve.
1353 /// in an MLocTracker. Convert the observations into a per-block transfer
1362 /// transfer functions in \p MLocTransfer. Writes the output live-in and
1363 /// live-out arrays to the (initialized to zero) multidimensional arrays in
1371 /// basic units of interference -- like reg units, but for the stack.
1374 /// Install PHI values into the live-in array for each block, according to
1390 /// Calculate the iterated-dominance-frontier for a set of defs, using the
1401 /// locations at \p MBB. Follows the algorithm described in the file-comment,
1402 /// reading live-outs of predecessors from \p OutLocs, the current live ins
1404 /// \p InLocs. \returns two bools -- the first indicates whether a change
1417 /// \p Output Set to put in-scope-blocks into.
1428 /// and reads the variable values transfer function from \p AllTheVlocs.
1429 /// Live-in and Live-out variable values are stored locally, with the live-ins
1443 /// Attempt to eliminate un-necessary PHIs on entry to a block. Examines the
1444 /// live-in values coming from predecessors live-outs, and replaces any PHIs
1445 /// already present in this blocks live-ins with a live-through value if the
1447 /// \p LiveIn Old live-in value, overwritten with new one if live-in changes.
1448 /// \returns true if any live-ins change value, either from value propagation
1454 /// For the given block and live-outs feeding into it, try to find
1478 /// scopes DFSOut number. Mapping is block-number to DFSOut.
1479 /// \p EjectionMap Pre-allocated vector in which to install the built ma.
1486 /// When determining per-block variable values and emitting to DBG_VALUEs,
1521 return MemOperand->isStore() &&
1522 MemOperand->getPseudoValue() &&
1523 MemOperand->getPseudoValue()->kind() == PseudoSourceValue::FixedStack
1524 && !MemOperand->getPseudoValue()->isAliased(MFI);