1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-23 13:02:52 +02:00
llvm-mirror/test/Bitcode
David Blaikie 65b92c4f37 [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

llvm-svn: 247378
2015-09-11 03:22:04 +00:00
..
Inputs Fix testing for end of stream in bitstream reader. 2015-08-03 18:01:50 +00:00
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 [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
atomic.ll
attributes-3.3.ll
attributes-3.3.ll.bc
attributes.ll Currently string attributes on function arguments/return values can be generated using LLVM API. However they are not supported in parser. So, the following scenario will fail: 2015-08-03 14:31:49 +00:00
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 [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
case-ranges-3.3.ll.bc
cmpxchg-upgrade.ll
cmpxchg-upgrade.ll.bc
cmpxchg.3.6.ll [opaque pointer type] Encode the pointee type in the bitcode for 'cmpxchg' 2015-04-28 04:30:29 +00:00
cmpxchg.3.6.ll.bc [opaque pointer type] Encode the pointee type in the bitcode for 'cmpxchg' 2015-04-28 04:30:29 +00:00
compatibility-3.6.ll [opaque pointer type] Add textual IR support for explicit type parameter for global aliases 2015-09-11 03:22:04 +00:00
compatibility-3.6.ll.bc [compatibility.ll] Cover explicitly named comdats. 2015-08-06 22:04:21 +00:00
compatibility-3.7.ll [opaque pointer type] Add textual IR support for explicit type parameter for global aliases 2015-09-11 03:22:04 +00:00
compatibility-3.7.ll.bc [Bitcode] Add compatibility test for llvm 3.7.0 2015-09-08 17:39:21 +00:00
compatibility.ll [opaque pointer type] Add textual IR support for explicit type parameter for global aliases 2015-09-11 03:22:04 +00:00
constantsTest.3.2.ll [opaque pointer type] Add textual IR support for explicit type parameter to getelementptr instruction 2015-02-27 19:29:02 +00:00
constantsTest.3.2.ll.bc
conversionInstructions.3.2.ll
conversionInstructions.3.2.ll.bc
debug-loc-again.ll DI: Require subprogram definitions to be distinct 2015-08-28 20:26:49 +00:00
DICompileUnit-no-DWOId.ll DI: Disallow uniquable DICompileUnits 2015-08-03 17:26:41 +00:00
DICompileUnit-no-DWOId.ll.bc IR / debug info: Add a DWOId field to DICompileUnit, 2015-05-21 20:37:30 +00:00
DILocalVariable-explicit-tags.ll DI: Require subprogram definitions to be distinct 2015-08-28 20:26:49 +00:00
DILocalVariable-explicit-tags.ll.bc DI: Remove DW_TAG_arg_variable and DW_TAG_auto_variable 2015-07-31 18:58:39 +00:00
DISubprogram-distinct-definitions.ll DI: Require subprogram definitions to be distinct 2015-08-28 20:26:49 +00:00
DISubprogram-distinct-definitions.ll.bc DI: Require subprogram definitions to be distinct 2015-08-28 20:26:49 +00:00
drop-debug-info.3.5.ll llvm-dis: Stop crashing when dropping debug info 2015-02-25 01:10:03 +00:00
drop-debug-info.3.5.ll.bc llvm-dis: Stop crashing when dropping debug info 2015-02-25 01:10:03 +00:00
extractelement.ll
fcmp-fast.ll Add support for fast-math flags to the FCmp instruction. 2015-07-10 12:52:00 +00:00
flags.ll
function-encoding-rel-operands.ll [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
function-local-metadata.3.5.ll IR: Make metadata typeless in assembly 2014-12-15 19:07:53 +00:00
function-local-metadata.3.5.ll.bc
global-variables.3.2.ll
global-variables.3.2.ll.bc
highLevelStructure.3.2.ll [opaque pointer type] Add textual IR support for explicit type parameter for global aliases 2015-09-11 03:22:04 +00:00
highLevelStructure.3.2.ll.bc
inalloca.ll
invalid.ll llvm-dis: Stop crashing when dropping debug info 2015-02-25 01:10:03 +00:00
invalid.ll.bc
invalid.test [BitcodeReader] Diagnose type mismatches with aliases 2015-06-03 01:30:13 +00:00
linkage-types-3.2.ll Bring r226038 back. 2015-01-19 15:16:06 +00:00
linkage-types-3.2.ll.bc
local-linkage-default-visibility.3.4.ll [opaque pointer type] Add textual IR support for explicit type parameter for global aliases 2015-09-11 03:22:04 +00:00
local-linkage-default-visibility.3.4.ll.bc
mdstring-high-bits.ll IR: Make metadata typeless in assembly 2014-12-15 19:07:53 +00:00
memInstructions.3.2.ll [opaque pointer type] Add textual IR support for explicit type parameter to gep operator 2015-03-13 18:20:45 +00:00
memInstructions.3.2.ll.bc
metadata-2.ll [opaque pointer type] Add textual IR support for explicit type parameter to gep operator 2015-03-13 18:20:45 +00:00
metadata.3.5.ll IR: Make metadata typeless in assembly 2014-12-15 19:07:53 +00:00
metadata.3.5.ll.bc
metadata.ll IR: Make metadata typeless in assembly 2014-12-15 19:07:53 +00:00
miscInstructions.3.2.ll Move the personality function from LandingPadInst to Function 2015-06-17 20:52:32 +00:00
miscInstructions.3.2.ll.bc
null-type.ll
null-type.ll.bc
old-aliases.ll [opaque pointer type] Add textual IR support for explicit type parameter for global aliases 2015-09-11 03:22:04 +00:00
old-aliases.ll.bc
padding.test Improve handling of end of file in the bitcode reader. 2015-06-16 20:03:39 +00:00
pr18704.ll llvm-dis: Stop crashing when dropping debug info 2015-02-25 01:10:03 +00:00
pr18704.ll.bc
PR23310.test Fix for PR23310: llvm-dis crashes when trying to upgrade an intrinsic. 2015-07-02 16:22:40 +00:00
ptest-new.ll
ptest-old.ll
select.ll [BitcodeReader] Ensure we can read constant vector selects with an i1 condition 2015-08-31 18:00:30 +00:00
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 [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
upgrade-loop-metadata.ll.bc
upgrade-tbaa.ll IR: Make metadata typeless in assembly 2014-12-15 19:07:53 +00:00
use-list-order2.ll [Bitcode] Add xfail test for PR24755 (uselistorder) 2015-09-10 16:02:24 +00:00
use-list-order.ll [opaque pointer type] Add textual IR support for explicit type parameter for global aliases 2015-09-11 03:22:04 +00:00
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 Bitcode: Don't create comdats when autoupgrading macho bitcode 2015-01-20 05:58:07 +00:00
weak-macho-3.5.ll.bc Bitcode: Don't create comdats when autoupgrading macho bitcode 2015-01-20 05:58:07 +00:00