Page MenuHomePhabricator

[Utils] Check function attributes in update_test_checks
ClosedPublic

Authored by sstefan1 on Jul 11 2020, 12:58 PM.

Details

Summary

This introduces new flag to the update_test_checks that allows for
function attributes to be checked in a check-line. If the flag is not,
the behavior should remain the same.

Diff Detail

Event Timeline

sstefan1 created this revision.Jul 11 2020, 12:58 PM
Herald added a project: Restricted Project. · View Herald TranscriptJul 11 2020, 12:58 PM
sstefan1 updated this revision to Diff 277263.Jul 11 2020, 2:51 PM

remove unnecessary flag, fix update_cc_test_checks

We need tests for this. There are lit tests for these tools now :)

sstefan1 updated this revision to Diff 278295.Jul 15 2020, 1:36 PM

add a test

jdoerfert accepted this revision.Jul 17 2020, 6:16 PM

This is great, thanks! We'll have to update all the Attributor tests now :D

LGTM, one minor request below.

llvm/utils/UpdateTestChecks/common.py
394

Nit: Maybe add the ; too.

llvm/utils/update_test_checks.py
56

Can we add this to the _cc_test script too (with test). Seems useful when you come from C as well.

This revision is now accepted and ready to land.Jul 17 2020, 6:16 PM
sstefan1 marked an inline comment as done.Jul 19 2020, 3:48 AM
sstefan1 added a subscriber: lebedev.ri.
sstefan1 added inline comments.
llvm/utils/update_test_checks.py
56

Sure. One concern though. I think this would require running the test with at least -O1 and -attributor-enable flags.
I remember @lebedev.ri having concerns about this. Should I go ahead with that?

lebedev.ri added inline comments.Jul 19 2020, 4:11 AM
llvm/utils/update_test_checks.py
56

Why would that test require attributor?
Just check that some attribute isn't dropped at -O0?

sstefan1 marked an inline comment as done.Jul 19 2020, 4:21 AM
sstefan1 added inline comments.
llvm/utils/update_test_checks.py
56

Ok, makes sense. Will do that.

This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptJul 19 2020, 11:22 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript