[PATCH] D35479: [CodeGen][mips] Support `long_call/far/near` attributes

Simon Atanasyan via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jul 17 05:28:14 PDT 2017


atanasyan created this revision.
atanasyan added a project: clang.
Herald added subscribers: arichardson, javed.absar.

This patch adds support for the `long_call`, `far`, and `near` attributes for MIPS targets. The `long_call` and `far` attributes are synonyms. All these attributes override `-mlong-calls` / `-mno-long-calls` command line options for particular function.

      

The main non-trivial part is the change in `CodeGenModule::ConstructAttributeList` routine. It is not enough to configure attributes in `MIPSTargetCodeGenInfo::setTargetAttributes` because this method applied to the function definitions only while we need to configure the attributes for function declarations as well.


Repository:
  rL LLVM

https://reviews.llvm.org/D35479

Files:
  include/clang/Basic/Attr.td
  include/clang/Basic/AttrDocs.td
  lib/CodeGen/CGCall.cpp
  lib/CodeGen/TargetInfo.cpp
  lib/Sema/SemaDeclAttr.cpp
  test/CodeGen/long-call-attr.c
  test/Misc/pragma-attribute-supported-attributes-list.test
  test/Sema/attr-long-call.c

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D35479.106852.patch
Type: text/x-patch
Size: 6520 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170717/5dcdeb93/attachment.bin>


More information about the cfe-commits mailing list