David Blaikie
21f77df7b6
[opaque pointer type] Add textual IR support for explicit type parameter for global aliases
update.py:
import fileinput
import sys
import re
alias_match_prefix = r"(.*(?:=|:|^)\s*(?:external |)(?:(?:private|internal|linkonce|linkonce_odr|weak|weak_odr|common|appending|extern_weak|available_externally) )?(?:default |hidden |protected )?(?:dllimport |dllexport )?(?:unnamed_addr |)(?:thread_local(?:\([a-z]*\))? )?alias"
plain = re.compile(alias_match_prefix + r" (.*?))(| addrspace\(\d+\) *)\*($| *(?:%|@|null|undef|blockaddress|addrspacecast|\[\[[a-zA-Z]|\{\{).*$)")
cast = re.compile(alias_match_prefix + r") ((?:bitcast|inttoptr|addrspacecast)\s*\(.* to (.*?)(| addrspace\(\d+\) *)\*\)\s*(?:;.*)?$)")
gep = re.compile(alias_match_prefix + r") ((?:getelementptr)\s*(?:inbounds)?\s*\((?P<type>.*), (?P=type)(?:\s*addrspace\(\d+\)\s*)?\* .*\)\s*(?:;.*)?$)")
def conv(line):
m = re.match(cast, line)
if m:
return m.group(1) + " " + m.group(3) + ", " + m.group(2)
m = re.match(gep, line)
if m:
return m.group(1) + " " + m.group(3) + ", " + m.group(2)
m = re.match(plain, line)
if m:
return m.group(1) + ", " + m.group(2) + m.group(3) + "*" + m.group(4) + "\n"
return line
for line in sys.stdin:
sys.stdout.write(conv(line))
apply.sh:
for name in "$@"
do
python3 `dirname "$0"`/update.py < "$name" > "$name.tmp" && mv "$name.tmp" "$name"
rm -f "$name.tmp"
done
The actual commands:
From llvm/src:
find test/ -name *.ll | xargs ./apply.sh
From llvm/src/tools/clang:
find test/ -name *.mm -o -name *.m -o -name *.cpp -o -name *.c | xargs -I '{}' ../../apply.sh "{}"
From llvm/src/tools/polly:
find test/ -name *.ll | xargs ./apply.sh
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247378 91177308-0d34-0410-b5e6-96231b3b80d8
2015-09-11 03:22:04 +00:00
..
2014-08-19 21:08:27 +00:00
2014-08-19 21:08:27 +00:00
2014-08-19 21:08:27 +00:00
2014-08-19 21:08:27 +00:00
2015-02-27 21:17:42 +00:00
2014-08-19 21:08:27 +00:00
2014-08-19 21:08:27 +00:00
2014-08-19 21:08:27 +00:00
2015-04-16 23:24:18 +00:00
2014-08-19 21:08:27 +00:00
2014-08-19 21:08:27 +00:00
2015-03-13 18:20:45 +00:00
2015-03-13 18:20:45 +00:00
2015-03-13 18:20:45 +00:00
2015-02-27 21:17:42 +00:00
2014-08-19 21:08:27 +00:00
2014-08-19 21:08:27 +00:00
2014-08-19 21:08:27 +00:00
2014-08-19 21:08:27 +00:00
2014-08-19 21:08:27 +00:00
2012-07-02 12:23:19 +00:00
2014-08-19 21:08:27 +00:00
2014-08-19 21:08:27 +00:00
2014-08-19 21:08:27 +00:00
2015-04-16 23:24:18 +00:00
2014-08-19 21:08:27 +00:00
2014-08-19 21:08:27 +00:00
2014-08-19 21:08:27 +00:00
2012-07-02 12:23:19 +00:00
2012-07-02 12:23:19 +00:00
2015-03-13 18:20:45 +00:00
2014-08-19 21:08:27 +00:00
2014-08-19 21:08:27 +00:00
2014-08-19 21:08:27 +00:00
2012-07-02 18:37:59 +00:00
2015-03-13 18:20:45 +00:00
2014-08-19 21:08:27 +00:00
2014-11-06 15:05:51 +00:00
2014-08-19 21:08:27 +00:00
2014-08-19 21:08:27 +00:00
2012-07-02 18:37:59 +00:00
2015-02-27 19:29:02 +00:00
2015-02-27 21:17:42 +00:00
2014-08-19 21:08:27 +00:00
2014-11-06 15:05:51 +00:00
2014-11-06 15:05:51 +00:00
2014-08-19 21:08:27 +00:00
2014-08-19 21:08:27 +00:00
2014-08-19 21:08:27 +00:00
2012-07-02 12:23:19 +00:00
2014-08-19 21:08:27 +00:00
2014-11-06 15:05:51 +00:00
2015-03-13 18:20:45 +00:00
2012-07-02 18:37:59 +00:00
2012-07-02 18:37:59 +00:00
2012-07-02 12:23:19 +00:00
2014-11-06 15:05:51 +00:00
2015-02-27 21:17:42 +00:00
2014-08-19 21:08:27 +00:00
2014-11-06 15:05:51 +00:00
2014-08-19 21:08:27 +00:00
2014-08-19 21:08:27 +00:00
2012-07-02 12:23:19 +00:00
2015-09-11 03:22:04 +00:00
2014-11-06 15:05:51 +00:00
2015-03-13 18:20:45 +00:00
2015-04-16 23:24:18 +00:00
2012-07-02 18:37:59 +00:00
2014-08-19 21:08:27 +00:00
2012-10-09 20:11:19 +00:00
2014-08-19 21:08:27 +00:00
2014-08-19 21:08:27 +00:00
2014-08-19 21:08:27 +00:00
2014-08-19 21:08:27 +00:00
2014-08-19 21:08:27 +00:00
2014-08-19 21:08:27 +00:00
2014-08-19 21:08:27 +00:00
2015-03-13 18:20:45 +00:00
2015-08-28 20:26:49 +00:00
2015-09-11 03:22:04 +00:00
2014-08-19 21:08:27 +00:00
2014-08-19 21:08:27 +00:00
2015-09-11 03:22:04 +00:00
2015-09-11 03:22:04 +00:00
2010-07-28 20:12:04 +00:00
2015-02-27 21:17:42 +00:00
2010-07-28 20:12:04 +00:00
2015-02-27 21:17:42 +00:00
2014-08-19 21:08:27 +00:00
2015-02-16 08:38:03 +00:00
2015-02-16 08:38:03 +00:00
2015-03-13 19:30:44 +00:00
2015-09-11 03:22:04 +00:00
2015-02-27 21:17:42 +00:00
2013-09-07 00:25:48 +00:00
2015-03-13 18:20:45 +00:00
2014-08-19 21:08:27 +00:00
2015-02-23 00:01:32 +00:00
2014-08-19 21:08:27 +00:00
2015-03-13 18:20:45 +00:00
2014-08-19 21:08:27 +00:00
2014-08-19 21:08:27 +00:00
2015-09-11 03:22:04 +00:00
2015-04-29 16:38:44 +00:00
2015-08-03 17:26:41 +00:00
2015-06-02 17:13:25 +00:00
2015-06-02 17:13:25 +00:00
2015-06-02 17:13:25 +00:00
2015-08-28 20:26:49 +00:00
2015-08-28 20:26:49 +00:00
2015-07-31 18:58:39 +00:00
2015-07-31 18:58:39 +00:00
2015-08-28 20:26:49 +00:00
2015-06-29 23:03:47 +00:00
2015-06-02 17:13:25 +00:00
2015-06-02 17:13:25 +00:00
2015-01-08 22:38:29 +00:00
2015-08-28 20:26:49 +00:00
2015-06-02 17:13:25 +00:00
2015-06-02 17:13:25 +00:00
2015-06-02 17:13:25 +00:00
2015-06-02 17:13:25 +00:00
2015-08-28 20:26:49 +00:00
2014-08-19 21:08:27 +00:00
2012-07-02 18:37:59 +00:00
2015-02-16 09:18:13 +00:00
2015-02-27 21:17:42 +00:00
2015-03-13 18:20:45 +00:00
2015-04-29 16:38:44 +00:00
2015-03-09 23:08:44 +00:00
2015-02-27 19:29:02 +00:00
2015-07-09 07:42:48 +00:00
2015-07-09 07:42:48 +00:00
2015-07-09 07:42:48 +00:00
2015-03-13 18:20:45 +00:00
2015-02-27 19:29:02 +00:00
2015-06-04 07:21:42 +00:00
2014-01-13 22:37:35 +00:00
2015-09-03 18:06:44 +00:00
2015-02-16 08:41:08 +00:00
2015-02-27 21:17:42 +00:00
2015-02-27 21:17:42 +00:00
2014-08-19 21:08:27 +00:00
2014-08-19 21:08:27 +00:00
2014-12-15 19:07:53 +00:00
2015-09-03 22:27:42 +00:00
2014-09-05 22:30:32 +00:00
2015-02-27 21:17:42 +00:00
2012-07-02 18:37:59 +00:00
2015-02-23 07:13:52 +00:00
2015-02-11 07:43:58 +00:00
2015-09-11 03:22:04 +00:00
2014-05-07 22:57:20 +00:00
2014-05-07 22:57:20 +00:00
2015-09-11 03:22:04 +00:00
2014-05-07 22:57:20 +00:00
2014-05-07 22:57:20 +00:00
2012-07-02 18:37:59 +00:00
2014-01-22 19:21:33 +00:00
2015-02-16 09:37:35 +00:00
2012-07-02 18:37:59 +00:00
2015-09-11 03:22:04 +00:00
2014-12-09 18:33:57 +00:00
2014-06-27 18:19:56 +00:00
2015-01-06 22:55:16 +00:00
2014-12-10 01:17:08 +00:00
2014-12-10 01:17:08 +00:00
2014-12-10 01:17:08 +00:00
2014-12-10 01:17:08 +00:00
2014-12-10 01:17:08 +00:00
2014-12-10 01:38:28 +00:00
2014-12-10 01:38:28 +00:00
2014-12-10 01:38:28 +00:00
2014-12-10 01:38:28 +00:00
2014-12-10 02:36:41 +00:00
2014-12-10 02:36:41 +00:00
2014-12-10 02:36:41 +00:00
2014-12-10 02:36:41 +00:00
2015-02-11 09:13:09 +00:00
2015-02-16 05:41:53 +00:00
2015-02-16 05:41:53 +00:00
2015-02-16 05:41:53 +00:00
2015-02-16 05:41:55 +00:00
2015-03-02 06:00:02 +00:00
2015-03-02 06:33:51 +00:00
2015-03-02 06:33:51 +00:00
2015-03-02 09:34:59 +00:00
2015-03-02 09:35:03 +00:00
2015-03-02 09:35:03 +00:00
2015-02-16 06:04:53 +00:00
2015-08-03 17:26:41 +00:00
2015-08-03 17:26:41 +00:00
2015-08-03 17:26:41 +00:00
2015-08-03 17:26:41 +00:00
2015-08-03 17:26:41 +00:00
2015-06-02 17:13:25 +00:00
2015-06-02 17:13:25 +00:00
2015-06-02 17:13:25 +00:00
2015-06-02 17:13:25 +00:00
2015-06-02 17:13:25 +00:00
2015-06-02 17:13:25 +00:00
2015-06-02 17:13:25 +00:00
2015-06-02 17:13:25 +00:00
2015-06-02 17:13:25 +00:00
2015-06-02 17:13:25 +00:00
2015-06-02 17:13:25 +00:00
2015-06-02 17:13:25 +00:00
2015-06-02 17:13:25 +00:00
2015-06-02 17:13:25 +00:00
2015-06-02 17:13:25 +00:00
2015-06-02 17:13:25 +00:00
2015-06-02 17:13:25 +00:00
2015-06-02 17:13:25 +00:00
2015-07-31 18:58:39 +00:00
2015-07-31 18:58:39 +00:00
2015-07-31 18:58:39 +00:00
2015-06-02 17:13:25 +00:00
2015-06-02 17:13:25 +00:00
2015-06-02 17:13:25 +00:00
2015-06-02 17:13:25 +00:00
2015-06-02 17:13:25 +00:00
2015-06-02 17:13:25 +00:00
2015-06-02 17:13:25 +00:00
2015-06-02 17:13:25 +00:00
2015-06-02 17:13:25 +00:00
2015-08-28 20:26:49 +00:00
2015-06-02 17:13:25 +00:00
2015-06-02 17:13:25 +00:00
2015-06-02 17:13:25 +00:00
2015-06-02 17:13:25 +00:00
2015-06-02 17:13:25 +00:00
2015-06-02 17:13:25 +00:00
2015-06-02 17:13:25 +00:00
2015-06-02 17:13:25 +00:00
2015-08-31 21:36:14 +00:00
2012-10-11 00:38:25 +00:00
2015-09-11 03:22:04 +00:00
2015-04-29 16:38:44 +00:00
2015-04-29 16:38:44 +00:00
2015-04-29 16:38:44 +00:00
2015-04-29 16:38:44 +00:00
2015-02-27 19:29:02 +00:00
2015-02-27 19:29:02 +00:00
2014-12-09 23:51:14 +00:00
2015-09-03 15:41:38 +00:00
2015-03-02 05:25:09 +00:00
2015-06-17 20:52:32 +00:00
2015-02-27 21:17:42 +00:00
2015-02-27 21:17:42 +00:00
2015-01-22 21:36:45 +00:00
2014-12-15 19:07:53 +00:00
2014-12-15 19:07:53 +00:00
2014-12-15 19:07:53 +00:00
2014-12-11 01:34:46 +00:00
2014-12-15 19:07:53 +00:00
2014-12-15 19:07:53 +00:00
2014-12-15 19:07:53 +00:00
2014-12-15 19:07:53 +00:00
2014-12-10 02:10:35 +00:00
2014-12-10 00:43:17 +00:00
2015-09-03 09:09:43 +00:00
2015-06-15 22:16:51 +00:00
2015-06-15 22:16:51 +00:00
2015-01-13 21:10:44 +00:00
2015-09-03 16:18:32 +00:00
2014-08-19 21:30:15 +00:00
2014-08-19 21:30:15 +00:00
2014-08-19 21:30:15 +00:00
2014-08-19 21:30:15 +00:00
2014-08-19 21:30:15 +00:00
2014-08-19 21:30:15 +00:00
2014-08-19 21:30:15 +00:00
2014-08-19 21:30:15 +00:00
2014-08-19 21:30:15 +00:00
2014-08-19 21:30:15 +00:00
2015-09-11 03:22:04 +00:00
2014-08-19 21:30:15 +00:00
2015-09-11 03:22:04 +00:00
2015-09-11 03:22:04 +00:00
2015-09-11 03:22:04 +00:00
2015-09-11 03:22:04 +00:00
2015-09-11 03:22:04 +00:00
2014-08-19 21:30:15 +00:00
2015-01-14 18:25:45 +00:00
2015-03-15 00:45:51 +00:00
2015-04-29 16:38:44 +00:00
2015-08-28 20:26:49 +00:00
2014-08-19 21:08:27 +00:00
2015-04-16 23:24:18 +00:00
2015-04-16 23:24:18 +00:00
2015-04-16 23:24:18 +00:00
2014-12-15 19:07:53 +00:00
2015-02-27 21:17:42 +00:00
2015-09-11 03:22:04 +00:00
2014-05-07 22:57:20 +00:00
2014-05-07 22:57:20 +00:00
2015-09-11 03:22:04 +00:00
2014-05-07 22:57:20 +00:00
2014-05-07 22:57:20 +00:00
2014-08-19 21:08:27 +00:00
2014-12-09 19:10:03 +00:00
2014-08-19 21:08:27 +00:00
2015-08-14 05:09:07 +00:00
2014-08-19 21:08:27 +00:00
2015-09-11 03:22:04 +00:00
2015-01-06 22:55:16 +00:00
2015-02-27 21:17:42 +00:00
2015-03-10 06:34:57 +00:00
2015-02-27 21:17:42 +00:00
2015-03-13 18:20:45 +00:00
2015-09-11 03:22:04 +00:00
2014-08-19 21:08:27 +00:00
2014-08-19 21:08:27 +00:00
2014-08-19 21:08:27 +00:00
2014-08-19 21:08:27 +00:00
2014-08-19 21:08:27 +00:00