[general] removed useless files and includes

This commit is contained in:
Philippe Tillet
2019-10-20 19:29:48 -04:00
parent 96cba9036a
commit de6fdd5625
17 changed files with 10 additions and 77 deletions

View File

@@ -1,7 +1,5 @@
#include <algorithm>
#include <iostream>
#include "triton/codegen/transform/reassociate.h"
#include "triton/codegen/analysis/align.h"
#include "triton/ir/module.h"
#include "triton/ir/function.h"
#include "triton/ir/basic_block.h"
@@ -12,27 +10,6 @@ namespace triton {
namespace codegen{
namespace transform{
//inline Constant *get_gep_cst_offset(GetElementPtrInst *gep){
// std::vector<Value*> idx_vals;
// std::transform(gep->idx_begin(), gep->idx_end(),
// std::back_inserter(idx_vals),
// [](Value* x){ return x;});
// if(idx_vals.size() > 1)
// return nullptr;
// Value *idx = idx_vals[0];
// if(isa<Constant>(idx))
// return idx;
// if(Instruction *BinOp = is_bin_add(idx)){
// Value *LHS = BinOp->getOperand(0);
// Value *RHS = BinOp->getOperand(1);
// if(Constant* Res = dyn_cast<Constant>(LHS))
// return Res;
// if(Constant* Res = dyn_cast<Constant>(RHS))
// return Res;
// }
// return nullptr;
//}
inline ir::instruction* reassociate::is_bin_add(ir::value *x) {
ir::binary_operator *bin_op = dynamic_cast<ir::binary_operator*>(x);
@@ -141,10 +118,6 @@ ir::value *reassociate::reassociate_idx(ir::value *old_value,
return new_value;
}
reassociate::reassociate(analysis::align *align): align_(align)
{ }
/* run */
void reassociate::run(ir::module &mod) {
ir::builder &builder = mod.get_builder();