SparsePropagation.h 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536
  1. #pragma once
  2. #ifdef __GNUC__
  3. #pragma GCC diagnostic push
  4. #pragma GCC diagnostic ignored "-Wunused-parameter"
  5. #endif
  6. //===- SparsePropagation.h - Sparse Conditional Property Propagation ------===//
  7. //
  8. // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
  9. // See https://llvm.org/LICENSE.txt for license information.
  10. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  11. //
  12. //===----------------------------------------------------------------------===//
  13. //
  14. // This file implements an abstract sparse conditional propagation algorithm,
  15. // modeled after SCCP, but with a customizable lattice function.
  16. //
  17. //===----------------------------------------------------------------------===//
  18. #ifndef LLVM_ANALYSIS_SPARSEPROPAGATION_H
  19. #define LLVM_ANALYSIS_SPARSEPROPAGATION_H
  20. #include "llvm/IR/Instructions.h"
  21. #include "llvm/Support/Debug.h"
  22. #include <set>
  23. #define DEBUG_TYPE "sparseprop"
  24. namespace llvm {
  25. /// A template for translating between LLVM Values and LatticeKeys. Clients must
  26. /// provide a specialization of LatticeKeyInfo for their LatticeKey type.
  27. template <class LatticeKey> struct LatticeKeyInfo {
  28. // static inline Value *getValueFromLatticeKey(LatticeKey Key);
  29. // static inline LatticeKey getLatticeKeyFromValue(Value *V);
  30. };
  31. template <class LatticeKey, class LatticeVal,
  32. class KeyInfo = LatticeKeyInfo<LatticeKey>>
  33. class SparseSolver;
  34. /// AbstractLatticeFunction - This class is implemented by the dataflow instance
  35. /// to specify what the lattice values are and how they handle merges etc. This
  36. /// gives the client the power to compute lattice values from instructions,
  37. /// constants, etc. The current requirement is that lattice values must be
  38. /// copyable. At the moment, nothing tries to avoid copying. Additionally,
  39. /// lattice keys must be able to be used as keys of a mapping data structure.
  40. /// Internally, the generic solver currently uses a DenseMap to map lattice keys
  41. /// to lattice values. If the lattice key is a non-standard type, a
  42. /// specialization of DenseMapInfo must be provided.
  43. template <class LatticeKey, class LatticeVal> class AbstractLatticeFunction {
  44. private:
  45. LatticeVal UndefVal, OverdefinedVal, UntrackedVal;
  46. public:
  47. AbstractLatticeFunction(LatticeVal undefVal, LatticeVal overdefinedVal,
  48. LatticeVal untrackedVal) {
  49. UndefVal = undefVal;
  50. OverdefinedVal = overdefinedVal;
  51. UntrackedVal = untrackedVal;
  52. }
  53. virtual ~AbstractLatticeFunction() = default;
  54. LatticeVal getUndefVal() const { return UndefVal; }
  55. LatticeVal getOverdefinedVal() const { return OverdefinedVal; }
  56. LatticeVal getUntrackedVal() const { return UntrackedVal; }
  57. /// IsUntrackedValue - If the specified LatticeKey is obviously uninteresting
  58. /// to the analysis (i.e., it would always return UntrackedVal), this
  59. /// function can return true to avoid pointless work.
  60. virtual bool IsUntrackedValue(LatticeKey Key) { return false; }
  61. /// ComputeLatticeVal - Compute and return a LatticeVal corresponding to the
  62. /// given LatticeKey.
  63. virtual LatticeVal ComputeLatticeVal(LatticeKey Key) {
  64. return getOverdefinedVal();
  65. }
  66. /// IsSpecialCasedPHI - Given a PHI node, determine whether this PHI node is
  67. /// one that the we want to handle through ComputeInstructionState.
  68. virtual bool IsSpecialCasedPHI(PHINode *PN) { return false; }
  69. /// MergeValues - Compute and return the merge of the two specified lattice
  70. /// values. Merging should only move one direction down the lattice to
  71. /// guarantee convergence (toward overdefined).
  72. virtual LatticeVal MergeValues(LatticeVal X, LatticeVal Y) {
  73. return getOverdefinedVal(); // always safe, never useful.
  74. }
  75. /// ComputeInstructionState - Compute the LatticeKeys that change as a result
  76. /// of executing instruction \p I. Their associated LatticeVals are store in
  77. /// \p ChangedValues.
  78. virtual void
  79. ComputeInstructionState(Instruction &I,
  80. DenseMap<LatticeKey, LatticeVal> &ChangedValues,
  81. SparseSolver<LatticeKey, LatticeVal> &SS) = 0;
  82. /// PrintLatticeVal - Render the given LatticeVal to the specified stream.
  83. virtual void PrintLatticeVal(LatticeVal LV, raw_ostream &OS);
  84. /// PrintLatticeKey - Render the given LatticeKey to the specified stream.
  85. virtual void PrintLatticeKey(LatticeKey Key, raw_ostream &OS);
  86. /// GetValueFromLatticeVal - If the given LatticeVal is representable as an
  87. /// LLVM value, return it; otherwise, return nullptr. If a type is given, the
  88. /// returned value must have the same type. This function is used by the
  89. /// generic solver in attempting to resolve branch and switch conditions.
  90. virtual Value *GetValueFromLatticeVal(LatticeVal LV, Type *Ty = nullptr) {
  91. return nullptr;
  92. }
  93. };
  94. /// SparseSolver - This class is a general purpose solver for Sparse Conditional
  95. /// Propagation with a programmable lattice function.
  96. template <class LatticeKey, class LatticeVal, class KeyInfo>
  97. class SparseSolver {
  98. /// LatticeFunc - This is the object that knows the lattice and how to
  99. /// compute transfer functions.
  100. AbstractLatticeFunction<LatticeKey, LatticeVal> *LatticeFunc;
  101. /// ValueState - Holds the LatticeVals associated with LatticeKeys.
  102. DenseMap<LatticeKey, LatticeVal> ValueState;
  103. /// BBExecutable - Holds the basic blocks that are executable.
  104. SmallPtrSet<BasicBlock *, 16> BBExecutable;
  105. /// ValueWorkList - Holds values that should be processed.
  106. SmallVector<Value *, 64> ValueWorkList;
  107. /// BBWorkList - Holds basic blocks that should be processed.
  108. SmallVector<BasicBlock *, 64> BBWorkList;
  109. using Edge = std::pair<BasicBlock *, BasicBlock *>;
  110. /// KnownFeasibleEdges - Entries in this set are edges which have already had
  111. /// PHI nodes retriggered.
  112. std::set<Edge> KnownFeasibleEdges;
  113. public:
  114. explicit SparseSolver(
  115. AbstractLatticeFunction<LatticeKey, LatticeVal> *Lattice)
  116. : LatticeFunc(Lattice) {}
  117. SparseSolver(const SparseSolver &) = delete;
  118. SparseSolver &operator=(const SparseSolver &) = delete;
  119. /// Solve - Solve for constants and executable blocks.
  120. void Solve();
  121. void Print(raw_ostream &OS) const;
  122. /// getExistingValueState - Return the LatticeVal object corresponding to the
  123. /// given value from the ValueState map. If the value is not in the map,
  124. /// UntrackedVal is returned, unlike the getValueState method.
  125. LatticeVal getExistingValueState(LatticeKey Key) const {
  126. auto I = ValueState.find(Key);
  127. return I != ValueState.end() ? I->second : LatticeFunc->getUntrackedVal();
  128. }
  129. /// getValueState - Return the LatticeVal object corresponding to the given
  130. /// value from the ValueState map. If the value is not in the map, its state
  131. /// is initialized.
  132. LatticeVal getValueState(LatticeKey Key);
  133. /// isEdgeFeasible - Return true if the control flow edge from the 'From'
  134. /// basic block to the 'To' basic block is currently feasible. If
  135. /// AggressiveUndef is true, then this treats values with unknown lattice
  136. /// values as undefined. This is generally only useful when solving the
  137. /// lattice, not when querying it.
  138. bool isEdgeFeasible(BasicBlock *From, BasicBlock *To,
  139. bool AggressiveUndef = false);
  140. /// isBlockExecutable - Return true if there are any known feasible
  141. /// edges into the basic block. This is generally only useful when
  142. /// querying the lattice.
  143. bool isBlockExecutable(BasicBlock *BB) const {
  144. return BBExecutable.count(BB);
  145. }
  146. /// MarkBlockExecutable - This method can be used by clients to mark all of
  147. /// the blocks that are known to be intrinsically live in the processed unit.
  148. void MarkBlockExecutable(BasicBlock *BB);
  149. private:
  150. /// UpdateState - When the state of some LatticeKey is potentially updated to
  151. /// the given LatticeVal, this function notices and adds the LLVM value
  152. /// corresponding the key to the work list, if needed.
  153. void UpdateState(LatticeKey Key, LatticeVal LV);
  154. /// markEdgeExecutable - Mark a basic block as executable, adding it to the BB
  155. /// work list if it is not already executable.
  156. void markEdgeExecutable(BasicBlock *Source, BasicBlock *Dest);
  157. /// getFeasibleSuccessors - Return a vector of booleans to indicate which
  158. /// successors are reachable from a given terminator instruction.
  159. void getFeasibleSuccessors(Instruction &TI, SmallVectorImpl<bool> &Succs,
  160. bool AggressiveUndef);
  161. void visitInst(Instruction &I);
  162. void visitPHINode(PHINode &I);
  163. void visitTerminator(Instruction &TI);
  164. };
  165. //===----------------------------------------------------------------------===//
  166. // AbstractLatticeFunction Implementation
  167. //===----------------------------------------------------------------------===//
  168. template <class LatticeKey, class LatticeVal>
  169. void AbstractLatticeFunction<LatticeKey, LatticeVal>::PrintLatticeVal(
  170. LatticeVal V, raw_ostream &OS) {
  171. if (V == UndefVal)
  172. OS << "undefined";
  173. else if (V == OverdefinedVal)
  174. OS << "overdefined";
  175. else if (V == UntrackedVal)
  176. OS << "untracked";
  177. else
  178. OS << "unknown lattice value";
  179. }
  180. template <class LatticeKey, class LatticeVal>
  181. void AbstractLatticeFunction<LatticeKey, LatticeVal>::PrintLatticeKey(
  182. LatticeKey Key, raw_ostream &OS) {
  183. OS << "unknown lattice key";
  184. }
  185. //===----------------------------------------------------------------------===//
  186. // SparseSolver Implementation
  187. //===----------------------------------------------------------------------===//
  188. template <class LatticeKey, class LatticeVal, class KeyInfo>
  189. LatticeVal
  190. SparseSolver<LatticeKey, LatticeVal, KeyInfo>::getValueState(LatticeKey Key) {
  191. auto I = ValueState.find(Key);
  192. if (I != ValueState.end())
  193. return I->second; // Common case, in the map
  194. if (LatticeFunc->IsUntrackedValue(Key))
  195. return LatticeFunc->getUntrackedVal();
  196. LatticeVal LV = LatticeFunc->ComputeLatticeVal(Key);
  197. // If this value is untracked, don't add it to the map.
  198. if (LV == LatticeFunc->getUntrackedVal())
  199. return LV;
  200. return ValueState[Key] = std::move(LV);
  201. }
  202. template <class LatticeKey, class LatticeVal, class KeyInfo>
  203. void SparseSolver<LatticeKey, LatticeVal, KeyInfo>::UpdateState(LatticeKey Key,
  204. LatticeVal LV) {
  205. auto I = ValueState.find(Key);
  206. if (I != ValueState.end() && I->second == LV)
  207. return; // No change.
  208. // Update the state of the given LatticeKey and add its corresponding LLVM
  209. // value to the work list.
  210. ValueState[Key] = std::move(LV);
  211. if (Value *V = KeyInfo::getValueFromLatticeKey(Key))
  212. ValueWorkList.push_back(V);
  213. }
  214. template <class LatticeKey, class LatticeVal, class KeyInfo>
  215. void SparseSolver<LatticeKey, LatticeVal, KeyInfo>::MarkBlockExecutable(
  216. BasicBlock *BB) {
  217. if (!BBExecutable.insert(BB).second)
  218. return;
  219. LLVM_DEBUG(dbgs() << "Marking Block Executable: " << BB->getName() << "\n");
  220. BBWorkList.push_back(BB); // Add the block to the work list!
  221. }
  222. template <class LatticeKey, class LatticeVal, class KeyInfo>
  223. void SparseSolver<LatticeKey, LatticeVal, KeyInfo>::markEdgeExecutable(
  224. BasicBlock *Source, BasicBlock *Dest) {
  225. if (!KnownFeasibleEdges.insert(Edge(Source, Dest)).second)
  226. return; // This edge is already known to be executable!
  227. LLVM_DEBUG(dbgs() << "Marking Edge Executable: " << Source->getName()
  228. << " -> " << Dest->getName() << "\n");
  229. if (BBExecutable.count(Dest)) {
  230. // The destination is already executable, but we just made an edge
  231. // feasible that wasn't before. Revisit the PHI nodes in the block
  232. // because they have potentially new operands.
  233. for (BasicBlock::iterator I = Dest->begin(); isa<PHINode>(I); ++I)
  234. visitPHINode(*cast<PHINode>(I));
  235. } else {
  236. MarkBlockExecutable(Dest);
  237. }
  238. }
  239. template <class LatticeKey, class LatticeVal, class KeyInfo>
  240. void SparseSolver<LatticeKey, LatticeVal, KeyInfo>::getFeasibleSuccessors(
  241. Instruction &TI, SmallVectorImpl<bool> &Succs, bool AggressiveUndef) {
  242. Succs.resize(TI.getNumSuccessors());
  243. if (TI.getNumSuccessors() == 0)
  244. return;
  245. if (BranchInst *BI = dyn_cast<BranchInst>(&TI)) {
  246. if (BI->isUnconditional()) {
  247. Succs[0] = true;
  248. return;
  249. }
  250. LatticeVal BCValue;
  251. if (AggressiveUndef)
  252. BCValue =
  253. getValueState(KeyInfo::getLatticeKeyFromValue(BI->getCondition()));
  254. else
  255. BCValue = getExistingValueState(
  256. KeyInfo::getLatticeKeyFromValue(BI->getCondition()));
  257. if (BCValue == LatticeFunc->getOverdefinedVal() ||
  258. BCValue == LatticeFunc->getUntrackedVal()) {
  259. // Overdefined condition variables can branch either way.
  260. Succs[0] = Succs[1] = true;
  261. return;
  262. }
  263. // If undefined, neither is feasible yet.
  264. if (BCValue == LatticeFunc->getUndefVal())
  265. return;
  266. Constant *C =
  267. dyn_cast_or_null<Constant>(LatticeFunc->GetValueFromLatticeVal(
  268. std::move(BCValue), BI->getCondition()->getType()));
  269. if (!C || !isa<ConstantInt>(C)) {
  270. // Non-constant values can go either way.
  271. Succs[0] = Succs[1] = true;
  272. return;
  273. }
  274. // Constant condition variables mean the branch can only go a single way
  275. Succs[C->isNullValue()] = true;
  276. return;
  277. }
  278. if (TI.isExceptionalTerminator() ||
  279. TI.isIndirectTerminator()) {
  280. Succs.assign(Succs.size(), true);
  281. return;
  282. }
  283. SwitchInst &SI = cast<SwitchInst>(TI);
  284. LatticeVal SCValue;
  285. if (AggressiveUndef)
  286. SCValue = getValueState(KeyInfo::getLatticeKeyFromValue(SI.getCondition()));
  287. else
  288. SCValue = getExistingValueState(
  289. KeyInfo::getLatticeKeyFromValue(SI.getCondition()));
  290. if (SCValue == LatticeFunc->getOverdefinedVal() ||
  291. SCValue == LatticeFunc->getUntrackedVal()) {
  292. // All destinations are executable!
  293. Succs.assign(TI.getNumSuccessors(), true);
  294. return;
  295. }
  296. // If undefined, neither is feasible yet.
  297. if (SCValue == LatticeFunc->getUndefVal())
  298. return;
  299. Constant *C = dyn_cast_or_null<Constant>(LatticeFunc->GetValueFromLatticeVal(
  300. std::move(SCValue), SI.getCondition()->getType()));
  301. if (!C || !isa<ConstantInt>(C)) {
  302. // All destinations are executable!
  303. Succs.assign(TI.getNumSuccessors(), true);
  304. return;
  305. }
  306. SwitchInst::CaseHandle Case = *SI.findCaseValue(cast<ConstantInt>(C));
  307. Succs[Case.getSuccessorIndex()] = true;
  308. }
  309. template <class LatticeKey, class LatticeVal, class KeyInfo>
  310. bool SparseSolver<LatticeKey, LatticeVal, KeyInfo>::isEdgeFeasible(
  311. BasicBlock *From, BasicBlock *To, bool AggressiveUndef) {
  312. SmallVector<bool, 16> SuccFeasible;
  313. Instruction *TI = From->getTerminator();
  314. getFeasibleSuccessors(*TI, SuccFeasible, AggressiveUndef);
  315. for (unsigned i = 0, e = TI->getNumSuccessors(); i != e; ++i)
  316. if (TI->getSuccessor(i) == To && SuccFeasible[i])
  317. return true;
  318. return false;
  319. }
  320. template <class LatticeKey, class LatticeVal, class KeyInfo>
  321. void SparseSolver<LatticeKey, LatticeVal, KeyInfo>::visitTerminator(
  322. Instruction &TI) {
  323. SmallVector<bool, 16> SuccFeasible;
  324. getFeasibleSuccessors(TI, SuccFeasible, true);
  325. BasicBlock *BB = TI.getParent();
  326. // Mark all feasible successors executable...
  327. for (unsigned i = 0, e = SuccFeasible.size(); i != e; ++i)
  328. if (SuccFeasible[i])
  329. markEdgeExecutable(BB, TI.getSuccessor(i));
  330. }
  331. template <class LatticeKey, class LatticeVal, class KeyInfo>
  332. void SparseSolver<LatticeKey, LatticeVal, KeyInfo>::visitPHINode(PHINode &PN) {
  333. // The lattice function may store more information on a PHINode than could be
  334. // computed from its incoming values. For example, SSI form stores its sigma
  335. // functions as PHINodes with a single incoming value.
  336. if (LatticeFunc->IsSpecialCasedPHI(&PN)) {
  337. DenseMap<LatticeKey, LatticeVal> ChangedValues;
  338. LatticeFunc->ComputeInstructionState(PN, ChangedValues, *this);
  339. for (auto &ChangedValue : ChangedValues)
  340. if (ChangedValue.second != LatticeFunc->getUntrackedVal())
  341. UpdateState(std::move(ChangedValue.first),
  342. std::move(ChangedValue.second));
  343. return;
  344. }
  345. LatticeKey Key = KeyInfo::getLatticeKeyFromValue(&PN);
  346. LatticeVal PNIV = getValueState(Key);
  347. LatticeVal Overdefined = LatticeFunc->getOverdefinedVal();
  348. // If this value is already overdefined (common) just return.
  349. if (PNIV == Overdefined || PNIV == LatticeFunc->getUntrackedVal())
  350. return; // Quick exit
  351. // Super-extra-high-degree PHI nodes are unlikely to ever be interesting,
  352. // and slow us down a lot. Just mark them overdefined.
  353. if (PN.getNumIncomingValues() > 64) {
  354. UpdateState(Key, Overdefined);
  355. return;
  356. }
  357. // Look at all of the executable operands of the PHI node. If any of them
  358. // are overdefined, the PHI becomes overdefined as well. Otherwise, ask the
  359. // transfer function to give us the merge of the incoming values.
  360. for (unsigned i = 0, e = PN.getNumIncomingValues(); i != e; ++i) {
  361. // If the edge is not yet known to be feasible, it doesn't impact the PHI.
  362. if (!isEdgeFeasible(PN.getIncomingBlock(i), PN.getParent(), true))
  363. continue;
  364. // Merge in this value.
  365. LatticeVal OpVal =
  366. getValueState(KeyInfo::getLatticeKeyFromValue(PN.getIncomingValue(i)));
  367. if (OpVal != PNIV)
  368. PNIV = LatticeFunc->MergeValues(PNIV, OpVal);
  369. if (PNIV == Overdefined)
  370. break; // Rest of input values don't matter.
  371. }
  372. // Update the PHI with the compute value, which is the merge of the inputs.
  373. UpdateState(Key, PNIV);
  374. }
  375. template <class LatticeKey, class LatticeVal, class KeyInfo>
  376. void SparseSolver<LatticeKey, LatticeVal, KeyInfo>::visitInst(Instruction &I) {
  377. // PHIs are handled by the propagation logic, they are never passed into the
  378. // transfer functions.
  379. if (PHINode *PN = dyn_cast<PHINode>(&I))
  380. return visitPHINode(*PN);
  381. // Otherwise, ask the transfer function what the result is. If this is
  382. // something that we care about, remember it.
  383. DenseMap<LatticeKey, LatticeVal> ChangedValues;
  384. LatticeFunc->ComputeInstructionState(I, ChangedValues, *this);
  385. for (auto &ChangedValue : ChangedValues)
  386. if (ChangedValue.second != LatticeFunc->getUntrackedVal())
  387. UpdateState(ChangedValue.first, ChangedValue.second);
  388. if (I.isTerminator())
  389. visitTerminator(I);
  390. }
  391. template <class LatticeKey, class LatticeVal, class KeyInfo>
  392. void SparseSolver<LatticeKey, LatticeVal, KeyInfo>::Solve() {
  393. // Process the work lists until they are empty!
  394. while (!BBWorkList.empty() || !ValueWorkList.empty()) {
  395. // Process the value work list.
  396. while (!ValueWorkList.empty()) {
  397. Value *V = ValueWorkList.back();
  398. ValueWorkList.pop_back();
  399. LLVM_DEBUG(dbgs() << "\nPopped off V-WL: " << *V << "\n");
  400. // "V" got into the work list because it made a transition. See if any
  401. // users are both live and in need of updating.
  402. for (User *U : V->users())
  403. if (Instruction *Inst = dyn_cast<Instruction>(U))
  404. if (BBExecutable.count(Inst->getParent())) // Inst is executable?
  405. visitInst(*Inst);
  406. }
  407. // Process the basic block work list.
  408. while (!BBWorkList.empty()) {
  409. BasicBlock *BB = BBWorkList.pop_back_val();
  410. LLVM_DEBUG(dbgs() << "\nPopped off BBWL: " << *BB);
  411. // Notify all instructions in this basic block that they are newly
  412. // executable.
  413. for (Instruction &I : *BB)
  414. visitInst(I);
  415. }
  416. }
  417. }
  418. template <class LatticeKey, class LatticeVal, class KeyInfo>
  419. void SparseSolver<LatticeKey, LatticeVal, KeyInfo>::Print(
  420. raw_ostream &OS) const {
  421. if (ValueState.empty())
  422. return;
  423. LatticeKey Key;
  424. LatticeVal LV;
  425. OS << "ValueState:\n";
  426. for (auto &Entry : ValueState) {
  427. std::tie(Key, LV) = Entry;
  428. if (LV == LatticeFunc->getUntrackedVal())
  429. continue;
  430. OS << "\t";
  431. LatticeFunc->PrintLatticeVal(LV, OS);
  432. OS << ": ";
  433. LatticeFunc->PrintLatticeKey(Key, OS);
  434. OS << "\n";
  435. }
  436. }
  437. } // end namespace llvm
  438. #undef DEBUG_TYPE
  439. #endif // LLVM_ANALYSIS_SPARSEPROPAGATION_H
  440. #ifdef __GNUC__
  441. #pragma GCC diagnostic pop
  442. #endif