forked from OSchip/llvm-project
Let LLVMOpLowering specify a PatternBenefit - NFC
Currently the benefit is always set to 1 which limits the ability to do A->B->C lowering PiperOrigin-RevId: 264854146
This commit is contained in:
parent
38d4e0b6a1
commit
fa592908af
|
@ -116,7 +116,7 @@ private:
|
|||
class LLVMOpLowering : public ConversionPattern {
|
||||
public:
|
||||
LLVMOpLowering(StringRef rootOpName, MLIRContext *context,
|
||||
LLVMTypeConverter &lowering);
|
||||
LLVMTypeConverter &lowering, PatternBenefit benefit = 1);
|
||||
|
||||
protected:
|
||||
// Back-reference to the lowering class, used to call type and function
|
||||
|
|
|
@ -193,9 +193,9 @@ static Type getMemRefElementPtrType(MemRefType t, LLVMTypeConverter &lowering) {
|
|||
}
|
||||
|
||||
LLVMOpLowering::LLVMOpLowering(StringRef rootOpName, MLIRContext *context,
|
||||
LLVMTypeConverter &lowering_)
|
||||
: ConversionPattern(rootOpName, /*benefit=*/1, context),
|
||||
lowering(lowering_) {}
|
||||
LLVMTypeConverter &lowering_,
|
||||
PatternBenefit benefit)
|
||||
: ConversionPattern(rootOpName, benefit, context), lowering(lowering_) {}
|
||||
|
||||
namespace {
|
||||
// Base class for Standard to LLVM IR op conversions. Matches the Op type
|
||||
|
|
Loading…
Reference in New Issue