1 //===- llvm/IR/UseListOrder.h - LLVM Use List Order -------------*- C++ -*-===//
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
9 // This file has structures and command-line options for preserving use-list
12 //===----------------------------------------------------------------------===//
14 #ifndef LLVM_IR_USELISTORDER_H
15 #define LLVM_IR_USELISTORDER_H
25 /// Structure to hold a use-list order.
27 const Value *V = nullptr;
28 const Function *F = nullptr;
29 std::vector<unsigned> Shuffle;
31 UseListOrder(const Value *V, const Function *F, size_t ShuffleSize)
32 : V(V), F(F), Shuffle(ShuffleSize) {}
34 UseListOrder() = default;
35 UseListOrder(UseListOrder &&) = default;
36 UseListOrder &operator=(UseListOrder &&) = default;
39 using UseListOrderStack = std::vector<UseListOrder>;
41 } // end namespace llvm
43 #endif // LLVM_IR_USELISTORDER_H