diff options
author | vitalyisaev <vitalyisaev@yandex-team.com> | 2023-06-29 10:00:50 +0300 |
---|---|---|
committer | vitalyisaev <vitalyisaev@yandex-team.com> | 2023-06-29 10:00:50 +0300 |
commit | 6ffe9e53658409f212834330e13564e4952558f6 (patch) | |
tree | 85b1e00183517648b228aafa7c8fb07f5276f419 /contrib/libs/llvm14/include/llvm/CodeGen/LiveIntervalCalc.h | |
parent | 726057070f9c5a91fc10fde0d5024913d10f1ab9 (diff) | |
download | ydb-6ffe9e53658409f212834330e13564e4952558f6.tar.gz |
YQ Connector: support managed ClickHouse
Со стороны dqrun можно обратиться к инстансу коннектора, который работает на streaming стенде, и извлечь данные из облачного CH.
Diffstat (limited to 'contrib/libs/llvm14/include/llvm/CodeGen/LiveIntervalCalc.h')
-rw-r--r-- | contrib/libs/llvm14/include/llvm/CodeGen/LiveIntervalCalc.h | 82 |
1 files changed, 82 insertions, 0 deletions
diff --git a/contrib/libs/llvm14/include/llvm/CodeGen/LiveIntervalCalc.h b/contrib/libs/llvm14/include/llvm/CodeGen/LiveIntervalCalc.h new file mode 100644 index 0000000000..8ed39e8b6d --- /dev/null +++ b/contrib/libs/llvm14/include/llvm/CodeGen/LiveIntervalCalc.h @@ -0,0 +1,82 @@ +#pragma once + +#ifdef __GNUC__ +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-parameter" +#endif + +//===- LiveIntervalCalc.h - Calculate live intervals -----------*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// +// +// The LiveIntervalCalc class is an extension of LiveRangeCalc targeted to the +// computation and modification of the LiveInterval variants of LiveRanges. +// LiveIntervals are meant to track liveness of registers and stack slots and +// LiveIntervalCalc adds to LiveRangeCalc all the machinery required to +// construct the liveness of virtual registers tracked by a LiveInterval. +// +//===----------------------------------------------------------------------===// + +#ifndef LLVM_CODEGEN_LIVEINTERVALCALC_H +#define LLVM_CODEGEN_LIVEINTERVALCALC_H + +#include "llvm/CodeGen/LiveRangeCalc.h" + +namespace llvm { + +template <class NodeT> class DomTreeNodeBase; + +using MachineDomTreeNode = DomTreeNodeBase<MachineBasicBlock>; + +class LiveIntervalCalc : public LiveRangeCalc { + /// Extend the live range of @p LR to reach all uses of Reg. + /// + /// If @p LR is a main range, or if @p LI is null, then all uses must be + /// jointly dominated by the definitions from @p LR. If @p LR is a subrange + /// of the live interval @p LI, corresponding to lane mask @p LaneMask, + /// all uses must be jointly dominated by the definitions from @p LR + /// together with definitions of other lanes where @p LR becomes undefined + /// (via <def,read-undef> operands). + /// If @p LR is a main range, the @p LaneMask should be set to ~0, i.e. + /// LaneBitmask::getAll(). + void extendToUses(LiveRange &LR, Register Reg, LaneBitmask LaneMask, + LiveInterval *LI = nullptr); + +public: + LiveIntervalCalc() = default; + + /// createDeadDefs - Create a dead def in LI for every def operand of Reg. + /// Each instruction defining Reg gets a new VNInfo with a corresponding + /// minimal live range. + void createDeadDefs(LiveRange &LR, Register Reg); + + /// Extend the live range of @p LR to reach all uses of Reg. + /// + /// All uses must be jointly dominated by existing liveness. PHI-defs are + /// inserted as needed to preserve SSA form. + void extendToUses(LiveRange &LR, MCRegister PhysReg) { + extendToUses(LR, PhysReg, LaneBitmask::getAll()); + } + + /// Calculates liveness for the register specified in live interval @p LI. + /// Creates subregister live ranges as needed if subreg liveness tracking is + /// enabled. + void calculate(LiveInterval &LI, bool TrackSubRegs); + + /// For live interval \p LI with correct SubRanges construct matching + /// information for the main live range. Expects the main live range to not + /// have any segments or value numbers. + void constructMainRangeFromSubranges(LiveInterval &LI); +}; + +} // end namespace llvm + +#endif // LLVM_CODEGEN_LIVEINTERVALCALC_H + +#ifdef __GNUC__ +#pragma GCC diagnostic pop +#endif |