mirror of
https://github.com/RPCS3/llvm.git
synced 2024-12-25 13:35:10 +00:00
21f77df7b6
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 |
||
---|---|---|
.. | ||
Inputs | ||
2006-12-11-Cast-ConstExpr.ll | ||
2009-06-11-FirstClassAggregateConstant.ll | ||
aggregateInstructions.3.2.ll | ||
aggregateInstructions.3.2.ll.bc | ||
arm32_neon_vcnt_upgrade.ll | ||
atomic.ll | ||
attributes-3.3.ll | ||
attributes-3.3.ll.bc | ||
attributes.ll | ||
binaryFloatInstructions.3.2.ll | ||
binaryFloatInstructions.3.2.ll.bc | ||
binaryIntInstructions.3.2.ll | ||
binaryIntInstructions.3.2.ll.bc | ||
bitwiseInstructions.3.2.ll | ||
bitwiseInstructions.3.2.ll.bc | ||
blockaddress.ll | ||
calling-conventions.3.2.ll | ||
calling-conventions.3.2.ll.bc | ||
case-ranges-3.3.ll | ||
case-ranges-3.3.ll.bc | ||
cmpxchg-upgrade.ll | ||
cmpxchg-upgrade.ll.bc | ||
cmpxchg.3.6.ll | ||
cmpxchg.3.6.ll.bc | ||
compatibility-3.6.ll | ||
compatibility-3.6.ll.bc | ||
compatibility-3.7.ll | ||
compatibility-3.7.ll.bc | ||
compatibility.ll | ||
constantsTest.3.2.ll | ||
constantsTest.3.2.ll.bc | ||
conversionInstructions.3.2.ll | ||
conversionInstructions.3.2.ll.bc | ||
debug-loc-again.ll | ||
DICompileUnit-no-DWOId.ll | ||
DICompileUnit-no-DWOId.ll.bc | ||
DILocalVariable-explicit-tags.ll | ||
DILocalVariable-explicit-tags.ll.bc | ||
DISubprogram-distinct-definitions.ll | ||
DISubprogram-distinct-definitions.ll.bc | ||
drop-debug-info.3.5.ll | ||
drop-debug-info.3.5.ll.bc | ||
extractelement.ll | ||
fcmp-fast.ll | ||
flags.ll | ||
function-encoding-rel-operands.ll | ||
function-local-metadata.3.5.ll | ||
function-local-metadata.3.5.ll.bc | ||
global-variables.3.2.ll | ||
global-variables.3.2.ll.bc | ||
highLevelStructure.3.2.ll | ||
highLevelStructure.3.2.ll.bc | ||
inalloca.ll | ||
invalid.ll | ||
invalid.ll.bc | ||
invalid.test | ||
linkage-types-3.2.ll | ||
linkage-types-3.2.ll.bc | ||
local-linkage-default-visibility.3.4.ll | ||
local-linkage-default-visibility.3.4.ll.bc | ||
mdstring-high-bits.ll | ||
memInstructions.3.2.ll | ||
memInstructions.3.2.ll.bc | ||
metadata-2.ll | ||
metadata.3.5.ll | ||
metadata.3.5.ll.bc | ||
metadata.ll | ||
miscInstructions.3.2.ll | ||
miscInstructions.3.2.ll.bc | ||
null-type.ll | ||
null-type.ll.bc | ||
old-aliases.ll | ||
old-aliases.ll.bc | ||
padding.test | ||
pr18704.ll | ||
pr18704.ll.bc | ||
PR23310.test | ||
ptest-new.ll | ||
ptest-old.ll | ||
select.ll | ||
shuffle.ll | ||
ssse3_palignr.ll | ||
standardCIntrinsic.3.2.ll | ||
standardCIntrinsic.3.2.ll.bc | ||
tailcall.ll | ||
terminatorInstructions.3.2.ll | ||
terminatorInstructions.3.2.ll.bc | ||
upgrade-global-ctors.ll | ||
upgrade-global-ctors.ll.bc | ||
upgrade-loop-metadata.ll | ||
upgrade-loop-metadata.ll.bc | ||
upgrade-tbaa.ll | ||
use-list-order2.ll | ||
use-list-order.ll | ||
variableArgumentIntrinsic.3.2.ll | ||
variableArgumentIntrinsic.3.2.ll.bc | ||
vectorInstructions.3.2.ll | ||
vectorInstructions.3.2.ll.bc | ||
visibility-styles.3.2.ll | ||
visibility-styles.3.2.ll.bc | ||
weak-cmpxchg-upgrade.ll | ||
weak-cmpxchg-upgrade.ll.bc | ||
weak-macho-3.5.ll | ||
weak-macho-3.5.ll.bc |