blob: c78f90b4de239835e8ca3bb0a57b4b133eceb510 [file] [log] [blame]
//===--------------- SimplifyGEP.cpp - Simplify GEPs types ---------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
//
// Simplify GEPs with bitcasts (mostly cloned from InstCombine)
//
//===----------------------------------------------------------------------===//
#include "llvm/Target/TargetData.h"
#include "llvm/Instructions.h"
#include "llvm/Module.h"
#include "llvm/Pass.h"
namespace llvm {
//
// Class: SimplifyGEP
//
class SimplifyGEP : public ModulePass {
private:
TargetData * TD;
public:
static char ID;
SimplifyGEP() : ModulePass(ID) {}
virtual bool runOnModule(Module& M);
virtual void getAnalysisUsage(AnalysisUsage &AU) const {
AU.addRequired<TargetData>();
}
};
}