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

Last change on this file since 6053 was 6050, checked in by cameron, 16 months ago

IDISA testing

File size: 1.6 KB
Line 
1#ifndef IDISA_SSE_BUILDER_H
2#define IDISA_SSE_BUILDER_H
3
4/*
5 *  Copyright (c) 2018 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 bitBlockWidth, unsigned stride)
18    : IDISA_Builder(C, bitBlockWidth, stride) {
19
20    }
21
22    virtual std::string getBuilderUniqueName() override;
23    llvm::Value * hsimd_signmask(unsigned fw, llvm::Value * a) override;
24    llvm::Value * mvmd_compress(unsigned fw, llvm::Value * a, llvm::Value * select_mask) override;
25    ~IDISA_SSE_Builder() {}
26};
27
28class IDISA_SSE2_Builder : public IDISA_SSE_Builder {
29public:
30 
31    IDISA_SSE2_Builder(llvm::LLVMContext & C, unsigned bitBlockWidth, unsigned stride)
32    : IDISA_Builder(C, bitBlockWidth, stride)
33    , IDISA_SSE_Builder(C, 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) override;
42    llvm::Value * mvmd_shuffle(unsigned fw, llvm::Value * a, llvm::Value * shuffle_table) override;
43    ~IDISA_SSE2_Builder() {}
44};
45
46}
47
48#endif // IDISA_SSE_BUILDER_H
Note: See TracBrowser for help on using the repository browser.