[PATCH] D112942: target ABI: improve call parameters extensions handling

Jonas Paulsson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 4 08:21:57 PDT 2022


jonpa updated this revision to Diff 427009.
jonpa added a reviewer: efriedma.
jonpa added a comment.

minor fixing after rebase.

After I committed the proper handling of libcalls emission I have now built SPEC17, the test-suite tests and also bootstrapped LLVM with this patch applied and verified it all without any more errors. So right now those attributes look "green" on SystemZ with the Clang front end and I think it would be useful to continue with this patch. There are two things here of interest:

- verifying argument attributes.

Should this check be moved from the SystemZ backend out into common code and use TLI.getExtAttrForI32Param() to enable selectively? That function is for library calls, but I think they should apply to any call?

- adding a default extension in case of a missing attribute which is better than nothing.

Maybe this should also be moved out in the same way and enabled with some similar hook? I think for SystemZ we will use a sign extension and think that is probably what everyone wants (the most likely to help).


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D112942/new/

https://reviews.llvm.org/D112942

Files:
  clang/include/clang/CodeGen/CGFunctionInfo.h
  clang/lib/CodeGen/CGCall.cpp
  clang/lib/CodeGen/TargetInfo.cpp
  clang/test/CodeGen/SystemZ/systemz-abi-vector.c
  clang/test/CodeGen/SystemZ/systemz-abi.c
  clang/test/CodeGen/SystemZ/systemz-abi.cpp
  llvm/docs/LangRef.rst
  llvm/include/llvm/Bitcode/LLVMBitCodes.h
  llvm/include/llvm/CodeGen/TargetCallingConv.h
  llvm/include/llvm/CodeGen/TargetLowering.h
  llvm/include/llvm/IR/Attributes.td
  llvm/lib/AsmParser/LLLexer.cpp
  llvm/lib/Bitcode/Reader/BitcodeReader.cpp
  llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
  llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
  llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
  llvm/lib/Target/SystemZ/SystemZISelLowering.cpp
  llvm/lib/Transforms/Utils/CodeExtractor.cpp
  llvm/test/CodeGen/SystemZ/and-02.ll
  llvm/test/CodeGen/SystemZ/and-07.ll
  llvm/test/CodeGen/SystemZ/args-01.ll
  llvm/test/CodeGen/SystemZ/args-04.ll
  llvm/test/CodeGen/SystemZ/args-11.ll
  llvm/test/CodeGen/SystemZ/args-12.ll
  llvm/test/CodeGen/SystemZ/args-13.ll
  llvm/test/CodeGen/SystemZ/args-14.ll
  llvm/test/CodeGen/SystemZ/args-15.ll
  llvm/test/CodeGen/SystemZ/args-16.ll
  llvm/test/CodeGen/SystemZ/args-17.ll
  llvm/test/CodeGen/SystemZ/args-18.ll
  llvm/test/CodeGen/SystemZ/args-19.ll
  llvm/test/CodeGen/SystemZ/asm-11.ll
  llvm/test/CodeGen/SystemZ/asm-12.ll
  llvm/test/CodeGen/SystemZ/asm-13.ll
  llvm/test/CodeGen/SystemZ/asm-14.ll
  llvm/test/CodeGen/SystemZ/asm-15.ll
  llvm/test/CodeGen/SystemZ/asm-16.ll
  llvm/test/CodeGen/SystemZ/asm-17.ll
  llvm/test/CodeGen/SystemZ/asm-18.ll
  llvm/test/CodeGen/SystemZ/atomic-load-01.ll
  llvm/test/CodeGen/SystemZ/atomic-load-02.ll
  llvm/test/CodeGen/SystemZ/atomic-load-03.ll
  llvm/test/CodeGen/SystemZ/atomicrmw-add-01.ll
  llvm/test/CodeGen/SystemZ/atomicrmw-add-02.ll
  llvm/test/CodeGen/SystemZ/atomicrmw-add-03.ll
  llvm/test/CodeGen/SystemZ/atomicrmw-add-05.ll
  llvm/test/CodeGen/SystemZ/atomicrmw-and-01.ll
  llvm/test/CodeGen/SystemZ/atomicrmw-and-02.ll
  llvm/test/CodeGen/SystemZ/atomicrmw-and-03.ll
  llvm/test/CodeGen/SystemZ/atomicrmw-and-05.ll
  llvm/test/CodeGen/SystemZ/atomicrmw-minmax-01.ll
  llvm/test/CodeGen/SystemZ/atomicrmw-minmax-02.ll
  llvm/test/CodeGen/SystemZ/atomicrmw-minmax-03.ll
  llvm/test/CodeGen/SystemZ/atomicrmw-nand-01.ll
  llvm/test/CodeGen/SystemZ/atomicrmw-nand-02.ll
  llvm/test/CodeGen/SystemZ/atomicrmw-nand-03.ll
  llvm/test/CodeGen/SystemZ/atomicrmw-or-01.ll
  llvm/test/CodeGen/SystemZ/atomicrmw-or-02.ll
  llvm/test/CodeGen/SystemZ/atomicrmw-or-03.ll
  llvm/test/CodeGen/SystemZ/atomicrmw-or-05.ll
  llvm/test/CodeGen/SystemZ/atomicrmw-sub-01.ll
  llvm/test/CodeGen/SystemZ/atomicrmw-sub-02.ll
  llvm/test/CodeGen/SystemZ/atomicrmw-sub-03.ll
  llvm/test/CodeGen/SystemZ/atomicrmw-sub-05.ll
  llvm/test/CodeGen/SystemZ/atomicrmw-xchg-01.ll
  llvm/test/CodeGen/SystemZ/atomicrmw-xchg-02.ll
  llvm/test/CodeGen/SystemZ/atomicrmw-xchg-03.ll
  llvm/test/CodeGen/SystemZ/atomicrmw-xor-01.ll
  llvm/test/CodeGen/SystemZ/atomicrmw-xor-02.ll
  llvm/test/CodeGen/SystemZ/atomicrmw-xor-03.ll
  llvm/test/CodeGen/SystemZ/atomicrmw-xor-05.ll
  llvm/test/CodeGen/SystemZ/branch-05.ll
  llvm/test/CodeGen/SystemZ/branch-11.ll
  llvm/test/CodeGen/SystemZ/bswap-02.ll
  llvm/test/CodeGen/SystemZ/bswap-06.ll
  llvm/test/CodeGen/SystemZ/call-03.ll
  llvm/test/CodeGen/SystemZ/cmpxchg-01.ll
  llvm/test/CodeGen/SystemZ/cmpxchg-02.ll
  llvm/test/CodeGen/SystemZ/cmpxchg-03.ll
  llvm/test/CodeGen/SystemZ/cmpxchg-04.ll
  llvm/test/CodeGen/SystemZ/cmpxchg-06.ll
  llvm/test/CodeGen/SystemZ/codegenprepare-form-OF-ops.ll
  llvm/test/CodeGen/SystemZ/cond-move-02.ll
  llvm/test/CodeGen/SystemZ/cond-move-06.ll
  llvm/test/CodeGen/SystemZ/ctpop-01.ll
  llvm/test/CodeGen/SystemZ/fp-conv-09.ll
  llvm/test/CodeGen/SystemZ/fp-conv-10.ll
  llvm/test/CodeGen/SystemZ/fp-conv-14.ll
  llvm/test/CodeGen/SystemZ/fp-conv-16.ll
  llvm/test/CodeGen/SystemZ/fp-move-02.ll
  llvm/test/CodeGen/SystemZ/fp-strict-conv-09.ll
  llvm/test/CodeGen/SystemZ/fp-strict-conv-10.ll
  llvm/test/CodeGen/SystemZ/fp-strict-conv-14.ll
  llvm/test/CodeGen/SystemZ/fp-strict-conv-16.ll
  llvm/test/CodeGen/SystemZ/fpc-intrinsics.ll
  llvm/test/CodeGen/SystemZ/htm-intrinsics.ll
  llvm/test/CodeGen/SystemZ/inline-asm-i128.ll
  llvm/test/CodeGen/SystemZ/insert-01.ll
  llvm/test/CodeGen/SystemZ/int-abs-01.ll
  llvm/test/CodeGen/SystemZ/int-add-13.ll
  llvm/test/CodeGen/SystemZ/int-add-14.ll
  llvm/test/CodeGen/SystemZ/int-cmp-36.ll
  llvm/test/CodeGen/SystemZ/int-cmp-38.ll
  llvm/test/CodeGen/SystemZ/int-cmp-44.ll
  llvm/test/CodeGen/SystemZ/int-cmp-45.ll
  llvm/test/CodeGen/SystemZ/int-cmp-57.ll
  llvm/test/CodeGen/SystemZ/int-cmp-61.ll
  llvm/test/CodeGen/SystemZ/int-const-01.ll
  llvm/test/CodeGen/SystemZ/int-conv-01.ll
  llvm/test/CodeGen/SystemZ/int-conv-02.ll
  llvm/test/CodeGen/SystemZ/int-conv-05.ll
  llvm/test/CodeGen/SystemZ/int-conv-06.ll
  llvm/test/CodeGen/SystemZ/int-conv-13.ll
  llvm/test/CodeGen/SystemZ/int-div-01.ll
  llvm/test/CodeGen/SystemZ/int-div-06.ll
  llvm/test/CodeGen/SystemZ/int-move-01.ll
  llvm/test/CodeGen/SystemZ/int-move-02.ll
  llvm/test/CodeGen/SystemZ/int-move-08.ll
  llvm/test/CodeGen/SystemZ/int-move-10.ll
  llvm/test/CodeGen/SystemZ/int-mul-05.ll
  llvm/test/CodeGen/SystemZ/int-mul-11.ll
  llvm/test/CodeGen/SystemZ/int-neg-01.ll
  llvm/test/CodeGen/SystemZ/int-neg-02.ll
  llvm/test/CodeGen/SystemZ/int-sub-08.ll
  llvm/test/CodeGen/SystemZ/int-uadd-06.ll
  llvm/test/CodeGen/SystemZ/int-usub-06.ll
  llvm/test/CodeGen/SystemZ/knownbits-intrinsics-binop.ll
  llvm/test/CodeGen/SystemZ/knownbits.ll
  llvm/test/CodeGen/SystemZ/memcmp-01.ll
  llvm/test/CodeGen/SystemZ/not-01.ll
  llvm/test/CodeGen/SystemZ/or-07.ll
  llvm/test/CodeGen/SystemZ/pr42512.ll
  llvm/test/CodeGen/SystemZ/risbg-01.ll
  llvm/test/CodeGen/SystemZ/risbg-02.ll
  llvm/test/CodeGen/SystemZ/risbg-04.ll
  llvm/test/CodeGen/SystemZ/rot-01.ll
  llvm/test/CodeGen/SystemZ/rot-02.ll
  llvm/test/CodeGen/SystemZ/scalar-ctlz.ll
  llvm/test/CodeGen/SystemZ/selectcc-01.ll
  llvm/test/CodeGen/SystemZ/selectcc-02.ll
  llvm/test/CodeGen/SystemZ/setcc-01.ll
  llvm/test/CodeGen/SystemZ/setcc-02.ll
  llvm/test/CodeGen/SystemZ/sext-zext.ll
  llvm/test/CodeGen/SystemZ/shift-01.ll
  llvm/test/CodeGen/SystemZ/shift-02.ll
  llvm/test/CodeGen/SystemZ/shift-03.ll
  llvm/test/CodeGen/SystemZ/shift-04.ll
  llvm/test/CodeGen/SystemZ/shift-09.ll
  llvm/test/CodeGen/SystemZ/shift-11.ll
  llvm/test/CodeGen/SystemZ/shift-12.ll
  llvm/test/CodeGen/SystemZ/soft-float-args.ll
  llvm/test/CodeGen/SystemZ/stack-clash-dynamic-alloca.ll
  llvm/test/CodeGen/SystemZ/stack-clash-protection.ll
  llvm/test/CodeGen/SystemZ/store_nonbytesized_vecs.ll
  llvm/test/CodeGen/SystemZ/strcmp-01.ll
  llvm/test/CodeGen/SystemZ/strcpy-01.ll
  llvm/test/CodeGen/SystemZ/strcpy-nobuiltin.ll
  llvm/test/CodeGen/SystemZ/swift-return.ll
  llvm/test/CodeGen/SystemZ/swifterror.ll
  llvm/test/CodeGen/SystemZ/tdc-01.ll
  llvm/test/CodeGen/SystemZ/tdc-06.ll
  llvm/test/CodeGen/SystemZ/tdc-07.ll
  llvm/test/CodeGen/SystemZ/trap-01.ll
  llvm/test/CodeGen/SystemZ/trap-02.ll
  llvm/test/CodeGen/SystemZ/trap-03.ll
  llvm/test/CodeGen/SystemZ/unaligned-01.ll
  llvm/test/CodeGen/SystemZ/vec-combine-02.ll
  llvm/test/CodeGen/SystemZ/vec-extract-02.ll
  llvm/test/CodeGen/SystemZ/vec-intrinsics-01.ll
  llvm/test/CodeGen/SystemZ/vec-intrinsics-02.ll
  llvm/test/CodeGen/SystemZ/vec-move-05.ll
  llvm/test/CodeGen/SystemZ/xor-07.ll
  llvm/test/DebugInfo/Generic/missing-abstract-variable.ll
  llvm/test/tools/UpdateTestChecks/update_llc_test_checks/Inputs/systemz_function_name.ll
  llvm/test/tools/UpdateTestChecks/update_llc_test_checks/Inputs/systemz_function_name.ll.expected
  llvm/test/tools/UpdateTestChecks/update_llc_test_checks/Inputs/systemz_generated_funcs.ll
  llvm/test/tools/UpdateTestChecks/update_llc_test_checks/Inputs/systemz_generated_funcs.ll.generated.expected
  llvm/test/tools/UpdateTestChecks/update_llc_test_checks/Inputs/systemz_generated_funcs.ll.nogenerated.expected

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D112942.427009.patch
Type: text/x-patch
Size: 120375 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220504/e26ffe93/attachment.bin>


More information about the llvm-commits mailing list