LLVM
15.0.0git
|
#include "llvm/Analysis/ConstantFolding.h"
#include "llvm/ADT/APFloat.h"
#include "llvm/ADT/APInt.h"
#include "llvm/ADT/APSInt.h"
#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/Analysis/TargetFolder.h"
#include "llvm/Analysis/TargetLibraryInfo.h"
#include "llvm/Analysis/ValueTracking.h"
#include "llvm/Analysis/VectorUtils.h"
#include "llvm/Config/config.h"
#include "llvm/IR/Constant.h"
#include "llvm/IR/Constants.h"
#include "llvm/IR/DataLayout.h"
#include "llvm/IR/DerivedTypes.h"
#include "llvm/IR/Function.h"
#include "llvm/IR/GlobalValue.h"
#include "llvm/IR/GlobalVariable.h"
#include "llvm/IR/InstrTypes.h"
#include "llvm/IR/Instruction.h"
#include "llvm/IR/Instructions.h"
#include "llvm/IR/IntrinsicInst.h"
#include "llvm/IR/Intrinsics.h"
#include "llvm/IR/IntrinsicsAArch64.h"
#include "llvm/IR/IntrinsicsAMDGPU.h"
#include "llvm/IR/IntrinsicsARM.h"
#include "llvm/IR/IntrinsicsWebAssembly.h"
#include "llvm/IR/IntrinsicsX86.h"
#include "llvm/IR/Operator.h"
#include "llvm/IR/Type.h"
#include "llvm/IR/Value.h"
#include "llvm/Support/Casting.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/KnownBits.h"
#include "llvm/Support/MathExtras.h"
#include <cassert>
#include <cerrno>
#include <cfenv>
#include <cmath>
#include <cstdint>
Go to the source code of this file.
Functions | |
Constant * | getConstantAtOffset (Constant *Base, APInt Offset, const DataLayout &DL) |
If this Offset points exactly to the start of an aggregate element, return that element, otherwise return nullptr. More... | |
Constant * | FlushFPConstant (Constant *Operand, const llvm::Function *F, bool IsOutput) |
Constant* FlushFPConstant | ( | Constant * | Operand, |
const llvm::Function * | F, | ||
bool | IsOutput | ||
) |
Definition at line 1350 of file ConstantFolding.cpp.
References F, llvm::ConstantFP::get(), llvm::Type::getContext(), llvm::Type::getFltSemantics(), llvm::APFloat::getZero(), llvm::DenormalMode::IEEE, llvm::DenormalMode::Input, llvm::APFloat::isDenormal(), llvm::APFloat::isNegative(), llvm_unreachable, Mode, llvm::DenormalMode::Output, llvm::DenormalMode::PositiveZero, and llvm::DenormalMode::PreserveSign.
Referenced by llvm::ConstantFoldFPInstOperands().
Constant* getConstantAtOffset | ( | Constant * | Base, |
APInt | Offset, | ||
const DataLayout & | DL | ||
) |
If this Offset points exactly to the start of an aggregate element, return that element, otherwise return nullptr.
Definition at line 671 of file ConstantFolding.cpp.
References llvm::sampleprof::Base, DL, and llvm::drop_begin().
Referenced by llvm::ConstantFoldLoadFromConst().