Skip to content

Commit

Permalink
remove dead code
Browse files Browse the repository at this point in the history
  • Loading branch information
nunoplopes committed Dec 11, 2024
1 parent 9530422 commit 060c59b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 22 deletions.
28 changes: 8 additions & 20 deletions ir/x86_intrinsics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,30 +4,24 @@ using namespace smt;
using namespace std;

// the shape of a vector is stored as <# of lanes, element bits>
static constexpr std::pair<unsigned, unsigned> binop_shape_op0[] = {
static constexpr std::pair<uint8_t, uint8_t> binop_shape_op0[] = {
#define PROCESS(NAME, A, B, C, D, E, F) std::make_pair(C, D),
#include "x86_intrinsics_binop.inc"
#undef PROCESS
};

static constexpr std::pair<unsigned, unsigned> binop_shape_op1[] = {
static constexpr std::pair<uint8_t, uint8_t> binop_shape_op1[] = {
#define PROCESS(NAME, A, B, C, D, E, F) std::make_pair(E, F),
#include "x86_intrinsics_binop.inc"
#undef PROCESS
};

static constexpr std::pair<unsigned, unsigned> binop_shape_ret[] = {
static constexpr std::pair<uint8_t, uint8_t> binop_shape_ret[] = {
#define PROCESS(NAME, A, B, C, D, E, F) std::make_pair(A, B),
#include "x86_intrinsics_binop.inc"
#undef PROCESS
};

static constexpr unsigned binop_ret_width[] = {
#define PROCESS(NAME, A, B, C, D, E, F) A *B,
#include "x86_intrinsics_binop.inc"
#undef PROCESS
};

namespace IR {

vector<Value *> X86IntrinBinOp::operands() const {
Expand Down Expand Up @@ -605,36 +599,30 @@ unique_ptr<Instr> X86IntrinBinOp::dup(Function &f, const string &suffix) const {
}

// the shape of a vector is stored as <# of lanes, element bits>
static constexpr std::pair<unsigned, unsigned> terop_shape_op0[] = {
static constexpr std::pair<uint8_t, uint8_t> terop_shape_op0[] = {
#define PROCESS(NAME, A, B, C, D, E, F, G, H) std::make_pair(C, D),
#include "x86_intrinsics_terop.inc"
#undef PROCESS
};

static constexpr std::pair<unsigned, unsigned> terop_shape_op1[] = {
static constexpr std::pair<uint8_t, uint8_t> terop_shape_op1[] = {
#define PROCESS(NAME, A, B, C, D, E, F, G, H) std::make_pair(E, F),
#include "x86_intrinsics_terop.inc"
#undef PROCESS
};

static constexpr std::pair<unsigned, unsigned> terop_shape_op2[] = {
static constexpr std::pair<uint8_t, uint8_t> terop_shape_op2[] = {
#define PROCESS(NAME, A, B, C, D, E, F, G, H) std::make_pair(G, H),
#include "x86_intrinsics_terop.inc"
#undef PROCESS
};

static constexpr std::pair<unsigned, unsigned> terop_shape_ret[] = {
static constexpr std::pair<uint8_t, uint8_t> terop_shape_ret[] = {
#define PROCESS(NAME, A, B, C, D, E, F, G, H) std::make_pair(A, B),
#include "x86_intrinsics_terop.inc"
#undef PROCESS
};

static constexpr unsigned terop_ret_width[] = {
#define PROCESS(NAME, A, B, C, D, E, F, G, H) A *B,
#include "x86_intrinsics_terop.inc"
#undef PROCESS
};

void X86IntrinTerOp::print(ostream &os) const {
const char *name;
switch (op) {
Expand All @@ -645,7 +633,7 @@ void X86IntrinTerOp::print(ostream &os) const {
#include "x86_intrinsics_terop.inc"
#undef PROCESS
}
os << getName() << " = " << name << ' ' << *a << ", " << *b;
os << getName() << " = " << name << ' ' << *a << ", " << *b << ", " << *c;
}

StateValue X86IntrinTerOp::toSMT(State &s) const {
Expand Down
2 changes: 0 additions & 2 deletions ir/x86_intrinsics.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ class X86IntrinBinOp final : public Instr {
bool propagatesPoison() const override;
bool hasSideEffects() const override;
void rauw(const Value &what, Value &with) override;
static std::string getOpName(Op op);
void print(std::ostream &os) const override;
StateValue toSMT(State &s) const override;
smt::expr getTypeConstraints(const Function &f) const override;
Expand Down Expand Up @@ -50,7 +49,6 @@ class X86IntrinTerOp final : public Instr {
bool propagatesPoison() const override;
bool hasSideEffects() const override;
void rauw(const Value &what, Value &with) override;
static std::string getOpName(Op op);
void print(std::ostream &os) const override;
StateValue toSMT(State &s) const override;
smt::expr getTypeConstraints(const Function &f) const override;
Expand Down

0 comments on commit 060c59b

Please sign in to comment.