Reland "[GlobalISel][LLT] Introduce FPInfo for LLT (Enable bfloat, ppc128float and others in GlobalISel) (#155107)"#188502
Conversation
…loat, ppc128float and others in GlobalISel) (llvm#155107)" (llvm#188344)" This reverts commit 6a045c2.
…calling non-constexpr integer()/floatingPoint() PR llvm#155107 introduced LLT::integer() and LLT::floatingPoint() which are non-constexpr (they call getUseExtended() which reads a mutable static). Several constexpr member functions now transitively call these, which GCC 7/8 eagerly rejects even if the non-constexpr path is never taken at compile time. GCC 9+ defers this check and accepts the code. Remove constexpr from: getScalarType, changeElementSize, changeVectorElementCount, changeElementCount, divide, multiplyElements, getElementType, changeToInteger, operator==, operator!=. Convert affected static_asserts in LowLevelTypeTest.cpp to runtime EXPECT_EQ checks.
|
@llvm/pr-subscribers-tablegen @llvm/pr-subscribers-backend-aarch64 Author: Alan Li (lialan) ChangesThis is a reland of #155107 along with a fix for old gcc builds. This patch is reverted in #188344 due to compilation failures described in #155107 (comment) The fix to old gcc builds is to remove Patch is 144.96 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/188502.diff 54 Files Affected:
diff --git a/llvm/include/llvm/CodeGen/GlobalISel/IRTranslator.h b/llvm/include/llvm/CodeGen/GlobalISel/IRTranslator.h
index 6d916b76cee55..7815ad686cbaa 100644
--- a/llvm/include/llvm/CodeGen/GlobalISel/IRTranslator.h
+++ b/llvm/include/llvm/CodeGen/GlobalISel/IRTranslator.h
@@ -650,6 +650,8 @@ class IRTranslator : public MachineFunctionPass {
StackProtectorDescriptor SPDescriptor;
+ bool mayTranslateUserTypes(const User &U) const;
+
/// Switch analysis and optimization.
class GISelSwitchLowering : public SwitchCG::SwitchLowering {
public:
diff --git a/llvm/include/llvm/CodeGen/GlobalISel/LegalizerInfo.h b/llvm/include/llvm/CodeGen/GlobalISel/LegalizerInfo.h
index 9afccf86576f2..8d27f85c04b87 100644
--- a/llvm/include/llvm/CodeGen/GlobalISel/LegalizerInfo.h
+++ b/llvm/include/llvm/CodeGen/GlobalISel/LegalizerInfo.h
@@ -402,6 +402,11 @@ LLVM_ABI LegalizeMutation changeElementCountTo(unsigned TypeIdx,
LLVM_ABI LegalizeMutation changeElementSizeTo(unsigned TypeIdx,
unsigned FromTypeIdx);
+/// Change the scalar size or element size to have the same scalar size as the
+/// type \p NewTy. Unlike changeElementTo, this discards pointer types and only
+/// changes the size.
+LLVM_ABI LegalizeMutation changeElementSizeTo(unsigned TypeIdx, LLT NewTy);
+
/// Widen the scalar type or vector element type for the given type index to the
/// next power of 2.
LLVM_ABI LegalizeMutation widenScalarOrEltToNextPow2(unsigned TypeIdx,
@@ -1048,7 +1053,7 @@ class LegalizeRuleSet {
using namespace LegalizeMutations;
return actionIf(LegalizeAction::WidenScalar,
scalarOrEltNarrowerThan(TypeIdx, Ty.getScalarSizeInBits()),
- changeElementTo(typeIdx(TypeIdx), Ty));
+ changeElementSizeTo(typeIdx(TypeIdx), Ty));
}
/// Ensure the scalar or element is at least as wide as Ty.
@@ -1059,7 +1064,7 @@ class LegalizeRuleSet {
return actionIf(LegalizeAction::WidenScalar,
all(Predicate, scalarOrEltNarrowerThan(
TypeIdx, Ty.getScalarSizeInBits())),
- changeElementTo(typeIdx(TypeIdx), Ty));
+ changeElementSizeTo(typeIdx(TypeIdx), Ty));
}
/// Ensure the vector size is at least as wide as VectorSize by promoting the
@@ -1078,7 +1083,8 @@ class LegalizeRuleSet {
const LLT VecTy = Query.Types[TypeIdx];
unsigned NumElts = VecTy.getNumElements();
unsigned MinSize = VectorSize / NumElts;
- LLT NewTy = LLT::fixed_vector(NumElts, LLT::scalar(MinSize));
+ LLT NewTy = LLT::fixed_vector(
+ NumElts, VecTy.getElementType().changeElementSize(MinSize));
return std::make_pair(TypeIdx, NewTy);
});
}
@@ -1089,7 +1095,7 @@ class LegalizeRuleSet {
using namespace LegalizeMutations;
return actionIf(LegalizeAction::WidenScalar,
scalarNarrowerThan(TypeIdx, Ty.getSizeInBits()),
- changeTo(typeIdx(TypeIdx), Ty));
+ changeElementSizeTo(typeIdx(TypeIdx), Ty));
}
LegalizeRuleSet &minScalar(bool Pred, unsigned TypeIdx, const LLT Ty) {
if (!Pred)
@@ -1110,7 +1116,7 @@ class LegalizeRuleSet {
QueryTy.getSizeInBits() < Ty.getSizeInBits() &&
Predicate(Query);
},
- changeTo(typeIdx(TypeIdx), Ty));
+ changeElementSizeTo(typeIdx(TypeIdx), Ty));
}
/// Ensure the scalar is at most as wide as Ty.
@@ -1119,7 +1125,7 @@ class LegalizeRuleSet {
using namespace LegalizeMutations;
return actionIf(LegalizeAction::NarrowScalar,
scalarOrEltWiderThan(TypeIdx, Ty.getScalarSizeInBits()),
- changeElementTo(typeIdx(TypeIdx), Ty));
+ changeElementSizeTo(typeIdx(TypeIdx), Ty));
}
/// Ensure the scalar is at most as wide as Ty.
@@ -1128,7 +1134,7 @@ class LegalizeRuleSet {
using namespace LegalizeMutations;
return actionIf(LegalizeAction::NarrowScalar,
scalarWiderThan(TypeIdx, Ty.getSizeInBits()),
- changeTo(typeIdx(TypeIdx), Ty));
+ changeElementSizeTo(typeIdx(TypeIdx), Ty));
}
/// Conditionally limit the maximum size of the scalar.
@@ -1146,7 +1152,7 @@ class LegalizeRuleSet {
QueryTy.getSizeInBits() > Ty.getSizeInBits() &&
Predicate(Query);
},
- changeElementTo(typeIdx(TypeIdx), Ty));
+ changeElementSizeTo(typeIdx(TypeIdx), Ty));
}
/// Limit the range of scalar sizes to MinTy and MaxTy.
@@ -1211,9 +1217,8 @@ class LegalizeRuleSet {
Predicate(Query);
},
[=](const LegalityQuery &Query) {
- LLT T = Query.Types[LargeTypeIdx];
- if (T.isPointerVector())
- T = T.changeElementType(LLT::scalar(T.getScalarSizeInBits()));
+ LLT T = Query.Types[TypeIdx].changeElementSize(
+ Query.Types[LargeTypeIdx].getScalarSizeInBits());
return std::make_pair(TypeIdx, T);
});
}
diff --git a/llvm/include/llvm/CodeGen/LowLevelTypeUtils.h b/llvm/include/llvm/CodeGen/LowLevelTypeUtils.h
index 51a298eb8b247..f0c1758a4c9cc 100644
--- a/llvm/include/llvm/CodeGen/LowLevelTypeUtils.h
+++ b/llvm/include/llvm/CodeGen/LowLevelTypeUtils.h
@@ -41,6 +41,6 @@ LLVM_ABI LLT getLLTForMVT(MVT Ty);
/// 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
diff --git a/llvm/include/llvm/CodeGen/TargetLowering.h b/llvm/include/llvm/CodeGen/TargetLowering.h
index 51c00b2591ecf..a3583013de52d 100644
--- a/llvm/include/llvm/CodeGen/TargetLowering.h
+++ b/llvm/include/llvm/CodeGen/TargetLowering.h
@@ -443,7 +443,7 @@ class LLVM_ABI TargetLoweringBase {
/// G_INSERT_VECTOR_ELT, G_EXTRACT_VECTOR_ELT,
/// G_INSERT_SUBVECTOR, and G_EXTRACT_SUBVECTOR
LLT getVectorIdxLLT(const DataLayout &DL) const {
- return LLT::scalar(getVectorIdxWidth(DL));
+ return LLT::integer(getVectorIdxWidth(DL));
}
/// Returns the type to be used for the EVL/AVL operand of VP nodes:
diff --git a/llvm/include/llvm/CodeGenTypes/LowLevelType.h b/llvm/include/llvm/CodeGenTypes/LowLevelType.h
index 92def9209d47a..9c50d356f7d6e 100644
--- a/llvm/include/llvm/CodeGenTypes/LowLevelType.h
+++ b/llvm/include/llvm/CodeGenTypes/LowLevelType.h
@@ -9,27 +9,32 @@
/// Implement a low-level type suitable for MachineInstr level instruction
/// selection.
///
-/// For a type attached to a MachineInstr, we only care about 2 details: total
-/// size and the number of vector lanes (if any). Accordingly, there are 4
-/// possible valid type-kinds:
+/// For a type attached to a MachineInstr, we care about total
+/// size, the number of vector lanes (if any)
+/// and the kind of the type (anyscalar, integer, float and etc).
+/// Floating point are filled with APFloat::Semantics to make them
+/// distinguishable.
///
-/// * `sN` for scalars and aggregates
-/// * `<N x sM>` for vectors, which must have at least 2 elements.
-/// * `pN` for pointers
+/// Earlier other information required for correct selection was expected to be
+/// carried only by the opcode, or non-type flags. For example the distinction
+/// between G_ADD and G_FADD for int/float or fast-math flags.
///
-/// Other information required for correct selection is expected to be carried
-/// by the opcode, or non-type flags. For example the distinction between G_ADD
-/// and G_FADD for int/float or fast-math flags.
+/// Now we also able to rely on the kind of the type.
+/// This may be useful to distinguish different types of the same size used at
+/// the same opcode, for example, G_FADD with half vs G_FADD with bfloat16.
///
//===----------------------------------------------------------------------===//
#ifndef LLVM_CODEGEN_LOWLEVELTYPE_H
#define LLVM_CODEGEN_LOWLEVELTYPE_H
+#include "llvm/ADT/APFloat.h"
#include "llvm/ADT/DenseMapInfo.h"
+#include "llvm/ADT/bit.h"
#include "llvm/CodeGenTypes/MachineValueType.h"
#include "llvm/Support/Compiler.h"
#include "llvm/Support/Debug.h"
+#include "llvm/Support/ErrorHandling.h"
#include <cassert>
namespace llvm {
@@ -39,68 +44,166 @@ class raw_ostream;
class LLT {
public:
+ using FpSemantics = APFloat::Semantics;
+
+ enum class Kind : uint8_t {
+ INVALID,
+ ANY_SCALAR,
+ INTEGER,
+ FLOAT,
+ POINTER,
+ VECTOR_ANY,
+ VECTOR_INTEGER,
+ VECTOR_FLOAT,
+ VECTOR_POINTER,
+ };
+
+ constexpr static Kind toVector(Kind Ty) {
+ if (Ty == Kind::POINTER)
+ return Kind::VECTOR_POINTER;
+
+ if (Ty == Kind::INTEGER)
+ return Kind::VECTOR_INTEGER;
+
+ if (Ty == Kind::FLOAT)
+ return Kind::VECTOR_FLOAT;
+
+ return Kind::VECTOR_ANY;
+ }
+
+ constexpr static Kind toScalar(Kind Ty) {
+ if (Ty == Kind::VECTOR_POINTER)
+ return Kind::POINTER;
+
+ if (Ty == Kind::VECTOR_INTEGER)
+ return Kind::INTEGER;
+
+ if (Ty == Kind::VECTOR_FLOAT)
+ return Kind::FLOAT;
+
+ return Kind::ANY_SCALAR;
+ }
+
/// Get a low-level scalar or aggregate "bag of bits".
static constexpr LLT scalar(unsigned SizeInBits) {
- return LLT{/*isPointer=*/false, /*isVector=*/false, /*isScalar=*/true,
- ElementCount::getFixed(0), SizeInBits,
- /*AddressSpace=*/0};
+ return LLT{Kind::ANY_SCALAR, ElementCount::getFixed(0), SizeInBits};
+ }
+
+ static LLT integer(unsigned SizeInBits) {
+ if (!getUseExtended())
+ return LLT::scalar(SizeInBits);
+
+ return LLT{Kind::INTEGER, ElementCount::getFixed(0), SizeInBits};
+ }
+
+ static LLT floatingPoint(const FpSemantics &Sem) {
+ if (!getUseExtended())
+ return LLT::scalar(
+ APFloat::getSizeInBits(APFloatBase::EnumToSemantics(Sem)));
+
+ return LLT{Kind::FLOAT, ElementCount::getFixed(0),
+ APFloat::getSizeInBits(APFloatBase::EnumToSemantics(Sem)), Sem};
}
/// Get a low-level token; just a scalar with zero bits (or no size).
static constexpr LLT token() {
- return LLT{/*isPointer=*/false, /*isVector=*/false,
- /*isScalar=*/true, ElementCount::getFixed(0),
- /*SizeInBits=*/0,
- /*AddressSpace=*/0};
+ return LLT{Kind::ANY_SCALAR, ElementCount::getFixed(0),
+ /*SizeInBits=*/0};
}
/// Get a low-level pointer in the given address space.
static constexpr LLT pointer(unsigned AddressSpace, unsigned SizeInBits) {
assert(SizeInBits > 0 && "invalid pointer size");
- return LLT{/*isPointer=*/true, /*isVector=*/false, /*isScalar=*/false,
- ElementCount::getFixed(0), SizeInBits, AddressSpace};
+ return LLT{Kind::POINTER, ElementCount::getFixed(0), SizeInBits,
+ AddressSpace};
}
/// Get a low-level vector of some number of elements and element width.
static constexpr LLT vector(ElementCount EC, unsigned ScalarSizeInBits) {
assert(!EC.isScalar() && "invalid number of vector elements");
- return LLT{/*isPointer=*/false, /*isVector=*/true, /*isScalar=*/false,
- EC, ScalarSizeInBits, /*AddressSpace=*/0};
+ return LLT{Kind::VECTOR_ANY, EC, ScalarSizeInBits};
}
/// Get a low-level vector of some number of elements and element type.
static constexpr LLT vector(ElementCount EC, LLT ScalarTy) {
assert(!EC.isScalar() && "invalid number of vector elements");
assert(!ScalarTy.isVector() && "invalid vector element type");
- return LLT{ScalarTy.isPointer(),
- /*isVector=*/true,
- /*isScalar=*/false,
- EC,
- ScalarTy.getSizeInBits().getFixedValue(),
- ScalarTy.isPointer() ? ScalarTy.getAddressSpace() : 0};
+
+ Kind Info = toVector(ScalarTy.Info);
+ if (ScalarTy.isPointer())
+ return LLT{Info, EC, ScalarTy.getSizeInBits().getFixedValue(),
+ ScalarTy.getAddressSpace()};
+ if (ScalarTy.isFloat())
+ return LLT{Info, EC, ScalarTy.getSizeInBits().getFixedValue(),
+ ScalarTy.getFpSemantics()};
+
+ return LLT{Info, EC, ScalarTy.getSizeInBits().getFixedValue()};
+ }
+
+ // FIXME: Remove this builder
+ static LLT floatIEEE(unsigned SizeInBits) {
+ if (!getUseExtended())
+ return LLT::scalar(SizeInBits);
+
+ switch (SizeInBits) {
+ default:
+ llvm_unreachable("Wrong SizeInBits for IEEE Floating point!");
+ case 16:
+ return float16();
+ case 32:
+ return float32();
+ case 64:
+ return float64();
+ case 128:
+ return float128();
+ }
}
+ // Get a bfloat16 value.
+ static constexpr LLT bfloat16() {
+ return LLT{Kind::FLOAT, ElementCount::getFixed(0), 16,
+ FpSemantics::S_BFloat};
+ }
/// Get a 16-bit IEEE half value.
- /// TODO: Add IEEE semantics to type - This currently returns a simple `scalar(16)`.
static constexpr LLT float16() {
- return scalar(16);
+ return LLT{Kind::FLOAT, ElementCount::getFixed(0), 16,
+ FpSemantics::S_IEEEhalf};
}
-
/// Get a 32-bit IEEE float value.
static constexpr LLT float32() {
- return scalar(32);
+ return LLT{Kind::FLOAT, ElementCount::getFixed(0), 32,
+ FpSemantics::S_IEEEsingle};
}
-
/// Get a 64-bit IEEE double value.
static constexpr LLT float64() {
- return scalar(64);
+ return LLT{Kind::FLOAT, ElementCount::getFixed(0), 64,
+ FpSemantics::S_IEEEdouble};
+ }
+
+ /// Get a 80-bit X86 floating point value.
+ static constexpr LLT x86fp80() {
+ return LLT{Kind::FLOAT, ElementCount::getFixed(0), 80,
+ FpSemantics::S_x87DoubleExtended};
+ }
+
+ /// Get a 128-bit IEEE quad value.
+ static constexpr LLT float128() {
+ return LLT{Kind::FLOAT, ElementCount::getFixed(0), 128,
+ FpSemantics::S_IEEEquad};
+ }
+
+ /// Get a 128-bit PowerPC double double value.
+ static constexpr LLT ppcf128() {
+ return LLT{Kind::FLOAT, ElementCount::getFixed(0), 128,
+ FpSemantics::S_PPCDoubleDouble};
}
/// Get a low-level fixed-width vector of some number of elements and element
/// width.
static constexpr LLT fixed_vector(unsigned NumElements,
unsigned ScalarSizeInBits) {
- return vector(ElementCount::getFixed(NumElements), ScalarSizeInBits);
+ return vector(ElementCount::getFixed(NumElements),
+ LLT::scalar(ScalarSizeInBits));
}
/// Get a low-level fixed-width vector of some number of elements and element
@@ -113,7 +216,8 @@ class LLT {
/// width.
static constexpr LLT scalable_vector(unsigned MinNumElements,
unsigned ScalarSizeInBits) {
- return vector(ElementCount::getScalable(MinNumElements), ScalarSizeInBits);
+ return vector(ElementCount::getScalable(MinNumElements),
+ LLT::scalar(ScalarSizeInBits));
}
/// Get a low-level scalable vector of some number of elements and element
@@ -132,27 +236,81 @@ class LLT {
return scalarOrVector(EC, LLT::scalar(static_cast<unsigned>(ScalarSize)));
}
- explicit constexpr LLT(bool isPointer, bool isVector, bool isScalar,
- ElementCount EC, uint64_t SizeInBits,
+ explicit constexpr LLT(Kind Info, ElementCount EC, uint64_t SizeInBits)
+ : LLT() {
+ init(Info, EC, SizeInBits);
+ }
+
+ explicit constexpr LLT(Kind Info, ElementCount EC, uint64_t SizeInBits,
unsigned AddressSpace)
: LLT() {
- init(isPointer, isVector, isScalar, EC, SizeInBits, AddressSpace);
+ init(Info, EC, SizeInBits, AddressSpace);
+ }
+
+ explicit constexpr LLT(Kind Info, ElementCount EC, uint64_t SizeInBits,
+ FpSemantics Sem)
+ : LLT() {
+ init(Info, EC, SizeInBits, Sem);
}
- explicit constexpr LLT()
- : IsScalar(false), IsPointer(false), IsVector(false), RawData(0) {}
LLVM_ABI explicit LLT(MVT VT);
+ explicit constexpr LLT() : RawData(0), Info(static_cast<Kind>(0)) {}
- constexpr bool isValid() const { return IsScalar || RawData != 0; }
- constexpr bool isScalar() const { return IsScalar; }
- constexpr bool isToken() const { return IsScalar && RawData == 0; };
- constexpr bool isVector() const { return isValid() && IsVector; }
- constexpr bool isPointer() const {
- return isValid() && IsPointer && !IsVector;
+ constexpr bool isToken() const {
+ return Info == Kind::ANY_SCALAR && RawData == 0;
+ }
+ constexpr bool isValid() const { return isToken() || RawData != 0; }
+ constexpr bool isAnyScalar() const { return Info == Kind::ANY_SCALAR; }
+ constexpr bool isInteger() const { return Info == Kind::INTEGER; }
+ constexpr bool isFloat() const { return Info == Kind::FLOAT; }
+ constexpr bool isPointer() const { return Info == Kind::POINTER; }
+ constexpr bool isAnyVector() const { return Info == Kind::VECTOR_ANY; }
+ constexpr bool isIntegerVector() const {
+ return Info == Kind::VECTOR_INTEGER;
+ }
+ constexpr bool isFloatVector() const { return Info == Kind::VECTOR_FLOAT; }
+ constexpr bool isPointerVector() const {
+ return Info == Kind::VECTOR_POINTER;
}
- constexpr bool isPointerVector() const { return IsPointer && isVector(); }
constexpr bool isPointerOrPointerVector() const {
- return IsPointer && isValid();
+ return isPointer() || isPointerVector();
+ }
+
+ constexpr bool isScalar() const {
+ return Info == Kind::ANY_SCALAR || Info == Kind::INTEGER ||
+ Info == Kind::FLOAT;
+ }
+ constexpr bool isScalar(unsigned Size) const {
+ return isScalar() && getScalarSizeInBits() == Size;
+ }
+ constexpr bool isVector() const {
+ return Info == Kind::VECTOR_ANY || Info == Kind::VECTOR_INTEGER ||
+ Info == Kind::VECTOR_FLOAT || Info == Kind::VECTOR_POINTER;
+ }
+
+ constexpr bool isInteger(unsigned Size) const {
+ return isInteger() && getScalarSizeInBits() == Size;
+ }
+
+ constexpr bool isFloat(unsigned Size) const {
+ return isFloat() && getScalarSizeInBits() == Size;
+ }
+ constexpr bool isFloat(FpSemantics Sem) const {
+ return isFloat() && getFpSemantics() == Sem;
+ }
+ // FIXME: Remove or rework this predicate
+ constexpr bool isFloatIEEE() const {
+ return isFloat(APFloatBase::S_IEEEhalf) ||
+ isFloat(APFloatBase::S_IEEEsingle) ||
+ isFloat(APFloatBase::S_IEEEdouble) ||
+ isFloat(APFloatBase::S_IEEEquad);
+ }
+ constexpr bool isBFloat16() const { return isFloat(FpSemantics::S_BFloat); }
+ constexpr bool isX86FP80() const {
+ return isFloat(FpSemantics::S_x87DoubleExtended);
+ }
+ constexpr bool isPPCF128() const {
+ return isFloat(FpSemantics::S_PPCDoubleDouble);
}
/// Returns the number of elements in a vector LLT. Must only be called on
@@ -177,12 +335,18 @@ class LLT {
/// if the LLT is not a vector type.
constexpr bool isFixedVector() const { return isVector() && !isScalable(); }
+ constexpr bool isFixedVector(unsigned NumElements,
+ unsigned ScalarSize) const {
+ return isFixedVector() && getNumElements() == NumElements &&
+ getScalarSizeInBits() == ScalarSize;
+ }
+
/// Returns true if the LLT is a scalable vector. Returns false otherwise,
/// even if the LLT is not a vector type.
constexpr bool isScalableVector() const { return isVector() && isScalable(); }
constexpr ElementCount getElementCount() const {
- assert(IsVector && "cannot get number of elements on scalar/aggregate");
+ assert(isVector() && "cannot get number of elements on scalar/aggregate");
return ElementCount::get(getFieldValue(VectorElementsFieldInfo),
isScalable());
}
@@ -203,10 +367,18 @@ class LLT {
return {(BaseSize.getKnownMinValue() + 7) / 8, BaseSize.isScalable()};
}
- constexpr LLT getScalarType() const {
+ LLT getScalarType() const {
return isVector() ? getElementType() : *this;
}
+ constexpr FpSemantics getFpSemantics() const {
+ assert((isFloat() || isFloatVector()) &&
+ "cannot get FP info for non float type");
+ return FpSemantics(getFieldValue(FpSemanticFieldInfo));
+ }
+
+ constexpr Kind getKind() const {...
[truncated]
|
|
✅ With the latest revision this PR passed the C/C++ code formatter. |
|
@lialan Thank you for helping with this! |
|
@aengelke This reland is going to give compilation time regression again. |
|
Could you investigate what specifically causes the regression and say to which extent this could be optimized? |
@DenisGZM Maybe you are the better person to answer this question. |
Well, the first obvious guess is that we added checks if extended LLT is available for every new builders and we used them in shared places like IRTranslator or LegalizerHelper instead of constexpr scalar now. I've tried to quickly reproduce regression in some tests, but I got the opposite result, so it still need to be investigated more deeply. I'll try to look into it this weekend. |
|
@joker-eph @aengelke if no objections, i am going to reland this. |
|
I'm not objecting -- I've personally given up on GISel c-t performance anyway. (I still don't like the regression, but whatever.) |
|
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/59/builds/33299 Here is the relevant piece of the build log for the reference |
|
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/114/builds/343 Here is the relevant piece of the build log for the reference |
|
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/20/builds/15716 Here is the relevant piece of the build log for the reference |
…c128float and others in GlobalISel) (llvm#155107)" (llvm#188502) This is a reland of llvm#155107 along with a fix for old gcc builds. This patch is reverted in llvm#188344 due to compilation failures described in llvm#155107 (comment) The fix to old gcc builds is to remove `constexpr` modifiers in the original patch in 0721d8e
This is a reland of #155107 along with a fix for old gcc builds.
This patch is reverted in #188344 due to compilation failures described in #155107 (comment)
The fix to old gcc builds is to remove
constexprmodifiers in the original patch in 0721d8e