[NFC] Sync code for upstreaming.

Remove redundant code.

Differential Revision: https://reviews.llvm.org/D124310
This commit is contained in:
Eric Schweitz 2022-04-22 13:57:21 -07:00
parent 76b57f49a2
commit de8a65f787
4 changed files with 299 additions and 291 deletions

View File

@ -27,7 +27,6 @@ void buildCmpCOp(mlir::OpBuilder &builder, mlir::OperationState &result,
unsigned getCaseArgumentOffset(llvm::ArrayRef<mlir::Attribute> cases,
unsigned dest);
DoLoopOp getForInductionVarOwner(mlir::Value val);
bool isReferenceLike(mlir::Type type);
mlir::ParseResult isValidCaseAttr(mlir::Attribute attr);
mlir::ParseResult parseCmpcOp(mlir::OpAsmParser &parser,
mlir::OperationState &result);

View File

@ -2559,16 +2559,13 @@ def fir_ConvertOp : fir_OneResultOp<"convert", [NoSideEffect]> {
}
def FortranTypeAttr : Attr<And<[CPred<"$_self.isa<mlir::TypeAttr>()">,
Or<[CPred<"$_self.cast<mlir::TypeAttr>().getValue().isa<fir::CharacterType>()">,
CPred<"$_self.cast<mlir::TypeAttr>().getValue().isa<fir::ComplexType>()">,
CPred<"$_self.cast<mlir::TypeAttr>().getValue().isa<fir::IntegerType>()">,
CPred<"$_self.cast<mlir::TypeAttr>().getValue().isa<fir::LogicalType>()">,
CPred<"$_self.cast<mlir::TypeAttr>().getValue().isa<fir::RealType>()">,
CPred<"$_self.cast<mlir::TypeAttr>().getValue().isa<fir::RecordType>()">]>]>,
Or<[CPred<"$_self.cast<mlir::TypeAttr>().getValue().isa<fir::CharacterType,"
"fir::ComplexType, fir::IntegerType, fir::LogicalType,"
"fir::RealType, fir::RecordType>()">]>]>,
"Fortran surface type"> {
let storageType = [{ ::mlir::TypeAttr }];
let returnType = "mlir::Type";
let convertFromStorage = "$_self.getValue().cast<Type>()";
let convertFromStorage = "$_self.getValue().cast<mlir::Type>()";
}
def fir_GenTypeDescOp : fir_OneResultOp<"gentypedesc", [NoSideEffect]> {

View File

@ -744,7 +744,7 @@ public:
mlir::Location loc = getLoc();
ExtValue var = gen(sym);
if (const fir::UnboxedValue *s = var.getUnboxed())
if (fir::isReferenceLike(s->getType())) {
if (fir::isa_ref_type(s->getType())) {
// A function with multiple entry points returning different types
// tags all result variables with one of the largest types to allow
// them to share the same storage. A reference to a result variable

File diff suppressed because it is too large Load Diff