Changeset View
Changeset View
Standalone View
Standalone View
llvm/lib/Target/RISCV/RISCVISelLowering.cpp
Show First 20 Lines • Show All 230 Lines • ▼ Show 20 Lines | RISCVTargetLowering::RISCVTargetLowering(const TargetMachine &TM, | ||||
// Function alignments. | // Function alignments. | ||||
const Align FunctionAlignment(Subtarget.hasStdExtC() ? 2 : 4); | const Align FunctionAlignment(Subtarget.hasStdExtC() ? 2 : 4); | ||||
setMinFunctionAlignment(FunctionAlignment); | setMinFunctionAlignment(FunctionAlignment); | ||||
setPrefFunctionAlignment(FunctionAlignment); | setPrefFunctionAlignment(FunctionAlignment); | ||||
// Effectively disable jump table generation. | // Effectively disable jump table generation. | ||||
setMinimumJumpTableEntries(INT_MAX); | setMinimumJumpTableEntries(INT_MAX); | ||||
// Jumps are expensive, compared to logic | |||||
setJumpIsExpensive(); | |||||
// We can use any register for comparisons | |||||
setHasMultipleConditionRegisters(); | |||||
} | } | ||||
EVT RISCVTargetLowering::getSetCCResultType(const DataLayout &DL, LLVMContext &, | EVT RISCVTargetLowering::getSetCCResultType(const DataLayout &DL, LLVMContext &, | ||||
EVT VT) const { | EVT VT) const { | ||||
if (!VT.isVector()) | if (!VT.isVector()) | ||||
return getPointerTy(DL); | return getPointerTy(DL); | ||||
return VT.changeVectorElementTypeToInteger(); | return VT.changeVectorElementTypeToInteger(); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 2,746 Lines • Show Last 20 Lines |