Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
6baa709
add isScalar and isFixedVector
tgymnich Oct 4, 2024
cc16885
changeElementCount
tgymnich Feb 6, 2025
f04aed6
FPInfo: LLT changes
tgymnich Feb 12, 2025
79ba6eb
Return default logic for LLT::scalar. Allow target to enable and disa…
DenisGZM Aug 22, 2025
bc4b0ec
Fix MIR tests
DenisGZM Aug 22, 2025
655b85a
enable bfloat in IRTranslator for targets that support it
DenisGZM Aug 22, 2025
b767e6e
[unittest] Added simple IRTranslator test for bf16
DenisGZM Aug 23, 2025
1e5c984
Merge branch 'main' into llt-fpinfo
DenisGZM Aug 23, 2025
82602b7
fixed names
DenisGZM Aug 23, 2025
6485b50
code style fixes
DenisGZM Aug 23, 2025
7167e6b
Merge branch 'main' into llt-fpinfo
DenisGZM Aug 23, 2025
6815b11
Merge branch 'main' into llt-fpinfo
DenisGZM Aug 24, 2025
2db5fdb
Merge branch 'main' into llt-fpinfo
DenisGZM Aug 26, 2025
7dccd7c
Merge branch 'main' into llt-fpinfo
DenisGZM Aug 27, 2025
58be30f
Merge 'main' into 'llt-fpinfo'
DenisGZM Sep 8, 2025
d8c9da0
style
DenisGZM Sep 8, 2025
7c5f7d2
style
DenisGZM Sep 14, 2025
f29a556
Merge branch 'main' into llt-fpinfo
DenisGZM Sep 14, 2025
e1f805c
Review fixes
DenisGZM Sep 19, 2025
59666ff
Merge branch 'main' into llt-fpinfo
DenisGZM Sep 19, 2025
d37eeb8
typo
DenisGZM Sep 22, 2025
f16cd79
Merge 'main' into llt-fpinfo
DenisGZM Sep 22, 2025
aba146b
Small fix in test
DenisGZM Sep 23, 2025
af86aeb
Merge branch 'main' into llt-fpinfo
DenisGZM Sep 23, 2025
bc600c6
Merge 'main' into llt-fpinfo
DenisGZM Sep 27, 2025
8504936
Merge branch 'main' into llt-fpinfo
DenisGZM Oct 13, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion llvm/include/llvm/CodeGen/Analysis.h
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ inline void ComputeValueVTs(const TargetLowering &TLI, const DataLayout &DL,
/// If Offsets is non-null, it points to a vector to be filled in
/// with the in-memory offsets of each of the individual values.
///
void computeValueLLTs(const DataLayout &DL, Type &Ty,
void computeValueLLTs(const TargetLowering &TLI, const DataLayout &DL, Type &Ty,
SmallVectorImpl<LLT> &ValueTys,
SmallVectorImpl<uint64_t> *Offsets = nullptr,
uint64_t StartingOffset = 0);
Expand Down
2 changes: 2 additions & 0 deletions llvm/include/llvm/CodeGen/GlobalISel/IRTranslator.h
Original file line number Diff line number Diff line change
Expand Up @@ -642,6 +642,8 @@ class IRTranslator : public MachineFunctionPass {

StackProtectorDescriptor SPDescriptor;

bool mayTranslateUserTypes(const User &U) const;

/// Switch analysis and optimization.
class GISelSwitchLowering : public SwitchCG::SwitchLowering {
public:
Expand Down
3 changes: 2 additions & 1 deletion llvm/include/llvm/CodeGen/GlobalISel/LegalizerInfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,8 @@ LLVM_ABI LegalizeMutation changeElementCountTo(unsigned TypeIdx,

/// Keep the same scalar or element type as \p TypeIdx, but take the number of
/// elements from \p Ty.
LLVM_ABI LegalizeMutation changeElementCountTo(unsigned TypeIdx, LLT Ty);
LLVM_ABI LegalizeMutation changeElementCountTo(unsigned TypeIdx,
ElementCount EC);

/// Change the scalar size or element size to have the same scalar size as type
/// index \p FromIndex. Unlike changeElementTo, this discards pointer types and
Expand Down
7 changes: 4 additions & 3 deletions llvm/include/llvm/CodeGen/LowLevelTypeUtils.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ class Type;
struct fltSemantics;

/// Construct a low-level type based on an LLVM type.
LLVM_ABI LLT getLLTForType(Type &Ty, const DataLayout &DL);
LLVM_ABI LLT getLLTForType(Type &Ty, const DataLayout &DL,
bool AllowExtendedLLT = false);

/// Get a rough equivalent of an MVT for a given LLT. MVT can't distinguish
/// pointers, so these will convert to a plain integer.
Expand All @@ -36,11 +37,11 @@ LLVM_ABI EVT getApproximateEVTForLLT(LLT Ty, LLVMContext &Ctx);

/// Get a rough equivalent of an LLT for a given MVT. LLT does not yet support
/// scalarable vector types, and will assert if used.
LLVM_ABI LLT getLLTForMVT(MVT Ty);
LLVM_ABI LLT getLLTForMVT(MVT Ty, bool AllowExtendedLLT = false);

/// Get the appropriate floating point arithmetic semantic based on the bit size
/// of the given scalar LLT.
LLVM_ABI const llvm::fltSemantics &getFltSemanticForLLT(LLT Ty);
}
} // namespace llvm

#endif // LLVM_CODEGEN_LOWLEVELTYPEUTILS_H
7 changes: 7 additions & 0 deletions llvm/include/llvm/CodeGen/TargetLowering.h
Original file line number Diff line number Diff line change
Expand Up @@ -417,6 +417,13 @@ class LLVM_ABI TargetLoweringBase {
/// amounts, returns MVT::i32.
EVT getShiftAmountTy(EVT LHSTy, const DataLayout &DL) const;

/// Returns LLT for given Type, taking into account
/// TargetOptions::EnableGlobalISelExtendedLLT.
LLT getLLTForType(Type &Ty, const DataLayout &DL) const;
/// Returns LLT for given MVT, taking into account
/// TargetOptions::EnableGlobalISelExtendedLLT.
LLT getLLTForMVT(MVT Ty) const;

/// Return the preferred type to use for a shift opcode, given the shifted
/// amount type is \p ShiftValueTy.
LLVM_READONLY
Expand Down
Loading