source: icGREP/icgrep-devel/icgrep/IR_Gen/idisa_avx_builder.h @ 5435

Last change on this file since 5435 was 5435, checked in by nmedfort, 2 years ago

Continued refactoring work.

File size: 1.7 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
11using namespace llvm;
12
13namespace IDISA {
14
15class IDISA_AVX_Builder : public IDISA_SSE2_Builder {
16public:
17   
18    IDISA_AVX_Builder(llvm::Module * const module, unsigned archBitWidth, unsigned bitBlockWidth, unsigned stride)
19    : IDISA_Builder(module, archBitWidth, bitBlockWidth, stride)
20    , IDISA_SSE2_Builder(module, archBitWidth, bitBlockWidth, stride)
21    {
22
23    }
24
25    virtual std::string getBuilderUniqueName() override;
26
27    Value * hsimd_signmask(unsigned fw, Value * a) override;
28
29    ~IDISA_AVX_Builder() {}
30
31};
32
33class IDISA_AVX2_Builder : public IDISA_AVX_Builder {
34public:
35   
36    IDISA_AVX2_Builder(llvm::Module * const module, unsigned archBitWidth, unsigned bitBlockWidth, unsigned stride)
37    : IDISA_Builder(module, archBitWidth, bitBlockWidth, stride)
38    , IDISA_AVX_Builder(module, archBitWidth, bitBlockWidth, stride) {
39
40    }
41
42    virtual std::string getBuilderUniqueName() override;
43    Value * hsimd_packh(unsigned fw, Value * a, Value * b) override;
44    Value * hsimd_packl(unsigned fw, Value * a, Value * b) override;
45    Value * esimd_mergeh(unsigned fw, Value * a, Value * b) override;
46    Value * esimd_mergel(unsigned fw, Value * a, Value * b) override;
47    Value * hsimd_packh_in_lanes(unsigned lanes, unsigned fw, Value * a, Value * b) override;
48    Value * hsimd_packl_in_lanes(unsigned lanes, unsigned fw, Value * a, Value * b) override;
49    std::pair<Value *, Value *> bitblock_add_with_carry(Value * a, Value * b, Value * carryin) override;
50
51    ~IDISA_AVX2_Builder() {}
52};
53   
54}
55#endif // IDISA_AVX_BUILDER_H
Note: See TracBrowser for help on using the repository browser.