Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-05-10 08:44:10

0001 //===- llvm/IR/UseListOrder.h - LLVM Use List Order -------------*- C++ -*-===//
0002 //
0003 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
0004 // See https://llvm.org/LICENSE.txt for license information.
0005 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
0006 //
0007 //===----------------------------------------------------------------------===//
0008 //
0009 // This file has structures and command-line options for preserving use-list
0010 // order.
0011 //
0012 //===----------------------------------------------------------------------===//
0013 
0014 #ifndef LLVM_IR_USELISTORDER_H
0015 #define LLVM_IR_USELISTORDER_H
0016 
0017 #include <cstddef>
0018 #include <vector>
0019 
0020 namespace llvm {
0021 
0022 class Function;
0023 class Value;
0024 
0025 /// Structure to hold a use-list order.
0026 struct UseListOrder {
0027   const Value *V = nullptr;
0028   const Function *F = nullptr;
0029   std::vector<unsigned> Shuffle;
0030 
0031   UseListOrder(const Value *V, const Function *F, size_t ShuffleSize)
0032       : V(V), F(F), Shuffle(ShuffleSize) {}
0033 
0034   UseListOrder() = default;
0035   UseListOrder(UseListOrder &&) = default;
0036   UseListOrder &operator=(UseListOrder &&) = default;
0037 };
0038 
0039 using UseListOrderStack = std::vector<UseListOrder>;
0040 
0041 } // end namespace llvm
0042 
0043 #endif // LLVM_IR_USELISTORDER_H