LLVM  14.0.0git
UseListOrder.h
Go to the documentation of this file.
1 //===- llvm/IR/UseListOrder.h - LLVM Use List Order -------------*- C++ -*-===//
2 //
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
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 // This file has structures and command-line options for preserving use-list
10 // order.
11 //
12 //===----------------------------------------------------------------------===//
13 
14 #ifndef LLVM_IR_USELISTORDER_H
15 #define LLVM_IR_USELISTORDER_H
16 
17 #include <cstddef>
18 #include <vector>
19 
20 namespace llvm {
21 
22 class Function;
23 class Value;
24 
25 /// Structure to hold a use-list order.
26 struct UseListOrder {
27  const Value *V = nullptr;
28  const Function *F = nullptr;
29  std::vector<unsigned> Shuffle;
30 
31  UseListOrder(const Value *V, const Function *F, size_t ShuffleSize)
32  : V(V), F(F), Shuffle(ShuffleSize) {}
33 
34  UseListOrder() = default;
35  UseListOrder(UseListOrder &&) = default;
36  UseListOrder &operator=(UseListOrder &&) = default;
37 };
38 
39 using UseListOrderStack = std::vector<UseListOrder>;
40 
41 } // end namespace llvm
42 
43 #endif // LLVM_IR_USELISTORDER_H
llvm
This file implements support for optimizing divisions by a constant.
Definition: AllocatorList.h:23
llvm::Function
Definition: Function.h:62
llvm::UseListOrder::F
const Function * F
Definition: UseListOrder.h:28
llvm::UseListOrder::operator=
UseListOrder & operator=(UseListOrder &&)=default
llvm::UseListOrder::UseListOrder
UseListOrder(const Value *V, const Function *F, size_t ShuffleSize)
Definition: UseListOrder.h:31
llvm::UseListOrder::V
const Value * V
Definition: UseListOrder.h:27
llvm::UseListOrder::Shuffle
std::vector< unsigned > Shuffle
Definition: UseListOrder.h:29
llvm::ReplayInlineScope::Function
@ Function
llvm::UseListOrder
Structure to hold a use-list order.
Definition: UseListOrder.h:26
llvm::UseListOrderStack
std::vector< UseListOrder > UseListOrderStack
Definition: UseListOrder.h:39
llvm::TargetStackID::Value
Value
Definition: TargetFrameLowering.h:27
llvm::UseListOrder::UseListOrder
UseListOrder()=default
llvm::Value
LLVM Value Representation.
Definition: Value.h:74