source: icGREP/icgrep-devel/icgrep/IR_Gen/idisa_sse_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.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
12using namespace llvm;
13
14namespace IDISA {
15
16class IDISA_SSE_Builder : public virtual IDISA_Builder {
17public:
18 
19    IDISA_SSE_Builder(llvm::Module * const module, unsigned archBitWidth, unsigned bitBlockWidth, unsigned stride)
20    : IDISA_Builder(module, archBitWidth, bitBlockWidth, stride) {
21
22    }
23
24    virtual std::string getBuilderUniqueName() override;
25    Value * hsimd_signmask(unsigned fw, Value * a) override;
26    ~IDISA_SSE_Builder() {}
27
28};
29
30class IDISA_SSE2_Builder : public IDISA_SSE_Builder {
31public:
32 
33    IDISA_SSE2_Builder(llvm::Module * const module, unsigned archBitWidth, unsigned bitBlockWidth, unsigned stride)
34    : IDISA_Builder(module, archBitWidth, bitBlockWidth, stride)
35    , IDISA_SSE_Builder(module, archBitWidth, bitBlockWidth, stride) {
36
37    }
38
39    virtual std::string getBuilderUniqueName() override;
40    Value * hsimd_signmask(unsigned fw, Value * a) override;
41    Value * hsimd_packh(unsigned fw, Value * a, Value * b) override;
42    Value * hsimd_packl(unsigned fw, Value * a, Value * b) override;
43    std::pair<Value *, Value *> bitblock_advance(Value * a, Value * shiftin, unsigned shift) final;
44
45    ~IDISA_SSE2_Builder() {}
46
47};
48
49}
50
51#endif // IDISA_SSE_BUILDER_H
Note: See TracBrowser for help on using the repository browser.