annotate include/llvm/FuzzMutate/Operations.h @ 148:63bd29f05246

merged
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Wed, 14 Aug 2019 19:46:37 +0900
parents c2174574ed3a
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
121
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1 //===-- Operations.h - ----------------------------------------*- C++ -*-===//
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
2 //
147
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 121
diff changeset
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 121
diff changeset
4 // See https://llvm.org/LICENSE.txt for license information.
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 121
diff changeset
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
121
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
6 //
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
7 //===----------------------------------------------------------------------===//
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
8 //
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
9 // Implementations of common fuzzer operation descriptors for building an IR
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
10 // mutator.
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
11 //
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
12 //===----------------------------------------------------------------------===//
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
13
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
14 #ifndef LLVM_FUZZMUTATE_OPERATIONS_H
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
15 #define LLVM_FUZZMUTATE_OPERATIONS_H
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
16
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
17 #include "llvm/FuzzMutate/OpDescriptor.h"
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
18 #include "llvm/IR/InstrTypes.h"
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
19 #include "llvm/IR/Instruction.h"
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
20
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
21 namespace llvm {
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
22
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
23 /// Getters for the default sets of operations, per general category.
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
24 /// @{
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
25 void describeFuzzerIntOps(std::vector<fuzzerop::OpDescriptor> &Ops);
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
26 void describeFuzzerFloatOps(std::vector<fuzzerop::OpDescriptor> &Ops);
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
27 void describeFuzzerControlFlowOps(std::vector<fuzzerop::OpDescriptor> &Ops);
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
28 void describeFuzzerPointerOps(std::vector<fuzzerop::OpDescriptor> &Ops);
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
29 void describeFuzzerAggregateOps(std::vector<fuzzerop::OpDescriptor> &Ops);
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
30 void describeFuzzerVectorOps(std::vector<fuzzerop::OpDescriptor> &Ops);
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
31 /// @}
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
32
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
33 namespace fuzzerop {
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
34
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
35 /// Descriptors for individual operations.
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
36 /// @{
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
37 OpDescriptor binOpDescriptor(unsigned Weight, Instruction::BinaryOps Op);
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
38 OpDescriptor cmpOpDescriptor(unsigned Weight, Instruction::OtherOps CmpOp,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
39 CmpInst::Predicate Pred);
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
40 OpDescriptor splitBlockDescriptor(unsigned Weight);
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
41 OpDescriptor gepDescriptor(unsigned Weight);
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
42 OpDescriptor extractValueDescriptor(unsigned Weight);
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
43 OpDescriptor insertValueDescriptor(unsigned Weight);
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
44 OpDescriptor extractElementDescriptor(unsigned Weight);
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
45 OpDescriptor insertElementDescriptor(unsigned Weight);
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
46 OpDescriptor shuffleVectorDescriptor(unsigned Weight);
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
47 /// @}
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
48
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
49 } // end fuzzerop namespace
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
50
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
51 } // end llvm namespace
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
52
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
53 #endif // LLVM_FUZZMUTATE_OPERATIONS_H