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

Last change on this file since 5916 was 5865, checked in by nmedfort, 16 months ago

More work on the pipeline I/O rate handling

File size: 1.4 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
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    ~IDISA_SSE_Builder() {}
25};
26
27class IDISA_SSE2_Builder : public IDISA_SSE_Builder {
28public:
29 
30    IDISA_SSE2_Builder(llvm::LLVMContext & C, unsigned bitBlockWidth, unsigned stride)
31    : IDISA_Builder(C, bitBlockWidth, stride)
32    , IDISA_SSE_Builder(C, bitBlockWidth, stride) {
33
34    }
35
36    virtual std::string getBuilderUniqueName() override;
37    llvm::Value * hsimd_signmask(unsigned fw, llvm::Value * a) override;
38    llvm::Value * hsimd_packh(unsigned fw, llvm::Value * a, llvm::Value * b) override;
39    llvm::Value * hsimd_packl(unsigned fw, llvm::Value * a, llvm::Value * b) override;
40    std::pair<llvm::Value *, llvm::Value *> bitblock_advance(llvm::Value * a, llvm::Value * shiftin, unsigned shift) final;
41    ~IDISA_SSE2_Builder() {}
42};
43
44}
45
46#endif // IDISA_SSE_BUILDER_H
Note: See TracBrowser for help on using the repository browser.