LLVM
15.0.0git
|
#include "llvm/IR/AutoUpgrade.h"
#include "llvm/ADT/StringSwitch.h"
#include "llvm/ADT/Triple.h"
#include "llvm/IR/Constants.h"
#include "llvm/IR/DebugInfo.h"
#include "llvm/IR/DiagnosticInfo.h"
#include "llvm/IR/Function.h"
#include "llvm/IR/IRBuilder.h"
#include "llvm/IR/InstVisitor.h"
#include "llvm/IR/Instruction.h"
#include "llvm/IR/IntrinsicInst.h"
#include "llvm/IR/Intrinsics.h"
#include "llvm/IR/IntrinsicsAArch64.h"
#include "llvm/IR/IntrinsicsARM.h"
#include "llvm/IR/IntrinsicsX86.h"
#include "llvm/IR/LLVMContext.h"
#include "llvm/IR/Module.h"
#include "llvm/IR/Verifier.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/Regex.h"
#include <cstring>
Go to the source code of this file.
Definition at line 1515 of file AutoUpgrade.cpp.
References Builder, llvm::Constant::getNullValue(), llvm::Value::getType(), getX86MaskVec(), i, llvm::BitmaskEnumDetail::Mask(), and llvm::max().
Referenced by upgradeMaskedCompare().
|
static |
Definition at line 1190 of file AutoUpgrade.cpp.
References Builder, llvm::FixedVectorType::get(), and llvm::BitmaskEnumDetail::Mask().
|
static |
Definition at line 1178 of file AutoUpgrade.cpp.
References Builder, llvm::Value::getType(), getX86MaskVec(), and llvm::BitmaskEnumDetail::Mask().
Referenced by upgradeAbs(), upgradeAVX512MaskToSelect(), upgradePMULDQ(), UpgradeX86ALIGNIntrinsics(), UpgradeX86BinaryIntrinsics(), upgradeX86ConcatShift(), UpgradeX86MaskedShift(), upgradeX86Rotate(), and UpgradeX86VPERMT2Intrinsics().
Definition at line 1158 of file AutoUpgrade.cpp.
References assert(), Builder, llvm::FixedVectorType::get(), i, llvm::isPowerOf2_32(), llvm::makeArrayRef(), and llvm::BitmaskEnumDetail::Mask().
Referenced by ApplyX86MaskOn1BitsVec(), EmitX86Select(), UpgradeMaskedLoad(), UpgradeMaskedStore(), and UpgradeMaskToInt().
|
static |
Definition at line 4555 of file AutoUpgrade.cpp.
Referenced by llvm::upgradeInstructionLoopAttachment().
|
static |
Definition at line 38 of file AutoUpgrade.cpp.
References llvm::Value::getName(), and llvm::Value::setName().
Referenced by UpgradeIntrinsicFunction1(), UpgradePTESTIntrinsic(), UpgradeX86IntrinsicFunction(), UpgradeX86IntrinsicsWith8BitMask(), and UpgradeX86MaskedFPCompare().
Definition at line 85 of file AutoUpgrade.cpp.
Referenced by UpgradeX86IntrinsicFunction().
Definition at line 1475 of file AutoUpgrade.cpp.
References llvm::abs(), llvm::CallBase::arg_size(), Builder, EmitX86Select(), F, llvm::CallBase::getArgOperand(), llvm::Intrinsic::getDeclaration(), llvm::Instruction::getModule(), and llvm::Value::getType().
|
static |
Definition at line 1850 of file AutoUpgrade.cpp.
References llvm::CallBase::args(), Builder, C1, F, llvm::FixedVectorType::get(), llvm::CallBase::getArgOperand(), llvm::Intrinsic::getDeclaration(), llvm::CallBase::getIntrinsicID(), llvm::Value::getName(), llvm::User::getOperand(), llvm::Type::getScalarSizeInBits(), llvm::Value::getType(), and llvm_unreachable.
|
static |
Definition at line 1601 of file AutoUpgrade.cpp.
References llvm::CallBase::arg_size(), llvm::AMDGPU::HSAMD::Kernel::Key::Args, llvm::CallBase::args(), Builder, EmitX86Select(), llvm::CallBase::getArgOperand(), llvm::Intrinsic::getDeclaration(), llvm::Instruction::getModule(), llvm::Type::getPrimitiveSizeInBits(), llvm::Type::getScalarSizeInBits(), llvm::Value::getType(), llvm::Type::isFPOrFPVectorTy(), and llvm_unreachable.
Definition at line 534 of file AutoUpgrade.cpp.
References llvm::AMDGPU::HSAMD::Kernel::Key::Args, assert(), llvm::StringSwitch< T, R >::Case(), llvm::StringSwitch< T, R >::Cases(), llvm::Function::Create(), llvm::StringSwitch< T, R >::Default(), F, llvm::FunctionType::get(), llvm::StructType::get(), llvm::FixedVectorType::get(), llvm::Type::getBFloatTy(), llvm::Intrinsic::getDeclaration(), llvm::VectorType::getElementType(), llvm::Type::getInt1Ty(), llvm::Intrinsic::getIntrinsicInfoTableEntries(), llvm::Intrinsic::getName(), llvm::Type::isFloatingPointTy(), llvm::Regex::match(), memcpy(), llvm::None, llvm::Intrinsic::not_intrinsic, prefetch, R2, llvm::Intrinsic::remangleIntrinsicFunction(), rename(), llvm::ARM_MB::ST, llvm::StringSwitch< T, R >::StartsWith(), llvm::Intrinsic::IITDescriptor::Struct, and UpgradeX86IntrinsicFunction().
Referenced by llvm::UpgradeIntrinsicFunction().
Definition at line 4579 of file AutoUpgrade.cpp.
References E, llvm::MDTuple::get(), I, llvm::SmallVectorImpl< T >::reserve(), T, and upgradeLoopTag().
Referenced by llvm::upgradeInstructionLoopAttachment().
|
static |
Definition at line 4567 of file AutoUpgrade.cpp.
References assert(), llvm::StringRef::drop_front(), llvm::MDString::get(), llvm::StringRef::size(), and llvm::StringRef::startswith().
Referenced by upgradeLoopArgument().
|
static |
Definition at line 1537 of file AutoUpgrade.cpp.
References ApplyX86MaskOn1BitsVec(), llvm::CallBase::arg_size(), Builder, llvm::FixedVectorType::get(), llvm::Constant::getAllOnesValue(), llvm::CallBase::getArgOperand(), llvm::Constant::getNullValue(), llvm::Value::getType(), llvm::CmpInst::ICMP_EQ, llvm::CmpInst::ICMP_NE, llvm::CmpInst::ICMP_SGE, llvm::CmpInst::ICMP_SGT, llvm::CmpInst::ICMP_SLE, llvm::CmpInst::ICMP_SLT, llvm::CmpInst::ICMP_UGE, llvm::CmpInst::ICMP_UGT, llvm::CmpInst::ICMP_ULE, llvm::CmpInst::ICMP_ULT, llvm_unreachable, llvm::BitmaskEnumDetail::Mask(), and Signed.
|
static |
Definition at line 1452 of file AutoUpgrade.cpp.
References Align, Builder, llvm::TypeSize::getFixedSize(), llvm::Type::getPrimitiveSizeInBits(), llvm::Value::getType(), llvm::PointerType::getUnqual(), getX86MaskVec(), and llvm::BitmaskEnumDetail::Mask().
Definition at line 1577 of file AutoUpgrade.cpp.
References B, Builder, llvm::CallBase::getArgOperand(), llvm::BitmaskEnumDetail::Mask(), and llvm::MCID::Select.
|
static |
Definition at line 1430 of file AutoUpgrade.cpp.
References Align, Builder, llvm::Data, llvm::PointerType::getUnqual(), getX86MaskVec(), and llvm::BitmaskEnumDetail::Mask().
Definition at line 1592 of file AutoUpgrade.cpp.
References Builder, llvm::CallBase::getArgOperand(), llvm::Value::getType(), getX86MaskVec(), and llvm::BitmaskEnumDetail::Mask().
Definition at line 1485 of file AutoUpgrade.cpp.
References llvm::CallBase::arg_size(), Builder, EmitX86Select(), llvm::ConstantInt::get(), llvm::CallBase::getArgOperand(), llvm::Value::getType(), LHS, llvm::BitmaskEnumDetail::Mask(), and RHS.
|
static |
Definition at line 42 of file AutoUpgrade.cpp.
References F, llvm::FixedVectorType::get(), llvm::Intrinsic::getDeclaration(), llvm::Type::getFloatTy(), and rename().
Referenced by UpgradeX86IntrinsicFunction().
|
static |
This checks for objc retain release marker which should be upgraded.
It returns true if module is modified.
Definition at line 4213 of file AutoUpgrade.cpp.
References llvm::Module::Error, llvm::MDString::get(), llvm::NamedMDNode::getOperand(), and M.
Referenced by llvm::UpgradeARCRuntime().
|
static |
Definition at line 1207 of file AutoUpgrade.cpp.
References assert(), Builder, EmitX86Select(), llvm::Constant::getNullValue(), llvm::Value::getType(), i, llvm::isPowerOf2_32(), l, llvm::makeArrayRef(), llvm::BitmaskEnumDetail::Mask(), and Shift.
|
static |
Definition at line 1314 of file AutoUpgrade.cpp.
References llvm::CallBase::arg_size(), Builder, EmitX86Select(), llvm::Intrinsic::getDeclaration(), llvm::Instruction::getModule(), llvm::User::getOperand(), llvm::Value::getType(), and llvm::BitmaskEnumDetail::Mask().
|
static |
Definition at line 1396 of file AutoUpgrade.cpp.
References llvm::CallBase::arg_size(), Builder, EmitX86Select(), llvm::ConstantAggregateZero::get(), llvm::CallBase::getArgOperand(), llvm::Intrinsic::getDeclaration(), llvm::Instruction::getModule(), llvm::User::getOperand(), llvm::Type::getScalarType(), llvm::Value::getType(), llvm::BitmaskEnumDetail::Mask(), and std::swap().
Definition at line 420 of file AutoUpgrade.cpp.
References F, llvm::Intrinsic::getDeclaration(), rename(), ShouldUpgradeX86Intrinsic(), UpgradePTESTIntrinsic(), UpgradeX86IntrinsicsWith8BitMask(), and UpgradeX86MaskedFPCompare().
Referenced by UpgradeIntrinsicFunction1().
|
static |
Definition at line 58 of file AutoUpgrade.cpp.
References F, llvm::Intrinsic::getDeclaration(), llvm::Type::isIntegerTy(), and rename().
Referenced by UpgradeX86IntrinsicFunction().
|
static |
Definition at line 74 of file AutoUpgrade.cpp.
References F, llvm::Intrinsic::getDeclaration(), and rename().
Referenced by UpgradeX86IntrinsicFunction().
|
static |
Definition at line 1569 of file AutoUpgrade.cpp.
References Builder, EmitX86Select(), llvm::CallBase::getArgOperand(), llvm::Intrinsic::getDeclaration(), and llvm::Instruction::getModule().
|
static |
Definition at line 1092 of file AutoUpgrade.cpp.
References Builder, llvm::FixedVectorType::get(), llvm::Constant::getNullValue(), i, l, llvm::makeArrayRef(), and Shift.
|
static |
Definition at line 1126 of file AutoUpgrade.cpp.
References Builder, llvm::FixedVectorType::get(), llvm::Constant::getNullValue(), i, l, llvm::makeArrayRef(), and Shift.
Definition at line 1330 of file AutoUpgrade.cpp.
References llvm::CallBase::arg_size(), Builder, EmitX86Select(), llvm::CallBase::getArgOperand(), llvm::Intrinsic::getDeclaration(), llvm::Instruction::getModule(), llvm::User::getOperand(), llvm::Type::getScalarType(), llvm::Value::getType(), and llvm::BitmaskEnumDetail::Mask().
|
static |
Definition at line 1357 of file AutoUpgrade.cpp.
References Builder, llvm::MipsISD::Ext, llvm::Constant::getAllOnesValue(), llvm::CallBase::getArgOperand(), llvm::Constant::getNullValue(), llvm::Value::getType(), llvm::CmpInst::ICMP_EQ, llvm::CmpInst::ICMP_NE, llvm::CmpInst::ICMP_SGE, llvm::CmpInst::ICMP_SGT, llvm::CmpInst::ICMP_SLE, llvm::CmpInst::ICMP_SLT, llvm::CmpInst::ICMP_UGE, llvm::CmpInst::ICMP_UGT, llvm::CmpInst::ICMP_ULE, llvm::CmpInst::ICMP_ULT, LHS, llvm_unreachable, and RHS.
|
static |
Definition at line 1253 of file AutoUpgrade.cpp.
References llvm::AMDGPU::HSAMD::Kernel::Key::Args, Builder, EmitX86Select(), llvm::ConstantAggregateZero::get(), llvm::CallBase::getArgOperand(), llvm::Intrinsic::getDeclaration(), llvm::Instruction::getModule(), llvm::Type::getPrimitiveSizeInBits(), llvm::Type::getScalarSizeInBits(), llvm::Value::getType(), llvm::Type::isFPOrFPVectorTy(), llvm_unreachable, and std::swap().