source: icGREP/icgrep-devel/icgrep/IR_Gen/tracegen.h @ 5795

Last change on this file since 5795 was 5464, checked in by nmedfort, 22 months ago

Restructuring work for the Driver classes. Start of work to eliminate the memory leaks with the ExecutionEngine?. Replaced custom AlignedMalloc? with backend call to std::aligned_malloc. Salvaged some work on DistributionPass? for reevaluation.

File size: 807 bytes
Line 
1/*
2 *  Copyright (c) 2017 International Characters.
3 *  This software is licensed to the public under the Open Software License 3.0.
4 */
5#ifndef TRACEGEN_H
6#define TRACEGEN_H
7
8#include "idisa_builder.h"
9#include <string>
10
11class TraceTool {
12public:
13    TraceTool(IDISA::IDISA_Builder * b, unsigned log2TraceBufSize = 16);
14   
15    unsigned declareTraceVar(std::string traceVarName);
16    unsigned newTraceVar(std::string traceName);
17    void addTraceEntry(unsigned traceVar, llvm::Value * traceVal);
18    void createDumpTrace();
19   
20private:
21    IDISA::IDISA_Builder * iBuilder;
22    unsigned mLog2TraceBufSize;
23    unsigned mTraceVarCount;
24    std::vector<llvm::Value *> mTraceFormatString;
25    llvm::Value * mTraceBufferPtr;
26    llvm::Value * mTraceIndexPtr;
27    llvm::Constant * mTraceIndexMask;
28};
29
30#endif
Note: See TracBrowser for help on using the repository browser.