This revision was automatically updated to reflect the committed changes.
Closed by commit rL308667: [CodeGen][mips] Support `long_call/far/near`
attributes (authored by atanasyan).
Changed prior to commit:
https://reviews.llvm.org/D35479?vs=107461&id=107578#toc
Repository:
rL LLVM
https://
rjmccall accepted this revision.
rjmccall added a comment.
This revision is now accepted and ready to land.
Thanks, that looks great!
Repository:
rL LLVM
https://reviews.llvm.org/D35479
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http
atanasyan updated this revision to Diff 107461.
atanasyan added a comment.
Addressed review comments.
Repository:
rL LLVM
https://reviews.llvm.org/D35479
Files:
include/clang/Basic/Attr.td
include/clang/Basic/AttrDocs.td
lib/CodeGen/CodeGenModule.cpp
lib/CodeGen/CodeGenModule.h
lib
rjmccall added a comment.
Hmm. Could you invert those conditions so that they early-return, just for
consistency? Sorry this is dragging out so long, and thanks for being so
patient.
Comment at: lib/CodeGen/TargetInfo.cpp:2357
+return;
+ X86_32TargetCodeGenInfo::setTar
atanasyan updated this revision to Diff 107446.
atanasyan added a comment.
My bad. I did not read your comment thoroughly.
- Restore `IsForDefinition` checkings in
`WinX86_32TargetCodeGenInfo::setTargetAttributes` and
`WindowsARMTargetCodeGenInfo::setTargetAttributes` methods.
Repository:
r
rjmccall added inline comments.
Comment at: lib/CodeGen/TargetInfo.cpp:2356
+ X86_32TargetCodeGenInfo::setTargetAttributes(D, GV, CGM, IsForDefinition);
addStackProbeSizeTargetAttribute(D, GV, CGM);
No, sorry, I must not have been clear. We still need a ch
rjmccall added inline comments.
Comment at: include/clang/Basic/AttrDocs.td:1336
+if code compiled using ``-mlong-calls`` switch, it forces compiler to use
+the ``jal`` instruction to call the function.
+ }];
sdardis wrote:
> rjmccall wrote:
> > sdardis wrote:
>
sdardis added inline comments.
Comment at: include/clang/Basic/AttrDocs.td:1336
+if code compiled using ``-mlong-calls`` switch, it forces compiler to use
+the ``jal`` instruction to call the function.
+ }];
rjmccall wrote:
> sdardis wrote:
> > rjmccall wrote:
>
atanasyan updated this revision to Diff 107381.
atanasyan added a comment.
- New wording of attributes documentation and comments.
- Remove redundant `if-return` statements.
Repository:
rL LLVM
https://reviews.llvm.org/D35479
Files:
include/clang/Basic/Attr.td
include/clang/Basic/AttrDoc
rjmccall added inline comments.
Comment at: include/clang/Basic/AttrDocs.td:1336
+if code compiled using ``-mlong-calls`` switch, it forces compiler to use
+the ``jal`` instruction to call the function.
+ }];
sdardis wrote:
> rjmccall wrote:
> > I suggest the fo
sdardis added a comment.
Some comments on the documentation.
Comment at: include/clang/Basic/AttrDocs.td:1336
+if code compiled using ``-mlong-calls`` switch, it forces compiler to use
+the ``jal`` instruction to call the function.
+ }];
rjmccall wrote:
> I su
rjmccall added a comment.
A few more minor tweaks.
Comment at: lib/CodeGen/TargetInfo.cpp:2357
+return;
+ X86_32TargetCodeGenInfo::setTargetAttributes(D, GV, CGM, IsForDefinition);
That function has its own early exit, so do the early exit after calling
atanasyan updated this revision to Diff 107281.
atanasyan added a comment.
- Early return from `setTargetAttributes` methods if `IsForDefinition` is not
true in all cases except handling MIPS "call style" attributes.
Repository:
rL LLVM
https://reviews.llvm.org/D35479
Files:
include/clang
rjmccall added inline comments.
Comment at: lib/CodeGen/TargetInfo.cpp:1910
+const Decl *D, llvm::GlobalValue *GV, CodeGen::CodeGenModule &CGM,
+ForDefinition_t IsForDefinition) const {
if (const FunctionDecl *FD = dyn_cast_or_null(D)) {
To preserve ex
atanasyan updated this revision to Diff 107246.
atanasyan added a comment.
- Pass `IsForDefinition` argument to the `setTargetAttributes` method.
Repository:
rL LLVM
https://reviews.llvm.org/D35479
Files:
include/clang/Basic/Attr.td
include/clang/Basic/AttrDocs.td
lib/CodeGen/CodeGenMo
rjmccall added a comment.
One minor revision, but otherwise looks great, thank you.
Comment at: lib/CodeGen/CodeGenModule.cpp:1166
+if (!IsForDefinition)
+ getTargetCodeGenInfo().setTargetAttributes(FD, F, *this);
+ }
I think you should probably pass
atanasyan updated this revision to Diff 107193.
atanasyan added a comment.
Addressed review comment:
- Split MipsLongCall into a couple of attributes MipsLongCall and MipsShortCall.
- Change the documentation wording.
- Keep the attributes handling in the setTargetAttributes.
- Show error in case
rjmccall added inline comments.
Comment at: include/clang/Basic/Attr.td:1191
+def MipsLongCall : InheritableAttr, TargetSpecificAttr {
+ let Spellings = [GCC<"long_call">, GCC<"far">, GCC<"near">];
Because this is used for all three attributes, I think you sho
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 `-ml
19 matches
Mail list logo