//===- GVN.cpp - Eliminate redundant values and loads ------------===////// The LLVM Compiler Infrastructure//// This file is distributed under the University of Illinois Open Source// License. See LICENSE.TXT for details.////===----------------------------------------------------------------------===////// This pass performs global value numbering to eliminate fully redundant// instructions. It also performs simple dead load elimination.////===----------------------------------------------------------------------===//#define DEBUG_TYPE "gvn"#include"llvm/Transforms/Scalar.h"#include"llvm/BasicBlock.h"#include"llvm/Constants.h"#include"llvm/DerivedTypes.h"#include"llvm/Function.h"#include"llvm/IntrinsicInst.h"#include"llvm/Instructions.h"#include"llvm/ParameterAttributes.h"#include"llvm/Value.h"#include"llvm/ADT/BitVector.h"#include"llvm/ADT/DenseMap.h"#include"llvm/ADT/DepthFirstIterator.h"#include"llvm/ADT/SmallPtrSet.h"#include"llvm/ADT/SmallVector.h"#include"llvm/ADT/Statistic.h"#include"llvm/Analysis/Dominators.h"#include"llvm/Analysis/AliasAnalysis.h"#include"llvm/Analysis/MemoryDependenceAnalysis.h"#include"llvm/Support/CFG.h"#include"llvm/Support/Compiler.h"#include"llvm/Target/TargetData.h"usingnamespacellvm;//===----------------------------------------------------------------------===//// ValueTable Class//===----------------------------------------------------------------------===///// This class holds the mapping between values