Proteus
Programmable JIT compilation and optimization for C/C++ using LLVM
Loading...
Searching...
No Matches
LoopUnroller.hpp
Go to the documentation of this file.
1#ifndef PROTEUS_FRONTEND_LOOPUNROLLER_HPP
2#define PROTEUS_FRONTEND_LOOPUNROLLER_HPP
3
4#include <optional>
5
6#include <llvm/IR/BasicBlock.h>
7
8namespace proteus {
9
10// Handles loop unroll configuration and metadata attachment.
12 bool Enabled = false;
13 std::optional<int> Count;
14
15public:
16 void enable();
17 void enable(int Count);
18
19 bool isEnabled() const;
20
21 // Attach llvm.loop.unroll metadata to the back-edge branch in the latch.
23};
24
25} // namespace proteus
26
27#endif
Definition LoopUnroller.hpp:11
void attachMetadata(llvm::BasicBlock *LatchBB) const
Definition LoopUnroller.cpp:20
void enable()
Definition LoopUnroller.cpp:11
bool isEnabled() const
Definition LoopUnroller.cpp:18
Definition ObjectCacheChain.cpp:25
T getRuntimeConstantValue(void *Arg)
Definition CompilerInterfaceRuntimeConstantInfo.h:114