IR2Vec
Loading...
Searching...
No Matches
src
include
CollectIR.h
1
//===- CollectIR.h - Triplet collection for training -----------*- C++ -*-===//
2
//
3
// Part of the IR2Vec Project, under the Apache License v2.0 with LLVM
4
// Exceptions. See the LICENSE file for license information.
5
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6
//
7
//===----------------------------------------------------------------------===//
8
9
#ifndef __COLLECT_IR__
10
#define __COLLECT_IR__
11
12
#include "utils.h"
13
#include "llvm/IR/BasicBlock.h"
14
#include "llvm/Pass.h"
15
#include "llvm/Support/raw_ostream.h"
16
#include <fstream>
17
#include <map>
18
19
class
CollectIR
{
20
21
private
:
22
void
collectData();
23
std::string res;
24
llvm::Module &M;
25
26
void
traverseBasicBlock(llvm::BasicBlock &B);
27
28
public
:
29
CollectIR
(std::unique_ptr<llvm::Module> &M) : M{*M} { res =
""
; }
30
31
void
generateTriplets(std::ostream &out);
32
};
33
34
#endif
CollectIR
Definition
CollectIR.h:19
Generated by
1.12.0