This is an archive of the discontinued LLVM Phabricator instance.

Add functions in ctype.h to builtin function database (Fix)
ClosedPublic

Authored by twoh on Apr 13 2016, 8:57 AM.

Details

Summary

Add functions declared in ctype.h to builtin function database. All functions are annotated with nothrow and const attribute, which enables better optimization.

This patch has been accepted and committed in r266199(http://reviews.llvm.org/D18970, http://reviews.llvm.org/rL266199), but reverted because newly added test caused build bot failures(http://reviews.llvm.org/rL266201). I fixed the test and resubmit patch here.

Diff Detail

Event Timeline

twoh updated this revision to Diff 53573.Apr 13 2016, 8:57 AM
twoh retitled this revision from to Add functions in ctype.h to builtin function database (Fix).
twoh updated this object.
twoh added a reviewer: aaron.ballman.
twoh added subscribers: joerg, cfe-commits, rsmith.
aaron.ballman edited edge metadata.Apr 14 2016, 9:13 AM

This looks reasonable to me, but I am curious what @joerg thinks of this approach.

rsmith accepted this revision.Apr 15 2016, 3:16 PM
rsmith added a reviewer: rsmith.

LGTM too, but please wait for @joerg's review as e had concerns about the previous revision.

This revision is now accepted and ready to land.Apr 15 2016, 3:16 PM
twoh added a comment.Apr 22 2016, 7:50 AM

Ping. @joerg, could you please take a look?

joerg added a comment.Apr 27 2016, 1:13 PM

Looking again at the failure mode, I think the best approach is to go back to the original test case and just select a fixed target. The problematic IR difference is purely an ABI choice of the target and not even related to -fsigned-char vs -funsigned-char. As such, the extensive use of regular expressions just makes the test case harder to read and maintain.

twoh updated this revision to Diff 55377.Apr 27 2016, 10:59 PM
twoh edited edge metadata.

Addressing comments from @joerg. Two versions of the test provided, one for an architecture with signed char(x86_64) and the other for an architecture with unsigned char(powerpc64).

joerg accepted this revision.Apr 28 2016, 9:41 AM
joerg added a reviewer: joerg.
twoh added a comment.May 3 2016, 8:44 AM

Ping. Can someone please commit this patch for me? Thanks!

In D19062#419999, @twoh wrote:

Ping. Can someone please commit this patch for me? Thanks!

Can you rebase the diff on ToT and update the review with the new patch? When I try to apply, I get merge conflicts. Thanks!

twoh updated this revision to Diff 56198.May 4 2016, 1:26 PM
twoh edited edge metadata.

Rebased on ToT. Thanks @aaron.ballman!

aaron.ballman closed this revision.May 4 2016, 2:14 PM

I have commit in r268553