LLVM 20.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/ConstantFold.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. | |
static ConstantFP * | flushDenormalConstant (Type *Ty, const APFloat &APF, DenormalMode::DenormalModeKind Mode) |
static DenormalMode | getInstrDenormalMode (const Instruction *CtxI, Type *Ty) |
Return the denormal mode that can be assumed when executing a floating point operation at CtxI . | |
static ConstantFP * | flushDenormalConstantFP (ConstantFP *CFP, const Instruction *Inst, bool IsOutput) |
|
static |
Definition at line 1311 of file ConstantFolding.cpp.
References llvm::DenormalMode::Dynamic, llvm::Type::getContext(), llvm::APFloat::getSemantics(), llvm::APFloat::getZero(), llvm::DenormalMode::IEEE, llvm::APFloat::isNegative(), llvm_unreachable, llvm::DenormalMode::PositiveZero, and llvm::DenormalMode::PreserveSign.
Referenced by flushDenormalConstantFP(), and llvm::FlushFPConstant().
|
static |
Definition at line 1340 of file ConstantFolding.cpp.
References flushDenormalConstant(), getInstrDenormalMode(), llvm::Value::getType(), llvm::ConstantFP::getValueAPF(), and llvm::APFloat::isDenormal().
Referenced by llvm::FlushFPConstant().
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 676 of file ConstantFolding.cpp.
References llvm::sampleprof::Base, llvm::CallingConv::C, DL, llvm::drop_begin(), and llvm::Offset.
Referenced by llvm::ConstantFoldLoadFromConst().
|
static |
Return the denormal mode that can be assumed when executing a floating point operation at CtxI
.
Definition at line 1334 of file ConstantFolding.cpp.
References llvm::Function::getDenormalMode(), llvm::DenormalMode::getDynamic(), llvm::Type::getFltSemantics(), llvm::Instruction::getFunction(), and llvm::ilist_detail::node_parent_access< NodeTy, ParentTy >::getParent().
Referenced by flushDenormalConstantFP(), and llvm::FlushFPConstant().