source: icGREP/icgrep-devel/icgrep/IR_Gen/idisa_avx_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.8 KB
Line 
1#ifndef IDISA_AVX_BUILDER_H
2#define IDISA_AVX_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*/
8
9#include <IR_Gen/idisa_sse_builder.h>
10
11namespace IDISA {
12
13class IDISA_AVX_Builder : public IDISA_SSE2_Builder {
14public:
15   
16    IDISA_AVX_Builder(llvm::LLVMContext & C, unsigned archBitWidth, unsigned bitBlockWidth, unsigned stride)
17    : IDISA_Builder(C, archBitWidth, bitBlockWidth, stride)
18    , IDISA_SSE2_Builder(C, archBitWidth, bitBlockWidth, stride)
19    {
20
21    }
22
23    virtual std::string getBuilderUniqueName() override;
24
25    llvm::Value * hsimd_signmask(unsigned fw, llvm::Value * a) override;
26
27    ~IDISA_AVX_Builder() {}
28
29};
30
31class IDISA_AVX2_Builder : public IDISA_AVX_Builder {
32public:
33   
34    IDISA_AVX2_Builder(llvm::LLVMContext & C, unsigned archBitWidth, unsigned bitBlockWidth, unsigned stride)
35    : IDISA_Builder(C, archBitWidth, bitBlockWidth, stride)
36    , IDISA_AVX_Builder(C, archBitWidth, bitBlockWidth, stride) {
37
38    }
39
40    virtual std::string getBuilderUniqueName() override;
41    llvm::Value * hsimd_packh(unsigned fw, llvm::Value * a, llvm::Value * b) override;
42    llvm::Value * hsimd_packl(unsigned fw, llvm::Value * a, llvm::Value * b) override;
43    llvm::Value * esimd_mergeh(unsigned fw, llvm::Value * a, llvm::Value * b) override;
44    llvm::Value * esimd_mergel(unsigned fw, llvm::Value * a, llvm::Value * b) override;
45    llvm::Value * hsimd_packh_in_lanes(unsigned lanes, unsigned fw, llvm::Value * a, llvm::Value * b) override;
46    llvm::Value * hsimd_packl_in_lanes(unsigned lanes, unsigned fw, llvm::Value * a, llvm::Value * b) override;
47    std::pair<llvm::Value *, llvm::Value *> bitblock_add_with_carry(llvm::Value * a, llvm::Value * b, llvm::Value * carryin) override;
48
49    ~IDISA_AVX2_Builder() {}
50};
51   
52}
53#endif // IDISA_AVX_BUILDER_H
Note: See TracBrowser for help on using the repository browser.