mini-llvm
0.1.0
Toggle main menu visibility
Loading...
Searching...
No Matches
StrengthReduction.h
Go to the documentation of this file.
1
// SPDX-License-Identifier: MIT
2
3
#pragma once
4
5
#include <cstddef>
6
7
#include "
mini-llvm/ir/Function.h
"
8
#include "
mini-llvm/opt/ir/FunctionTransform.h
"
9
#include "
mini-llvm/utils/Compiler.h
"
10
11
namespace
mini_llvm::ir
{
12
13
class
MINI_LLVM_EXPORT
StrengthReduction
final :
public
FunctionTransform
{
14
public
:
15
StrengthReduction
(
size_t
mulThreshold,
size_t
divThreshold,
size_t
remThreshold)
16
: mulThreshold_(mulThreshold), divThreshold_(divThreshold), remThreshold_(remThreshold) {}
17
18
bool
runOnFunction
(
Function
&F)
override
;
19
20
private
:
21
size_t
mulThreshold_;
22
size_t
divThreshold_;
23
size_t
remThreshold_;
24
};
25
26
}
// namespace mini_llvm::ir
Compiler.h
MINI_LLVM_EXPORT
#define MINI_LLVM_EXPORT
Definition
Compiler.h:17
mini_llvm::ir::FunctionTransform
Definition
FunctionTransform.h:12
mini_llvm::ir::Function
Definition
Function.h:34
mini_llvm::ir::StrengthReduction::StrengthReduction
StrengthReduction(size_t mulThreshold, size_t divThreshold, size_t remThreshold)
Definition
StrengthReduction.h:15
mini_llvm::ir::StrengthReduction::runOnFunction
bool runOnFunction(Function &F) override
FunctionTransform.h
Function.h
mini_llvm::ir
Definition
Argument.h:13
include
mini-llvm
opt
ir
passes
StrengthReduction.h
Generated by
1.17.0