Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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
- Loading branch information
Showing
4 changed files
with
88 additions
and
65 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.