llvm/test/Analysis
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
..
AssumptionCache [PM] Actually add the new pass manager support for the assumption cache. 2015-01-22 21:53:09 +00:00
BasicAA [opaque pointer type] Add textual IR support for explicit type parameter for global aliases 2015-09-11 03:22:04 +00:00
BlockFrequencyInfo Fix PR 24723 - Handle 0-mass backedges in irreducible loops 2015-09-08 19:22:17 +00:00
BranchProbabilityInfo Fix information loss in branch probability computation. 2015-05-07 17:22:06 +00:00
CallGraph [CallGraph] Given -print-callgraph a stable printing order. 2015-06-19 23:20:31 +00:00
CFLAliasAnalysis [PM/AA] Rebuild LLVM's alias analysis infrastructure in a way compatible 2015-09-09 17:55:00 +00:00
CostModel [CostModel][AArch64] Remove amortization factor for some of the vector select instructions 2015-09-09 15:35:02 +00:00
Delinearization [SCEV] Apply NSW and NUW flags via poison value analysis for sub, mul and shl 2015-08-14 22:45:26 +00:00
DependenceAnalysis [SCEV] Consistently Handle Expressions That Cannot Be Divided 2015-09-10 18:12:47 +00:00
DivergenceAnalysis/NVPTX Divergence analysis for GPU programs 2015-04-10 05:03:50 +00:00
Dominators Move the personality function from LandingPadInst to Function 2015-06-17 20:52:32 +00:00
GlobalsModRef [PM/AA] Rebuild LLVM's alias analysis infrastructure in a way compatible 2015-09-09 17:55:00 +00:00
LazyCallGraph [LazyCallGraph] Port test case from r240039 to LCG. 2015-07-02 02:03:58 +00:00
Lint Move the personality function from LandingPadInst to Function 2015-06-17 20:52:32 +00:00
LoopAccessAnalysis [LAA] Fix typo in test 2015-08-11 23:03:09 +00:00
LoopInfo [PM] Port LoopInfo to the new pass manager, adding both a LoopAnalysis 2015-01-20 10:58:50 +00:00
MemoryDependenceAnalysis [MDA] change BlockScanLimit into a command line option. 2015-07-21 21:50:39 +00:00
PostDominators FileCheck-ize tests. 2013-08-22 00:51:19 +00:00
RegionInfo [tests] Cleanup initialization of test suffixes. 2013-08-16 00:37:11 +00:00
ScalarEvolution [ScalarEvolution] Fix PR24757. 2015-09-10 05:27:38 +00:00
ScopedNoAliasAA [Testsuite] Renumber metadata in ScopedNoAliasAA test to match CHECK lines 2015-05-11 09:10:14 +00:00
TypeBasedAliasAnalysis [PM/AA] Rebuild LLVM's alias analysis infrastructure in a way compatible 2015-09-09 17:55:00 +00:00
ValueTracking Take alignment into account in isSafeToSpeculativelyExecute and isSafeToLoadUnconditionally. 2015-08-17 15:54:26 +00:00