forked from halide/Halide
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCodeGen_X86.h
54 lines (42 loc) · 1.17 KB
/
CodeGen_X86.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#ifndef HALIDE_CODEGEN_X86_H
#define HALIDE_CODEGEN_X86_H
/** \file
* Defines the code-generator for producing x86 machine code
*/
#include "CodeGen_Posix.h"
#include "Target.h"
namespace llvm {
class JITEventListener;
}
namespace Halide {
namespace Internal {
/** A code generator that emits x86 code from a given Halide stmt. */
class CodeGen_X86 : public CodeGen_Posix {
public:
/** Create an x86 code generator. Processor features can be
* enabled using the appropriate flags in the target struct. */
CodeGen_X86(Target);
protected:
std::string mcpu() const;
std::string mattrs() const;
bool use_soft_float_abi() const;
int native_vector_bits() const;
Expr mulhi_shr(Expr a, Expr b, int shr);
using CodeGen_Posix::visit;
/** Nodes for which we want to emit specific sse/avx intrinsics */
// @{
void visit(const Call *);
void visit(const Add *);
void visit(const Sub *);
void visit(const Cast *);
void visit(const GT *);
void visit(const LT *);
void visit(const LE *);
void visit(const GE *);
void visit(const EQ *);
void visit(const NE *);
void visit(const Select *);
// @}
};
}}
#endif