LLVM  4.0.0
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 Module;
24 class Function;
25 class Value;
26 
27 /// \brief Structure to hold a use-list order.
28 struct UseListOrder {
29  const Value *V;
30  const Function *F;
31  std::vector<unsigned> Shuffle;
32 
33  UseListOrder(const Value *V, const Function *F, size_t ShuffleSize)
34  : V(V), F(F), Shuffle(ShuffleSize) {}
35 
36  UseListOrder() : V(nullptr), F(nullptr) {}
37  UseListOrder(UseListOrder &&) = default;
38  UseListOrder &operator=(UseListOrder &&) = default;
39 };
40 
41 typedef std::vector<UseListOrder> UseListOrderStack;
42 
43 } // end namespace llvm
44 
45 #endif // LLVM_IR_USELISTORDER_H
std::vector< unsigned > Shuffle
Definition: UseListOrder.h:31
const Value * V
Definition: UseListOrder.h:29
UseListOrder & operator=(UseListOrder &&)=default
UseListOrder(const Value *V, const Function *F, size_t ShuffleSize)
Definition: UseListOrder.h:33
std::vector< UseListOrder > UseListOrderStack
Definition: UseListOrder.h:41
Structure to hold a use-list order.
Definition: UseListOrder.h:28
const Function * F
Definition: UseListOrder.h:30
LLVM Value Representation.
Definition: Value.h:71