1f3014761c955345d6e05491608e73228d014afbandroid-build-team Robot//===-- Operations.h - ----------------------------------------*- C++ -*-===//
2f3014761c955345d6e05491608e73228d014afbandroid-build-team Robot//
3f3014761c955345d6e05491608e73228d014afbandroid-build-team Robot//                     The LLVM Compiler Infrastructure
4f3014761c955345d6e05491608e73228d014afbandroid-build-team Robot//
5f3014761c955345d6e05491608e73228d014afbandroid-build-team Robot// This file is distributed under the University of Illinois Open Source
6f3014761c955345d6e05491608e73228d014afbandroid-build-team Robot// License. See LICENSE.TXT for details.
7f3014761c955345d6e05491608e73228d014afbandroid-build-team Robot//
8f3014761c955345d6e05491608e73228d014afbandroid-build-team Robot//===----------------------------------------------------------------------===//
9f3014761c955345d6e05491608e73228d014afbandroid-build-team Robot//
10f3014761c955345d6e05491608e73228d014afbandroid-build-team Robot// Implementations of common fuzzer operation descriptors for building an IR
11f3014761c955345d6e05491608e73228d014afbandroid-build-team Robot// mutator.
12f3014761c955345d6e05491608e73228d014afbandroid-build-team Robot//
13f3014761c955345d6e05491608e73228d014afbandroid-build-team Robot//===----------------------------------------------------------------------===//
14f3014761c955345d6e05491608e73228d014afbandroid-build-team Robot
15f3014761c955345d6e05491608e73228d014afbandroid-build-team Robot#ifndef LLVM_FUZZMUTATE_OPERATIONS_H
16f3014761c955345d6e05491608e73228d014afbandroid-build-team Robot#define LLVM_FUZZMUTATE_OPERATIONS_H
17f3014761c955345d6e05491608e73228d014afbandroid-build-team Robot
18f3014761c955345d6e05491608e73228d014afbandroid-build-team Robot#include "llvm/FuzzMutate/OpDescriptor.h"
19f3014761c955345d6e05491608e73228d014afbandroid-build-team Robot#include "llvm/IR/InstrTypes.h"
20f3014761c955345d6e05491608e73228d014afbandroid-build-team Robot#include "llvm/IR/Instruction.h"
21f3014761c955345d6e05491608e73228d014afbandroid-build-team Robot
22f3014761c955345d6e05491608e73228d014afbandroid-build-team Robotnamespace llvm {
23f3014761c955345d6e05491608e73228d014afbandroid-build-team Robot
24f3014761c955345d6e05491608e73228d014afbandroid-build-team Robot/// Getters for the default sets of operations, per general category.
25f3014761c955345d6e05491608e73228d014afbandroid-build-team Robot/// @{
26f3014761c955345d6e05491608e73228d014afbandroid-build-team Robotvoid describeFuzzerIntOps(std::vector<fuzzerop::OpDescriptor> &Ops);
27f3014761c955345d6e05491608e73228d014afbandroid-build-team Robotvoid describeFuzzerFloatOps(std::vector<fuzzerop::OpDescriptor> &Ops);
28f3014761c955345d6e05491608e73228d014afbandroid-build-team Robotvoid describeFuzzerControlFlowOps(std::vector<fuzzerop::OpDescriptor> &Ops);
29f3014761c955345d6e05491608e73228d014afbandroid-build-team Robotvoid describeFuzzerPointerOps(std::vector<fuzzerop::OpDescriptor> &Ops);
30f3014761c955345d6e05491608e73228d014afbandroid-build-team Robotvoid describeFuzzerAggregateOps(std::vector<fuzzerop::OpDescriptor> &Ops);
31f3014761c955345d6e05491608e73228d014afbandroid-build-team Robotvoid describeFuzzerVectorOps(std::vector<fuzzerop::OpDescriptor> &Ops);
32f3014761c955345d6e05491608e73228d014afbandroid-build-team Robot/// @}
33f3014761c955345d6e05491608e73228d014afbandroid-build-team Robot
34f3014761c955345d6e05491608e73228d014afbandroid-build-team Robotnamespace fuzzerop {
35f3014761c955345d6e05491608e73228d014afbandroid-build-team Robot
36f3014761c955345d6e05491608e73228d014afbandroid-build-team Robot/// Descriptors for individual operations.
37f3014761c955345d6e05491608e73228d014afbandroid-build-team Robot/// @{
38f3014761c955345d6e05491608e73228d014afbandroid-build-team RobotOpDescriptor binOpDescriptor(unsigned Weight, Instruction::BinaryOps Op);
39f3014761c955345d6e05491608e73228d014afbandroid-build-team RobotOpDescriptor cmpOpDescriptor(unsigned Weight, Instruction::OtherOps CmpOp,
40f3014761c955345d6e05491608e73228d014afbandroid-build-team Robot                             CmpInst::Predicate Pred);
41f3014761c955345d6e05491608e73228d014afbandroid-build-team RobotOpDescriptor splitBlockDescriptor(unsigned Weight);
42f3014761c955345d6e05491608e73228d014afbandroid-build-team RobotOpDescriptor gepDescriptor(unsigned Weight);
43f3014761c955345d6e05491608e73228d014afbandroid-build-team RobotOpDescriptor extractValueDescriptor(unsigned Weight);
44f3014761c955345d6e05491608e73228d014afbandroid-build-team RobotOpDescriptor insertValueDescriptor(unsigned Weight);
45f3014761c955345d6e05491608e73228d014afbandroid-build-team RobotOpDescriptor extractElementDescriptor(unsigned Weight);
46f3014761c955345d6e05491608e73228d014afbandroid-build-team RobotOpDescriptor insertElementDescriptor(unsigned Weight);
47f3014761c955345d6e05491608e73228d014afbandroid-build-team RobotOpDescriptor shuffleVectorDescriptor(unsigned Weight);
48f3014761c955345d6e05491608e73228d014afbandroid-build-team Robot/// @}
49f3014761c955345d6e05491608e73228d014afbandroid-build-team Robot
50f3014761c955345d6e05491608e73228d014afbandroid-build-team Robot} // end fuzzerop namespace
51f3014761c955345d6e05491608e73228d014afbandroid-build-team Robot
52f3014761c955345d6e05491608e73228d014afbandroid-build-team Robot} // end llvm namespace
53f3014761c955345d6e05491608e73228d014afbandroid-build-team Robot
54f3014761c955345d6e05491608e73228d014afbandroid-build-team Robot#endif // LLVM_FUZZMUTATE_OPERATIONS_H
55