I've fixed up https://reviews.llvm.org/D9653. Please let me know if you have any further suggestions. Thanks!
Details
Diff Detail
Event Timeline
That's not really my area of expertise, so I only left a few general comments. It seems like you stripped a few trailing whitespaces adding a little bit of noise to the diff. Also, diffs uploaded to Phabricator should contain as much context as possible, to make it easier to see the surrounding code (http://llvm.org/docs/Phabricator.html#requesting-a-review-via-the-web-interface), e.g. using git show HEAD -U999999 > mypatch.patch and llvm-commits should be added as subscriber when creating a review, so the full history of the review gets mirrored on the mailing list.
I think you should also include a test for your change. You could probably extend test/CodeGen/X86/stack-probe-size.ll, by adding an additional RUN line with a triple where stack probes aren't generated at the moment and add probe-stack attributes to some functions.
lib/Target/X86/X86FrameLowering.cpp | ||
---|---|---|
71 ↗ | (On Diff #103158) | unrelated whitespace change? |
657 ↗ | (On Diff #103158) | unrelated whitespace change? |
801 ↗ | (On Diff #103158) | Could this be a const std::string? Actually I think you could also keep the type const char * and use MF.getFunction()->getFnAttribute("probe-stack").getValueAsString().data() in line 803, as you are not using any functions from std::string |
838 ↗ | (On Diff #103158) | Why aren't you using Is64Bit here? I think you should use the same check as in line 804. |
lib/Target/X86/X86FrameLowering.cpp | ||
---|---|---|
801 ↗ | (On Diff #103158) | I did this because StringRef warns that the contents don't have to be null terminated. Is there a guarantee of null termination in this specific instance? |
docs/LangRef.rst | ||
---|---|---|
1478–1480 | What if both have a probe-stack attribute but they disagree? Should we disallow inlining? Should we ignore the callee attribute? |
@pcwalton I assume you do not have commit access? In that case somebody else has to commit the change on your behalf and it would be good to let people know.
What if both have a probe-stack attribute but they disagree? Should we disallow inlining? Should we ignore the callee attribute?