LLVM 20.0.0git
|
#include "AMDGPUMCExpr.h"
#include "GCNSubtarget.h"
#include "Utils/AMDGPUBaseInfo.h"
#include "llvm/IR/Function.h"
#include "llvm/MC/MCAsmInfo.h"
#include "llvm/MC/MCAssembler.h"
#include "llvm/MC/MCContext.h"
#include "llvm/MC/MCStreamer.h"
#include "llvm/MC/MCSymbol.h"
#include "llvm/MC/MCValue.h"
#include "llvm/Support/KnownBits.h"
#include "llvm/Support/raw_ostream.h"
#include <optional>
Go to the source code of this file.
Typedefs | |
using | KnownBitsMap = DenseMap< const MCExpr *, KnownBits > |
Functions | |
static int64_t | op (AMDGPUMCExpr::VariantKind Kind, int64_t Arg1, int64_t Arg2) |
static KnownBits | fromOptionalToKnownBits (std::optional< bool > CompareResult) |
static void | knownBitsMapHelper (const MCExpr *Expr, KnownBitsMap &KBM, unsigned Depth=0) |
static void | binaryOpKnownBitsMapHelper (const MCExpr *Expr, KnownBitsMap &KBM, unsigned Depth) |
static void | unaryOpKnownBitsMapHelper (const MCExpr *Expr, KnownBitsMap &KBM, unsigned Depth) |
static void | targetOpKnownBitsMapHelper (const MCExpr *Expr, KnownBitsMap &KBM, unsigned Depth) |
static const MCExpr * | tryFoldHelper (const MCExpr *Expr, KnownBitsMap &KBM, MCContext &Ctx) |
using KnownBitsMap = DenseMap<const MCExpr *, KnownBits> |
Definition at line 329 of file AMDGPUMCExpr.cpp.
|
static |
Definition at line 333 of file AMDGPUMCExpr.cpp.
References llvm::MCBinaryExpr::Add, llvm::KnownBits::add(), llvm::MCBinaryExpr::And, llvm::MCBinaryExpr::AShr, llvm::KnownBits::ashr(), llvm::BitWidth, llvm::Depth, llvm::MCBinaryExpr::Div, llvm::MCBinaryExpr::EQ, llvm::KnownBits::eq(), fromOptionalToKnownBits(), llvm::MCBinaryExpr::getLHS(), llvm::MCBinaryExpr::getOpcode(), llvm::MCBinaryExpr::getRHS(), llvm::MCBinaryExpr::GT, llvm::MCBinaryExpr::GTE, knownBitsMapHelper(), llvm::MCBinaryExpr::LAnd, LHS, llvm::MCBinaryExpr::LOr, llvm::MCBinaryExpr::LShr, llvm::KnownBits::lshr(), llvm::MCBinaryExpr::LT, llvm::MCBinaryExpr::LTE, llvm::KnownBits::makeConstant(), llvm::MCBinaryExpr::Mod, llvm::MCBinaryExpr::Mul, llvm::KnownBits::mul(), llvm::MCBinaryExpr::NE, llvm::KnownBits::ne(), llvm::MCBinaryExpr::Or, RHS, llvm::KnownBits::sdiv(), llvm::KnownBits::sge(), llvm::KnownBits::sgt(), llvm::MCBinaryExpr::Shl, llvm::KnownBits::shl(), llvm::KnownBits::sle(), llvm::KnownBits::slt(), llvm::KnownBits::srem(), llvm::MCBinaryExpr::Sub, llvm::KnownBits::sub(), and llvm::MCBinaryExpr::Xor.
Referenced by knownBitsMapHelper().
Definition at line 316 of file AMDGPUMCExpr.cpp.
References llvm::BitWidth, llvm::KnownBits::makeConstant(), and llvm::KnownBits::zext().
Referenced by binaryOpKnownBitsMapHelper().
|
static |
Definition at line 510 of file AMDGPUMCExpr.cpp.
References llvm::MCExpr::Binary, binaryOpKnownBitsMapHelper(), llvm::BitWidth, llvm::MCExpr::Constant, llvm::Depth, llvm::MCExpr::getKind(), llvm::MCSymbolRefExpr::getSymbol(), knownBitsMapHelper(), llvm::KnownBits::makeConstant(), Sym, llvm::MCExpr::SymbolRef, llvm::MCExpr::Target, targetOpKnownBitsMapHelper(), llvm::MCExpr::Unary, and unaryOpKnownBitsMapHelper().
Referenced by binaryOpKnownBitsMapHelper(), llvm::AMDGPU::foldAMDGPUMCExpr(), knownBitsMapHelper(), targetOpKnownBitsMapHelper(), and unaryOpKnownBitsMapHelper().
|
static |
Definition at line 87 of file AMDGPUMCExpr.cpp.
References llvm::AMDGPUMCExpr::AGVK_Max, llvm::AMDGPUMCExpr::AGVK_Or, and llvm_unreachable.
|
static |
Definition at line 465 of file AMDGPUMCExpr.cpp.
References llvm::AMDGPUMCExpr::AGVK_AlignTo, llvm::AMDGPUMCExpr::AGVK_ExtraSGPRs, llvm::AMDGPUMCExpr::AGVK_Max, llvm::AMDGPUMCExpr::AGVK_Occupancy, llvm::AMDGPUMCExpr::AGVK_Or, llvm::AMDGPUMCExpr::AGVK_TotalNumVGPRs, llvm::BitWidth, llvm::Depth, llvm::MCExpr::evaluateAsAbsolute(), llvm::AMDGPUMCExpr::getArgs(), llvm::AMDGPUMCExpr::getKind(), llvm::AMDGPUMCExpr::getSubExpr(), knownBitsMapHelper(), llvm::KnownBits::makeConstant(), and llvm::KnownBits::umax().
Referenced by knownBitsMapHelper().
|
static |
Definition at line 566 of file AMDGPUMCExpr.cpp.
References llvm::MCBinaryExpr::Add, llvm::MCBinaryExpr::And, llvm::MCBinaryExpr::AShr, llvm::MCExpr::Binary, llvm::MCExpr::Constant, llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::count(), llvm::MCConstantExpr::create(), llvm::MCUnaryExpr::create(), llvm::MCBinaryExpr::create(), llvm::AMDGPUMCExpr::create(), llvm::AMDGPUMCExpr::getArgs(), llvm::KnownBits::getConstant(), llvm::MCExpr::getKind(), llvm::AMDGPUMCExpr::getKind(), llvm::MCBinaryExpr::getLHS(), llvm::MCExpr::getLoc(), llvm::MCUnaryExpr::getOpcode(), llvm::MCBinaryExpr::getOpcode(), llvm::MCBinaryExpr::getRHS(), llvm::APInt::getSExtValue(), llvm::MCUnaryExpr::getSubExpr(), llvm::KnownBits::isConstant(), isConstant(), LHS, llvm::MCBinaryExpr::LShr, llvm::MCBinaryExpr::Mul, llvm::MCBinaryExpr::Or, llvm::SmallVectorTemplateBase< T, bool >::push_back(), RHS, llvm::MCBinaryExpr::Shl, llvm::MCBinaryExpr::Sub, llvm::MCExpr::Target, tryFoldHelper(), and llvm::MCExpr::Unary.
Referenced by llvm::AMDGPU::foldAMDGPUMCExpr(), and tryFoldHelper().
|
static |
Definition at line 435 of file AMDGPUMCExpr.cpp.
References llvm::AllOnes, llvm::BitWidth, llvm::Depth, llvm::MCUnaryExpr::getOpcode(), llvm::MCUnaryExpr::getSubExpr(), knownBitsMapHelper(), llvm::KnownBits::makeNegative(), llvm::KnownBits::makeNonNegative(), llvm::MCUnaryExpr::Minus, llvm::MCUnaryExpr::Not, and llvm::MCUnaryExpr::Plus.
Referenced by knownBitsMapHelper().