LLVM 20.0.0git
|
This pass does misc. More...
#include "AMDGPU.h"
#include "AMDGPUTargetMachine.h"
#include "SIModeRegisterDefaults.h"
#include "llvm/Analysis/AssumptionCache.h"
#include "llvm/Analysis/ConstantFolding.h"
#include "llvm/Analysis/TargetLibraryInfo.h"
#include "llvm/Analysis/UniformityAnalysis.h"
#include "llvm/Analysis/ValueTracking.h"
#include "llvm/CodeGen/TargetPassConfig.h"
#include "llvm/IR/Dominators.h"
#include "llvm/IR/IRBuilder.h"
#include "llvm/IR/InstVisitor.h"
#include "llvm/IR/IntrinsicsAMDGPU.h"
#include "llvm/IR/PatternMatch.h"
#include "llvm/InitializePasses.h"
#include "llvm/Pass.h"
#include "llvm/Support/KnownBits.h"
#include "llvm/Transforms/Utils/IntegerDivision.h"
#include "llvm/Transforms/Utils/Local.h"
Go to the source code of this file.
Classes | |
class | VectorSlice |
Helper class for "break large PHIs" (visitPHINode). More... | |
Macros | |
#define | DEBUG_TYPE "amdgpu-codegenprepare" |
Variables | |
DEBUG_TYPE | |
AMDGPU IR | optimizations |
AMDGPU IR | false |
This pass does misc.
AMDGPU optimizations on IR before instruction selection.
Definition in file AMDGPUCodeGenPrepare.cpp.
#define DEBUG_TYPE "amdgpu-codegenprepare" |
Definition at line 35 of file AMDGPUCodeGenPrepare.cpp.
Definition at line 1732 of file AMDGPUCodeGenPrepare.cpp.
Referenced by isInterestingPHIIncomingValue().
|
static |
Definition at line 1795 of file AMDGPUCodeGenPrepare.cpp.
References collectPHINodes(), I, and llvm::SmallPtrSetImpl< PtrType >::insert().
Referenced by collectPHINodes().
Emit an expansion of 1.0 / sqrt(Src) good for 1ulp that supports denormals.
Definition at line 863 of file AMDGPUCodeGenPrepare.cpp.
References llvm::IRBuilderBase::CreateFCmpOLT(), llvm::IRBuilderBase::CreateFMul(), llvm::IRBuilderBase::CreateSelect(), llvm::IRBuilderBase::CreateUnaryIntrinsic(), llvm::Type::getFltSemantics(), and llvm::APFloat::getSmallestNormalized().
|
static |
Definition at line 602 of file AMDGPUCodeGenPrepare.cpp.
References llvm::IRBuilderBase::CreateExtractElement(), I, and llvm::SmallVectorTemplateBase< T, bool >::push_back().
|
static |
Definition at line 694 of file AMDGPUCodeGenPrepare.cpp.
References llvm::User::getOperand().
|
static |
Definition at line 1172 of file AMDGPUCodeGenPrepare.cpp.
References llvm::IRBuilderBase::CreateLShr(), llvm::IRBuilderBase::CreateMul(), llvm::IRBuilderBase::CreateTrunc(), llvm::IRBuilderBase::CreateZExt(), llvm::IRBuilderBase::getInt32Ty(), llvm::IRBuilderBase::getInt64(), llvm::IRBuilderBase::getInt64Ty(), Hi, LHS, Lo, and RHS.
Referenced by getMulHu().
Definition at line 1186 of file AMDGPUCodeGenPrepare.cpp.
References getMul64(), LHS, and RHS.
|
static |
Definition at line 1362 of file AMDGPUCodeGenPrepare.cpp.
References llvm::computeKnownBits(), llvm::IRBuilderBase::CreateAShr(), DL, llvm::Constant::getAllOnesValue(), llvm::IRBuilderBase::getInt32(), llvm::Constant::getNullValue(), llvm::KnownBits::isNegative(), and llvm::KnownBits::isNonNegative().
Definition at line 1167 of file AMDGPUCodeGenPrepare.cpp.
References F, and llvm::Attribute::getValueAsBool().
Referenced by llvm::AMDGPUCodeGenPreparePass::run().
INITIALIZE_PASS_BEGIN | ( | AMDGPUCodeGenPrepare | , |
DEBUG_TYPE | , | ||
"AMDGPU IR optimizations" | , | ||
false | , | ||
false | |||
) |
|
static |
Definition at line 614 of file AMDGPUCodeGenPrepare.cpp.
References assert(), llvm::IRBuilderBase::CreateInsertElement(), llvm::PoisonValue::get(), I, llvm::Type::isVectorTy(), and llvm::SmallVectorBase< Size_T >::size().
Definition at line 1740 of file AMDGPUCodeGenPrepare.cpp.
References llvm::BitVector::all(), areInSameBB(), Idx, and llvm::BitVector::set().
Definition at line 2199 of file AMDGPUCodeGenPrepare.cpp.
References llvm::CallingConv::C, llvm::PatternMatch::m_APFloat(), and llvm::PatternMatch::match().
|
static |
V | Value to check |
DL | DataLayout |
TM | TargetMachine (TODO: remove once DL contains nullptr values) |
AS | Target Address Space |
V
cannot be the null value of AS
, false otherwise. Definition at line 2026 of file AMDGPUCodeGenPrepare.cpp.
References assert(), llvm::computeKnownBits(), and DL.
|
static |
Definition at line 429 of file AMDGPUCodeGenPrepare.cpp.
References I.
|
static |
Definition at line 443 of file AMDGPUCodeGenPrepare.cpp.
References I.
DEBUG_TYPE |
Definition at line 2320 of file AMDGPUCodeGenPrepare.cpp.
AMDGPU IR false |
Definition at line 2321 of file AMDGPUCodeGenPrepare.cpp.
AMDGPU IR optimizations |
Definition at line 2320 of file AMDGPUCodeGenPrepare.cpp.