Skip to content
Open
Show file tree
Hide file tree
Changes from 20 commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
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 @@ -380,7 +380,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