LLVM  8.0.1
UseListOrder.h
Go to the documentation of this file.
1 //===- llvm/IR/UseListOrder.h - LLVM Use List Order -------------*- C++ -*-===//
2 //
3 // The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 //
10 // This file has structures and command-line options for preserving use-list
11 // order.
12 //
13 //===----------------------------------------------------------------------===//
14 
15 #ifndef LLVM_IR_USELISTORDER_H
16 #define LLVM_IR_USELISTORDER_H
17 
18 #include <cstddef>
19 #include <vector>
20 
21 namespace llvm {
22 
23 class Function;
24 class Value;
25 
26 /// Structure to hold a use-list order.
27 struct UseListOrder {
28  const Value *V = nullptr;
29  const Function *F = nullptr;
30  std::vector<unsigned> Shuffle;
31 
32  UseListOrder(const Value *V, const Function *F, size_t ShuffleSize)
33  : V(V), F(F), Shuffle(ShuffleSize) {}
34 
35  UseListOrder() = default;
36  UseListOrder(UseListOrder &&) = default;
37  UseListOrder &operator=(UseListOrder &&) = default;
38 };
39 
40 using UseListOrderStack = std::vector<UseListOrder>;
41 
42 } // end namespace llvm
43 
44 #endif // LLVM_IR_USELISTORDER_H
UseListOrder()=default
This class represents lattice values for constants.
Definition: AllocatorList.h:24
std::vector< unsigned > Shuffle
Definition: UseListOrder.h:30
const Value * V
Definition: UseListOrder.h:28
UseListOrder & operator=(UseListOrder &&)=default
UseListOrder(const Value *V, const Function *F, size_t ShuffleSize)
Definition: UseListOrder.h:32
Structure to hold a use-list order.
Definition: UseListOrder.h:27
std::vector< UseListOrder > UseListOrderStack
Definition: UseListOrder.h:40
const Function * F
Definition: UseListOrder.h:29
LLVM Value Representation.
Definition: Value.h:73