2014-08-02 01:03:36 +02:00
|
|
|
//===- llvm/IR/UseListOrder.h - LLVM Use List Order -------------*- C++ -*-===//
|
2014-07-25 16:49:26 +02:00
|
|
|
//
|
2019-01-19 09:50:56 +01:00
|
|
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
|
|
|
// See https://llvm.org/LICENSE.txt for license information.
|
|
|
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
2014-07-25 16:49:26 +02:00
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
//
|
2014-08-02 01:03:36 +02:00
|
|
|
// This file has structures and command-line options for preserving use-list
|
|
|
|
// order.
|
2014-07-25 16:49:26 +02:00
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
#ifndef LLVM_IR_USELISTORDER_H
|
|
|
|
#define LLVM_IR_USELISTORDER_H
|
|
|
|
|
2016-06-28 14:17:05 +02:00
|
|
|
#include <cstddef>
|
2014-07-28 23:19:41 +02:00
|
|
|
#include <vector>
|
2014-07-25 17:41:49 +02:00
|
|
|
|
2014-07-25 16:49:26 +02:00
|
|
|
namespace llvm {
|
|
|
|
|
2014-07-28 23:19:41 +02:00
|
|
|
class Function;
|
|
|
|
class Value;
|
|
|
|
|
2018-05-01 17:54:18 +02:00
|
|
|
/// Structure to hold a use-list order.
|
2014-07-28 23:19:41 +02:00
|
|
|
struct UseListOrder {
|
2017-02-17 01:00:09 +01:00
|
|
|
const Value *V = nullptr;
|
|
|
|
const Function *F = nullptr;
|
2014-08-06 19:36:08 +02:00
|
|
|
std::vector<unsigned> Shuffle;
|
2014-07-29 00:41:50 +02:00
|
|
|
|
|
|
|
UseListOrder(const Value *V, const Function *F, size_t ShuffleSize)
|
|
|
|
: V(V), F(F), Shuffle(ShuffleSize) {}
|
2014-07-29 23:30:21 +02:00
|
|
|
|
2017-02-17 01:00:09 +01:00
|
|
|
UseListOrder() = default;
|
2016-10-20 14:20:28 +02:00
|
|
|
UseListOrder(UseListOrder &&) = default;
|
|
|
|
UseListOrder &operator=(UseListOrder &&) = default;
|
2014-07-28 23:19:41 +02:00
|
|
|
};
|
|
|
|
|
2017-05-11 01:41:30 +02:00
|
|
|
using UseListOrderStack = std::vector<UseListOrder>;
|
2014-07-25 16:49:26 +02:00
|
|
|
|
|
|
|
} // end namespace llvm
|
|
|
|
|
2015-09-29 20:02:48 +02:00
|
|
|
#endif // LLVM_IR_USELISTORDER_H
|