https://github.com/halide/Halide
Raw File
Tip revision: 5deee77b677da97c4dadc966f76d8bf01d855c57 authored by Steven Johnson on 01 April 2020, 00:47:39 UTC
wip
Tip revision: 5deee77
CodeGen_RISCV.h
#ifndef HALIDE_CODEGEN_RISCV_H
#define HALIDE_CODEGEN_RISCV_H

/** \file
 * Defines the code-generator for producing RISCV machine code.
 */

#include <string>

#include "CodeGen_Posix.h"

namespace Halide {
struct Target;

namespace Internal {

/** A code generator that emits mips code from a given Halide stmt. */
class CodeGen_RISCV : public CodeGen_Posix {
public:
    /** Create a mips code generator. Processor features can be
     * enabled using the appropriate flags in the target struct. */
    CodeGen_RISCV(Target);

protected:
    using CodeGen_Posix::visit;

    std::string mcpu() const override;
    std::string mattrs() const override;
    bool use_soft_float_abi() const override;
    int native_vector_bits() const override;
};

}  // namespace Internal
}  // namespace Halide

#endif
back to top