This is an archive of the discontinued LLVM Phabricator instance.

[X86] Teach Clang about -mfentry flag
ClosedPublic

Authored by niravd on Dec 20 2016, 1:39 PM.

Event Timeline

niravd updated this revision to Diff 82146.Dec 20 2016, 1:39 PM
niravd retitled this revision from to [X86] Teach Clang about -mfentry flag.
niravd updated this object.
niravd added reviewers: hfinkel, craig.topper.
niravd added a subscriber: llvm-commits.
mcrosier added inline comments.
include/clang/Driver/Options.td
1731

Should this not be in the m_x86_Features_Group since this is an x86 specific flag?

test/CodeGen/fentry.c
1

I want to say this test should be in test/Frontend directory since you're testing a new CC1 option.

11

I'd prefer we stick with the default CHECK and CHECK-NOT prefixes.

mcrosier added inline comments.Jan 4 2017, 8:38 AM
test/CodeGen/fentry.c
11

Specifically, for the first two RUN commands please use CHECK and for the latter two use something like NOPG-NOT.

niravd updated this revision to Diff 83850.Jan 10 2017, 12:27 PM
niravd marked 2 inline comments as done.

Address comments

niravd added inline comments.Jan 10 2017, 12:28 PM
include/clang/Driver/Options.td
1731

Done. -mfentry should eventually defined for at least aarch64 but until that point we should have the flag match clang's actual capabilities.

test/CodeGen/fentry.c
1

That seems reasonable, but I wanted to match with the mcount test.

dberris accepted this revision.Jan 30 2017, 9:29 PM
dberris added a subscriber: dberris.

LGTM

This revision is now accepted and ready to land.Jan 30 2017, 9:29 PM
This revision was automatically updated to reflect the committed changes.