Page MenuHomePhabricator

Replace func name with regex for update test scripts
ClosedPublic

Authored by ggeorgakoudis on Feb 19 2021, 8:23 PM.

Details

Summary

The patch adds an argument to update test scripts, such as update_cc_test_checks, for replacing a function name matching a regex. This functionality is needed to match generated function signatures that include file hashes. Example:

The function signature for the following function:

__omp_offloading_50_b84c41e__Z9ftemplateIiET_i_l30_worker

with --replace-function-regex "__omp_offloading_[0-9]+_[a-z0-9]+_(.*)" will become:

CHECK-LABEL: @{{__omp_offloading_[0-9]+_[a-z0-9]+__Z9ftemplateIiET_i_l30_worker}}(

Diff Detail

Event Timeline

ggeorgakoudis created this revision.Feb 19 2021, 8:23 PM
ggeorgakoudis requested review of this revision.Feb 19 2021, 8:23 PM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 19 2021, 8:23 PM
ggeorgakoudis edited the summary of this revision. (Show Details)Feb 19 2021, 8:28 PM
ggeorgakoudis added a reviewer: jdoerfert.
ggeorgakoudis edited the summary of this revision. (Show Details)Feb 19 2021, 8:28 PM
ggeorgakoudis edited the summary of this revision. (Show Details)
ggeorgakoudis edited the summary of this revision. (Show Details)

Fix to check regex input exists

Move implementation in common, add tests

Herald added a project: Restricted Project. · View Herald TranscriptMar 6 2021, 1:22 PM
Herald added a subscriber: cfe-commits. · View Herald Transcript

Remove testing print

jdoerfert accepted this revision.Mar 6 2021, 3:34 PM

Cool, almost able to generate offloading tests :) LG

This revision is now accepted and ready to land.Mar 6 2021, 3:34 PM

Fix for multiple capture groups

Fix (another) for multiple capture groups

Change regex to avoid failing windows test

Add triple in test to avoid spurious failures

This revision was landed with ongoing or failed builds.Mar 10 2021, 12:57 PM
This revision was automatically updated to reflect the committed changes.

This breaks check-llvm on linux and mac:
http://45.33.8.238/linux/41398/step_12.txt
http://45.33.8.238/macm1/5291/step_10.txt
http://lab.llvm.org:8011/#/builders/109
(and on my local build too)

Please take a look, and please revert for now if it takes a while to fix.

This breaks check-llvm on linux and mac:
http://45.33.8.238/linux/41398/step_12.txt
http://45.33.8.238/macm1/5291/step_10.txt
http://lab.llvm.org:8011/#/builders/109
(and on my local build too)

Please take a look, and please revert for now if it takes a while to fix.

Reverted, I'm going to test better, fix and re-land.

ggeorgakoudis reopened this revision.Mar 12 2021, 4:39 PM
This revision is now accepted and ready to land.Mar 12 2021, 4:39 PM

NFC change in update_llc_test_checks for compatibility

ggeorgakoudis retitled this revision from Replace func name with regex in update_cc_test_checks to Replace func name with regex for update test scripts.Mar 12 2021, 4:47 PM
ggeorgakoudis edited the summary of this revision. (Show Details)
This revision was landed with ongoing or failed builds.Mar 12 2021, 5:00 PM
This revision was automatically updated to reflect the committed changes.
ggeorgakoudis reopened this revision.Mar 12 2021, 5:29 PM
This revision is now accepted and ready to land.Mar 12 2021, 5:29 PM

Fix for upstreaming

This revision was landed with ongoing or failed builds.Mar 12 2021, 5:37 PM
This revision was automatically updated to reflect the committed changes.
nikic added a subscriber: nikic.Sun, Mar 21, 2:15 PM

Looks like this has broken update_analyze_test_checks.py.