summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/ABIInfo.h
diff options
context:
space:
mode:
authorAlex Bradbury <asb@lowrisc.org>2018-01-12 20:08:16 +0000
committerAlex Bradbury <asb@lowrisc.org>2018-01-12 20:08:16 +0000
commite41a5e2490d358e47d7fdaebb41a9f82cfeb7def (patch)
tree99e38d5455644b369ead6d9b20256f0849d4f818 /clang/lib/CodeGen/ABIInfo.h
parentfc63551082d47c0c84adf3f9189fe3597171f476 (diff)
downloadbcm5719-llvm-e41a5e2490d358e47d7fdaebb41a9f82cfeb7def.tar.gz
bcm5719-llvm-e41a5e2490d358e47d7fdaebb41a9f82cfeb7def.zip
Refactor handling of signext/zeroext in ABIArgInfo
As @rjmccall suggested in D40023, we can get rid of ABIInfo::shouldSignExtUnsignedType (used to handle cases like the Mips calling convention where 32-bit integers are always sign extended regardless of the sign of the type) by adding a SignExt field to ABIArgInfo. In the common case, this new field is set automatically by ABIArgInfo::getExtend based on the sign of the type. For targets that want greater control, they can use ABIArgInfo::getSignExtend or ABIArgInfo::getZeroExtend when necessary. This change also cleans up logic in CGCall.cpp. There is no functional change intended in this patch, and all tests pass unchanged. As noted in D40023, Mips might want to sign-extend unsigned 32-bit integer return types. A future patch might modify MipsABIInfo::classifyReturnType to use MipsABIInfo::extendType. Differential Revision: https://reviews.llvm.org/D41999 llvm-svn: 322396
Diffstat (limited to 'clang/lib/CodeGen/ABIInfo.h')
-rw-r--r--clang/lib/CodeGen/ABIInfo.h2
1 files changed, 0 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/ABIInfo.h b/clang/lib/CodeGen/ABIInfo.h
index 4cfc3d059d9..fa0461f5d90 100644
--- a/clang/lib/CodeGen/ABIInfo.h
+++ b/clang/lib/CodeGen/ABIInfo.h
@@ -108,8 +108,6 @@ namespace swiftcall {
virtual bool isHomogeneousAggregateSmallEnough(const Type *Base,
uint64_t Members) const;
- virtual bool shouldSignExtUnsignedType(QualType Ty) const;
-
bool isHomogeneousAggregate(QualType Ty, const Type *&Base,
uint64_t &Members) const;
OpenPOWER on IntegriCloud