Old fork of llvm-mirror, used on older RPCS3 builds
Go to file
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
autoconf Add an exposed variable for which c++ compiler we're using for our 2015-08-17 22:46:26 +00:00
bindings [bindings] Update Go bindings to DIBuilder 2015-09-06 02:22:15 +00:00
cmake [CMake] s/LLVM_SOURCE_DIR/LLVM_MAIN_SRC_DIR/ 2015-09-10 17:55:02 +00:00
docs [docs][PerformanceTips] Add text on allocas and alignment 2015-09-10 17:03:10 +00:00
examples [PM/AA] Rebuild LLVM's alias analysis infrastructure in a way compatible 2015-09-09 17:55:00 +00:00
include [modules] Move ConvertUTF.h to a separate submodule that doesn't require C++. 2015-09-11 03:14:00 +00:00
lib [opaque pointer type] Add textual IR support for explicit type parameter for global aliases 2015-09-11 03:22:04 +00:00
projects
resources
test [opaque pointer type] Add textual IR support for explicit type parameter for global aliases 2015-09-11 03:22:04 +00:00
tools [CMake] Add lto subdirectory explicitly. 2015-09-10 18:22:33 +00:00
unittests Pass BranchProbability/BlockMass by value instead of const& as they are small. NFC. 2015-09-10 23:10:42 +00:00
utils Re-commit r247216: "Fix Clang-tidy misc-use-override warnings, other minor fixes" 2015-09-10 16:49:58 +00:00
.arcconfig
.clang-format
.clang-tidy
.gitignore
CMakeLists.txt [CMake] Add DARWIN_LTO_LIBRARY option to allow overriding -lto_library. 2015-09-10 17:28:51 +00:00
CODE_OWNERS.TXT CODE_OWNERS.TXT is supposed to be sorted by surname 2015-09-07 00:41:40 +00:00
configure Add an exposed variable for which c++ compiler we're using for our 2015-08-17 22:46:26 +00:00
CREDITS.TXT
LICENSE.TXT
llvm.spec.in [Sparc] Implement i64 load/store support for 32-bit sparc. 2015-08-10 19:11:39 +00:00
LLVMBuild.txt
Makefile
Makefile.common
Makefile.config.in
Makefile.rules
README.txt

Low Level Virtual Machine (LLVM)
================================

This directory and its subdirectories contain source code for LLVM,
a toolkit for the construction of highly optimized compilers,
optimizers, and runtime environments.

LLVM is open source software. You may freely distribute it under the terms of
the license agreement found in LICENSE.txt.

Please see the documentation provided in docs/ for further
assistance with LLVM, and in particular docs/GettingStarted.rst for getting
started with LLVM and docs/README.txt for an overview of LLVM's
documentation setup.

If you're writing a package for LLVM, see docs/Packaging.rst for our
suggestions.