//===-- ConstantFolding.cpp - Fold instructions into constants ------------===////// The LLVM Compiler Infrastructure//// This file is distributed under the University of Illinois Open Source// License. See LICENSE.TXT for details.////===----------------------------------------------------------------------===////// This file defines routines for folding instructions into constants.//// Also, to supplement the basic VMCore ConstantExpr simplifications,// this file defines some additional folding routines that can make use of// DataLayout information. These functions cannot go in VMCore due to library// dependency issues.////===----------------------------------------------------------------------===//#include"llvm/Analysis/ConstantFolding.h"#include"llvm/Constants.h"#include"llvm/DerivedTypes.h"#include"llvm/Function.h"#include"llvm/GlobalVariable.h"#include"llvm/Instructions.h"#include"llvm/Intrinsics.h"#include"llvm/Operator.h"#include"llvm/Analysis/ValueTracking.h"#include"llvm/DataLayout.h"#include"llvm/Target/TargetLibraryInfo.h"#include"llvm/ADT/SmallVector.h"#include"llvm/ADT/StringMap.h"#include"llvm/Support/ErrorHandling.h"#include"llvm/Support/GetElementPtrTypeIterator.h"#include"llvm/Support/MathExtras.h"#include"llvm/Support/FEnv.h"#include<cerrno>#include<cmath>usingnamespacellvm;//===----------------------------------------------------------------------===//