public:
INLINE SelectionDAG(const ir::Instruction &insn) :
insn(insn), mergeable(0), childNum(insn.getSrcNum()), isRoot(0) {
- GBE_ASSERT(insn.getSrcNum() < 127);
+ GBE_ASSERT(insn.getSrcNum() <= ir::Instruction::MAX_SRC_NUM);
for (uint32_t childID = 0; childID < childNum; ++childID)
this->child[childID] = NULL;
computeBool = false;
return T::isClassOf(*this);
}
/*! max_src for store instruction (vec16 + addr) */
- static const uint32_t MAX_SRC_NUM = 17;
- static const uint32_t MAX_DST_NUM = 16;
+ static const uint32_t MAX_SRC_NUM = 32;
+ static const uint32_t MAX_DST_NUM = 32;
protected:
BasicBlock *parent; //!< The basic block containing the instruction
GBE_CLASS(Instruction); //!< Use internal allocators
void setComponent(int c, llvm::Value* val)
{
- assert(c >= 0 && c < 16 && "Out of bounds component");
+ assert(c >= 0 && c < 32 && "Out of bounds component");
vals[c] = val;
}
llvm::Value* getComponent(int c)
{
- assert(c >= 0 && c < 16 && "Out of bounds component");
+ assert(c >= 0 && c < 32 && "Out of bounds component");
assert(vals[c] && "Requesting non-existing component");
return vals[c];
}
// {Value* x, Value* y, Value* z, Value* w}
- llvm::Value* vals[16];
+ llvm::Value* vals[32];
};
class Scalarize : public FunctionPass {
void Scalarize::makeScalarizedCalls(Function* f, ArrayRef<Value*> args, int count, VectorValues& vVals)
{
- assert(count > 0 && count <= 16 && "invalid number of vector components");
+ assert(count > 0 && count <= 32 && "invalid number of vector components");
for (int i = 0; i < count; ++i) {
Value* res;
SmallVector<Value*, 8> callArgs(args.begin(), args.end());
void Scalarize::makePerComponentScalarizedCalls(Instruction* inst, ArrayRef<Value*> args)
{
int count = GetComponentCount(inst);
- assert(count > 0 && count <= 16 && "invalid number of vector components");
+ assert(count > 0 && count <= 32 && "invalid number of vector components");
assert((inst->getNumOperands() == args.size() || isa<PHINode>(inst))
&& "not enough arguments passed for instruction");