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
..
2015-06-19 01:53:21 +00:00
2015-07-30 12:39:33 +00:00
2015-09-09 09:53:20 +00:00
2014-05-09 09:46:21 +00:00
2014-05-09 09:46:21 +00:00
2015-05-19 12:24:52 +00:00
2015-02-27 19:29:02 +00:00
2015-03-13 18:20:45 +00:00
2015-03-13 18:20:45 +00:00
2013-11-19 12:20:17 +00:00
2012-07-02 19:09:46 +00:00
2012-07-02 19:09:46 +00:00
2015-02-27 21:17:42 +00:00
2015-02-27 21:17:42 +00:00
2015-02-27 21:17:42 +00:00
2015-05-08 00:57:22 +00:00
2015-01-26 17:33:46 +00:00
2015-02-27 21:17:42 +00:00
2015-03-13 18:20:45 +00:00
2014-06-12 11:55:58 +00:00
2014-08-08 15:47:17 +00:00
2015-01-26 17:33:46 +00:00
2014-07-14 09:40:29 +00:00
2015-02-27 21:17:42 +00:00
2015-02-27 21:17:42 +00:00
2015-04-02 10:14:54 +00:00
2015-02-27 21:17:42 +00:00
2015-02-27 21:17:42 +00:00
2015-04-16 23:24:18 +00:00
2015-05-20 14:18:59 +00:00
2015-04-16 23:24:18 +00:00
2012-06-21 21:37:54 +00:00
2015-05-20 14:18:59 +00:00
2015-04-16 23:24:18 +00:00
2015-05-08 00:57:22 +00:00
2015-05-08 00:57:22 +00:00
2015-02-27 21:17:42 +00:00
2015-05-20 14:18:59 +00:00
2015-05-20 14:18:59 +00:00
2013-02-23 03:09:56 +00:00
2015-02-27 21:17:42 +00:00
2015-02-27 21:17:42 +00:00
2015-02-27 21:17:42 +00:00
2015-02-27 21:17:42 +00:00
2015-02-27 21:17:42 +00:00
2015-02-27 21:17:42 +00:00
2015-02-27 21:17:42 +00:00
2015-02-27 21:17:42 +00:00
2015-02-27 21:17:42 +00:00
2015-02-27 21:17:42 +00:00
2015-02-27 21:17:42 +00:00
2015-03-13 18:20:45 +00:00
2015-05-08 00:57:22 +00:00
2015-05-08 00:57:22 +00:00
2014-11-07 16:54:21 +00:00
2014-07-14 12:41:31 +00:00
2015-04-16 23:24:18 +00:00
2013-12-07 02:48:29 +00:00
2015-04-16 23:24:18 +00:00
2015-02-27 09:01:39 +00:00
2013-07-14 06:24:09 +00:00
2015-05-08 00:57:22 +00:00
2015-03-13 18:20:45 +00:00
2015-02-27 21:17:42 +00:00
2015-05-08 00:57:22 +00:00
2015-05-08 00:57:22 +00:00
2015-05-08 00:57:22 +00:00
2015-05-08 00:57:22 +00:00
2014-11-07 16:54:21 +00:00
2014-11-07 16:54:21 +00:00
2012-05-12 03:25:16 +00:00
2014-11-07 16:54:21 +00:00
2015-02-27 21:17:42 +00:00
2014-11-07 16:54:21 +00:00
2015-04-13 18:47:19 +00:00
2013-03-18 22:08:16 +00:00
2015-05-14 13:17:56 +00:00
2015-08-04 14:26:35 +00:00
2015-02-27 21:17:42 +00:00
2015-02-27 21:17:42 +00:00
2015-02-27 21:17:42 +00:00
2015-02-27 21:17:42 +00:00
2015-02-27 21:17:42 +00:00
2015-02-27 21:17:42 +00:00
2013-07-14 06:24:09 +00:00
2015-02-27 21:17:42 +00:00
2014-06-12 10:54:16 +00:00
2012-09-28 21:23:16 +00:00
2015-02-27 21:17:42 +00:00
2015-06-02 13:14:46 +00:00
2014-04-14 16:00:28 +00:00
2015-04-16 23:24:18 +00:00
2015-04-16 23:24:18 +00:00
2015-06-17 20:52:32 +00:00
2015-06-17 20:52:32 +00:00
2014-04-14 16:00:28 +00:00
2015-07-30 12:39:33 +00:00
2015-02-27 21:17:42 +00:00
2015-07-28 17:32:49 +00:00
2015-03-13 18:20:45 +00:00
2015-02-27 21:17:42 +00:00
2015-02-27 21:17:42 +00:00
2014-04-09 09:56:43 +00:00
2015-03-13 18:20:45 +00:00
2015-03-02 12:47:32 +00:00
2015-02-26 12:29:48 +00:00
2015-02-26 12:29:48 +00:00
2015-02-27 21:17:42 +00:00
2015-02-25 15:24:37 +00:00
2014-04-09 09:56:43 +00:00
2015-04-22 18:04:12 +00:00
2015-02-27 21:17:42 +00:00
2013-12-15 20:49:30 +00:00
2015-02-27 21:17:42 +00:00
2014-10-16 15:41:51 +00:00
2015-03-13 18:20:45 +00:00
2015-02-27 21:17:42 +00:00
2015-05-20 14:18:59 +00:00
2015-02-27 21:17:42 +00:00
2015-02-27 21:17:42 +00:00
2015-01-26 17:33:46 +00:00
2013-05-16 14:51:26 +00:00
2012-03-29 18:43:11 +00:00
2015-02-27 21:17:42 +00:00
2012-05-12 00:48:43 +00:00
2015-02-27 21:17:42 +00:00
2015-04-16 23:24:18 +00:00
2015-04-16 23:24:18 +00:00
2015-02-27 21:17:42 +00:00
2015-02-27 21:17:42 +00:00
2015-02-27 21:17:42 +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
2013-11-09 02:38:51 +00:00
2011-12-19 20:24:28 +00:00
2014-09-02 13:54:53 +00:00
2015-02-27 21:17:42 +00:00
2015-03-24 15:19:14 +00:00
2015-03-30 13:27:25 +00:00
2015-03-24 11:26:34 +00:00
2015-03-30 13:27:25 +00:00
2015-02-27 21:17:42 +00:00
2014-05-22 11:46:58 +00:00
2014-05-22 11:46:58 +00:00
2012-05-07 05:46:29 +00:00
2014-05-22 11:46:58 +00:00
2014-05-22 11:46:58 +00:00
2014-05-22 11:46:58 +00:00
2014-05-22 11:46:58 +00:00
2015-02-26 12:29:48 +00:00
2014-12-17 10:56:16 +00:00
2015-03-13 18:20:45 +00:00
2015-03-24 15:19:14 +00:00
2015-06-17 20:52:32 +00:00
2014-04-14 16:00:28 +00:00
2015-04-16 23:24:18 +00:00
2015-02-27 21:17:42 +00:00
2015-05-08 00:57:22 +00:00
2015-02-27 19:29:02 +00:00
2015-03-13 18:20:45 +00:00
2013-09-28 00:12:32 +00:00
2015-04-16 23:24:18 +00:00
2015-04-16 23:24:18 +00:00
2015-05-08 00:57:22 +00:00
2015-05-08 00:57:22 +00:00
2015-05-08 00:57:22 +00:00
2015-05-08 00:57:22 +00:00
2015-04-16 23:24:18 +00:00
2015-04-16 23:24:18 +00:00
2014-06-09 22:42:55 +00:00
2015-02-27 21:17:42 +00:00
2015-03-13 18:20:45 +00:00
2015-05-20 14:18:59 +00:00
2015-02-27 21:17:42 +00:00
2014-11-07 16:54:21 +00:00
2014-02-13 14:44:26 +00:00
2015-05-08 00:57:22 +00:00
2015-03-13 18:20:45 +00:00
2015-04-16 23:24:18 +00:00
2015-03-04 15:47:42 +00:00
2015-02-27 21:17:42 +00:00
2015-04-16 23:24:18 +00:00
2014-12-18 16:39:29 +00:00
2014-11-21 22:04:35 +00:00
2015-02-27 21:17:42 +00:00
2015-02-13 17:51:27 +00:00
2015-03-13 18:20:45 +00:00
2015-02-27 21:17:42 +00:00
2014-04-16 11:46:59 +00:00
2015-02-27 21:17:42 +00:00
2015-02-27 21:17:42 +00:00
2014-12-11 13:56:23 +00:00
2015-02-27 21:17:42 +00:00
2015-03-11 20:28:31 +00:00
2015-02-27 21:17:42 +00:00
2015-02-27 21:17:42 +00:00
2015-02-27 21:17:42 +00:00
2015-03-04 15:47:42 +00:00
2015-02-27 21:17:42 +00:00
2015-02-27 21:17:42 +00:00
2014-01-14 18:57:12 +00:00
2014-01-14 18:57:12 +00:00
2014-01-14 18:57:12 +00:00
2014-01-14 18:57:12 +00:00
2014-01-14 18:57:12 +00:00
2014-01-14 18:57:12 +00:00
2015-04-16 23:24:18 +00:00
2014-01-14 18:57:12 +00:00
2014-01-14 18:57:12 +00:00
2015-03-13 18:20:45 +00:00
2014-09-29 21:57:54 +00:00
2014-09-29 21:57:54 +00:00
2015-06-17 20:52:32 +00:00
2015-07-15 08:39:35 +00:00
2015-02-27 21:17:42 +00:00
2015-05-08 00:57:22 +00:00
2015-05-08 00:57:22 +00:00
2015-02-26 12:29:48 +00:00
2015-02-27 21:17:42 +00:00
2015-02-26 12:29:48 +00:00
2015-02-26 12:29:48 +00:00
2015-02-26 12:29:48 +00:00
2015-02-27 21:17:42 +00:00
2014-04-14 16:00:28 +00:00
2015-02-27 21:17:42 +00:00
2015-02-27 21:17:42 +00:00
2014-04-14 16:00:28 +00:00
2014-06-12 10:44:10 +00:00
2015-04-21 10:49:03 +00:00
2015-05-08 00:57:22 +00:00
2015-05-08 00:57:22 +00:00
2015-02-27 21:17:42 +00:00
2015-02-27 21:17:42 +00:00
2015-02-27 21:17:42 +00:00
2015-02-27 21:17:42 +00:00
2015-02-27 21:17:42 +00:00
2015-02-27 21:17:42 +00:00
2015-08-26 23:15:32 +00:00
2015-02-27 21:17:42 +00:00
2015-02-27 21:17:42 +00:00
2015-01-26 17:33:46 +00:00
2015-01-09 17:21:30 +00:00
2015-01-09 17:21:30 +00:00
2015-04-16 23:24:18 +00:00
2015-02-27 21:17:42 +00:00
2014-07-21 10:45:47 +00:00
2015-02-27 21:17:42 +00:00
2015-04-16 23:24:18 +00:00
2014-06-23 19:43:40 +00:00
2014-01-14 18:57:12 +00:00
2015-02-27 21:17:42 +00:00
2015-02-27 21:17:42 +00:00
2014-07-14 12:41:31 +00:00
2014-11-07 16:54:21 +00:00
2015-05-20 14:18:59 +00:00
2014-04-14 16:00:28 +00:00
2015-02-27 21:17:42 +00:00
2015-04-16 23:24:18 +00:00
2014-12-15 19:07:53 +00:00
2015-03-13 18:20:45 +00:00
2015-02-27 21:17:42 +00:00
2015-02-27 21:17:42 +00:00
2015-02-27 21:17:42 +00:00
2015-02-27 21:17:42 +00:00
2015-02-26 12:29:48 +00:00
2015-02-27 21:17:42 +00:00
2013-03-04 22:25:01 +00:00
2015-04-16 23:24:18 +00:00
2013-11-19 12:20:17 +00:00
2015-02-27 21:17:42 +00:00
2015-04-16 23:24:18 +00:00
2015-05-08 00:57:22 +00:00
2015-05-08 00:57:22 +00:00
2015-02-27 21:17:42 +00:00
2014-06-12 13:39:06 +00:00
2015-02-27 21:17:42 +00:00
2015-02-27 21:17:42 +00:00
2015-02-27 21:17:42 +00:00
2015-02-27 21:17:42 +00:00
2015-02-27 21:17:42 +00:00
2015-02-27 21:17:42 +00:00
2015-02-27 21:17:42 +00:00
2015-04-16 23:24:18 +00:00
2015-02-27 21:17:42 +00:00
2015-02-27 21:17:42 +00:00
2015-02-27 21:17:42 +00:00
2015-02-27 21:17:42 +00:00
2013-07-26 18:34:25 +00:00
2015-02-27 21:17:42 +00:00
2015-02-27 21:17:42 +00:00
2015-02-27 21:17:42 +00:00
2015-02-27 21:17:42 +00:00
2015-02-27 21:17:42 +00:00
2015-02-27 21:17:42 +00:00
2015-02-27 21:17:42 +00:00
2015-02-27 21:17:42 +00:00
2015-02-27 21:17:42 +00:00
2015-02-27 21:17:42 +00:00
2015-02-27 21:17:42 +00:00
2015-02-27 21:17:42 +00:00
2015-02-27 21:17:42 +00:00
2015-04-16 23:24:18 +00:00
2012-05-09 00:55:21 +00:00
2015-05-08 00:57:22 +00:00
2014-04-14 16:00:28 +00:00
2015-02-27 21:17:42 +00:00
2015-04-16 23:24:18 +00:00
2015-04-16 23:24:18 +00:00
2015-02-27 21:17:42 +00:00
2015-02-27 21:17:42 +00:00
2015-02-27 19:29:02 +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
2015-04-16 23:24:18 +00:00
2013-11-11 21:49:03 +00:00
2015-02-27 21:17:42 +00:00
2012-06-27 00:40:34 +00:00
2015-01-26 17:33:46 +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
2015-04-16 23:24:18 +00:00
2015-02-27 19:29:02 +00:00
2015-05-08 00:57:22 +00:00
2015-04-16 23:24:18 +00:00
2015-02-27 21:17:42 +00:00
2015-02-27 21:17:42 +00:00
2015-09-11 03:22:04 +00:00
2013-07-14 06:24:09 +00:00
2015-02-27 21:17:42 +00:00
2013-08-22 21:28:54 +00:00
2013-11-19 12:20:17 +00:00
2013-07-26 20:58:55 +00:00
2015-02-27 21:17:42 +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
2015-02-27 21:17:42 +00:00
2015-04-16 23:24:18 +00:00
2015-02-27 21:17:42 +00:00