Lines Matching full:sink

13 // for an LLVM-IR-level sinking pass. It is only designed to sink simple
65 #define DEBUG_TYPE "machine-sink"
68 SplitEdges("machine-sink-split",
73 UseBlockFreqInfo("machine-sink-bfi",
74 cl::desc("Use block frequency info to find successors to sink"),
78 "machine-sink-split-probability-threshold",
87 "machine-sink-load-instrs-threshold",
93 "machine-sink-load-blocks-threshold",
99 SinkInstsIntoCycle("sink-insts-to-avoid-spills",
100 cl::desc("Sink instructions into cycles to avoid "
105 "machine-sink-cycle-limit",
133 // Memorize the register that also wanted to sink into the same block along
135 // {register to sink, sink-to block} -> the first sink-from block.
136 // We're recording the first sink-from block because that (critical) edge
137 // was deferred until we see another register that's going to sink into the
158 /// Where if %0 were to sink, the DBG_VAUE should not sink with it, as that
163 /// debug instructions to sink.
242 /// If we sink a COPY inst, some debug users of it's destination may no
295 /// with a sink candidate.
371 // Don't sink instructions that the target prefers not to sink.
385 // Don't sink defs/uses of hard registers or if the instruction defines more
387 // Don't sink more than two register uses - it'll cover most of the cases and
519 // TODO: After performing the sink-and-fold, the original instruction is
529 // Sink a copy of the instruction, replacing a COPY instruction.
611 // into and they are all PHI nodes. In this case, machine-sink must break
695 LLVM_DEBUG(dbgs() << "CycleSink: Dont sink GOT or constant pool loads\n");
829 MachineInstr &MI = *I; // The instruction to sink.
848 // Can't sink anything out of a block that has less than two successors.
874 // we know what to sink if the vreg def sinks.
904 // Check and record the register and the destination block we want to sink
916 // We wanted to sink the same register into the same block, consider it to
947 // claim it's likely we can sink these together.
975 // It's not always legal to break critical edges and sink the computation
1007 // It's only legal to break critical edge and sink the computation to the
1095 /// isProfitableToSinkTo - Return true if it is profitable to sink MI.
1109 // It is profitable to sink an instruction from a deeper cycle to a shallower
1134 // If the instruction is not inside a cycle, it is not profitable to sink MI to
1188 // profitable to sink MI.
1204 // Handle cases where sinking can happen but where the sink point isn't a
1234 /// FindSuccToSinkTo - Find a successor to sink this instruction to.
1244 // SuccToSinkTo - This is the successor to sink this instruction to, once we
1265 // Virtual register uses are always safe to sink.
1275 // If a previous operand picked a block to sink to, then this operand
1286 // we should sink to. If we have reliable block frequency information
1302 // If we couldn't find a block to sink to, ignore this instruction.
1310 // It is not possible to sink an instruction into its own block. This can
1315 // It's not safe to sink instructions to EH landing pad. Control flow into
1320 // It ought to be okay to sink instructions into an INLINEASM_BR target, but
1436 /// Sink an instruction and its associated debug instructions.
1454 // Sink a copy of debug users to the insert position. Mark the original
1551 // We still have chance to sink MI if all stores between are not
1568 /// Sink instructions into cycles if profitable. This especially tries to
1572 LLVM_DEBUG(dbgs() << "CycleSink: Finding sink block for: " << I);
1574 assert(Preheader && "Cycle sink needs a preheader block");
1582 LLVM_DEBUG(dbgs() << "CycleSink: Use not in cycle, can't sink.\n");
1598 LLVM_DEBUG(dbgs() << "CycleSink: Setting sink block to: "
1613 LLVM_DEBUG(dbgs() << "CycleSink: Can't sink instruction.\n");
1617 LLVM_DEBUG(dbgs() << "CycleSink: Not sinking, can't find sink block.\n");
1622 dbgs() << "CycleSink: Not sinking, sink block is the preheader\n");
1643 assert(!I.isDebugInstr() && "Should not sink debug inst");
1648 /// SinkInstruction - Determine whether it is safe to sink the specified machine
1652 // Don't sink instructions that the target prefers not to sink.
1673 // also sink them down before their first use in the block. This xform has to
1698 LLVM_DEBUG(dbgs() << "Sink instr " << MI << "\tinto block " << *SuccToSinkTo);
1701 // Decide if we can sink along it or need to break the edge.
1703 // We cannot sink a load across a critical edge - there may be stores in
1709 LLVM_DEBUG(dbgs() << " *** NOTE: Won't sink load along critical edge.\n");
1713 // We don't want to sink across a critical edge if we don't dominate the
1720 // Don't sink instructions into a cycle.
1734 // will sink MI in the newly created block.
1747 // sunken into and they are all PHI nodes. In this case, machine-sink must
1774 // Sink any users that don't pass any other DBG_VALUEs for this variable.
1801 // uses as we may sink over another instruction which currently kills the
1815 // be sunk. For the rest, if they are not dominated by the block we will sink
1828 // If is in same block, will either sink or be use-before-def.
1852 // for the pre-ra machine sink pass. It is only designed to sink COPY
1862 // pass. As an example of the former case, the MachineSink pass cannot sink
1867 // For the machine IR below, this pass will sink %w19 in the entry into its
1881 // As we sink %w19 (CSR in AArch64) into %bb.1, the shrink-wrapping pass will be
1892 StringRef getPassName() const override { return "PostRA Machine Sink"; }
1914 /// Sink Copy instructions unused in the same block close to their uses in
1924 INITIALIZE_PASS(PostRAMachineSinking, "postra-machine-sink",
1925 "PostRA Machine Sink", false, false)
2050 // FIXME: For now, we sink only to a successor which has a single predecessor
2051 // so that we can directly sink COPY instructions to the successor without
2074 // We must sink this DBG_VALUE if its operand is sunk. To avoid searching
2081 // Bail if we can already tell the sink would be rejected, rather
2115 // Don't sink the COPY if it would violate a register dependency.
2126 // Don't sink if we cannot find a single sinkable successor in which Reg
2136 // Collect DBG_VALUEs that must sink with this copy. We've previously
2138 // writes any of those units then the corresponding DBG_VALUEs must sink.
2151 LLVM_DEBUG(dbgs() << "Sink instr " << MI << "\tinto block " << *SuccBB);