source: icGREP/icgrep-devel/icgrep/IR_Gen/idisa_sse_builder.h @ 5464

Last change on this file since 5464 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: 1.5 KB
Line 
1#ifndef IDISA_SSE_BUILDER_H
2#define IDISA_SSE_BUILDER_H
3
4/*
5 *  Copyright (c) 2015 International Characters.
6 *  This software is licensed to the public under the Open Software License 3.0.
7 *  icgrep is a trademark of International Characters.
8 */
9
10#include <IR_Gen/idisa_builder.h>
11
12namespace IDISA {
13
14class IDISA_SSE_Builder : public virtual IDISA_Builder {
15public:
16 
17    IDISA_SSE_Builder(llvm::LLVMContext & C, unsigned archBitWidth, unsigned bitBlockWidth, unsigned stride)
18    : IDISA_Builder(C, archBitWidth, bitBlockWidth, stride) {
19
20    }
21
22    virtual std::string getBuilderUniqueName() override;
23    llvm::Value * hsimd_signmask(unsigned fw, llvm::Value * a) override;
24    ~IDISA_SSE_Builder() {}
25
26};
27
28class IDISA_SSE2_Builder : public IDISA_SSE_Builder {
29public:
30 
31    IDISA_SSE2_Builder(llvm::LLVMContext & C, unsigned archBitWidth, unsigned bitBlockWidth, unsigned stride)
32    : IDISA_Builder(C, archBitWidth, bitBlockWidth, stride)
33    , IDISA_SSE_Builder(C, archBitWidth, bitBlockWidth, stride) {
34
35    }
36
37    virtual std::string getBuilderUniqueName() override;
38    llvm::Value * hsimd_signmask(unsigned fw, llvm::Value * a) override;
39    llvm::Value * hsimd_packh(unsigned fw, llvm::Value * a, llvm::Value * b) override;
40    llvm::Value * hsimd_packl(unsigned fw, llvm::Value * a, llvm::Value * b) override;
41    std::pair<llvm::Value *, llvm::Value *> bitblock_advance(llvm::Value * a, llvm::Value * shiftin, unsigned shift) final;
42
43    ~IDISA_SSE2_Builder() {}
44
45};
46
47}
48
49#endif // IDISA_SSE_BUILDER_H
Note: See TracBrowser for help on using the repository browser.