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

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

Changes towards separate compilation

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