Skip to content

Instantly share code, notes, and snippets.

@xgupta

xgupta/lpm.sh

Created Jul 6, 2021
Embed
What would you like to do?
declare -a pass
pass=(gvn-hoist newgvn
always-inline
attributor
annotation2metadata
called-value-propagation
canonicalize-aliases
cg-profile
constmerge
cross-dso-cfi
deadargelim
elim-avail-extern
extract-blocks
forceattrs
function-import
globaldce
globalopt
globalsplit
hotcoldsplit
hwasan
khwasan
inferattrs
inliner-wrapper
inliner-wrapper-no-mandatory-first
insert-gcov-profiling
instrorderfile
instrprof
internalize
"invalidate<all>"
ipsccp
iroutliner
print-ir-similarity
loop-extract
lowertypetests
metarenamer
mergefunc
name-anon-globals
no-op-module
objc-arc-apelim
partial-inliner
pgo-icall-prom
pgo-instr-gen
pgo-instr-use
print-profile-summary
print-callgraph
print
print-lcg
print-lcg-dot
print-must-be-executed-contexts
print-stack-safety
"print<module-debuginfo>"
rel-lookup-table-converter
rewrite-statepoints-for-gc
rewrite-symbols
rpo-function-attrs
sample-profile
scc-oz-module-inliner
loop-extract-single
strip
strip-dead-debug-info
pseudo-probe
strip-dead-prototypes
strip-debug-declare
strip-nondebug
strip-nonlinetable-debuginfo
synthetic-counts-propagation
verify
wholeprogramdevirt
dfsan
asan-module
msan-module
tsan-module
kasan-module
sancov-module
memprof-module
poison-checking
pseudo-probe-update
callgraph
lcg
module-summary
no-op-module
profile-summary
stack-safety
verify
pass-instrumentation
asan-globals-md
inline-advisor
ir-similarity
globals-aa
globals-aa
argpromotion
"invalidate<all>"
function-attrs
attributor-cgscc
inline
openmpopt
coro-split
no-op-cgscc
no-op-cgscc
fam-proxy
pass-instrumentation
aa-eval
adce
add-discriminators
aggressive-instcombine
assume-builder
assume-simplify
alignment-from-assumptions
annotation-remarks
bdce
bounds-checking
break-crit-edges
callsite-splitting
consthoist
constraint-elimination
chr
coro-early
coro-elide
coro-cleanup
correlated-propagation
dce
div-rem-pairs
dse
dot-cfg
dot-cfg-only
early-cse
early-cse-memssa
ee-instrument
fix-irreducible
make-guards-explicit
post-inline-ee-instrument
gvn-hoist
gvn-sink
helloworld
infer-address-spaces
instcombine
instcount
instsimplify
"invalidate<all>"
irce
float2int
no-op-function
libcalls-shrinkwrap
lint
inject-tli-mappings
instnamer
loweratomic
lower-expect
lower-guard-intrinsic
lower-constant-intrinsics
lower-matrix-intrinsics
lower-matrix-intrinsics-minimal
lower-widenable-condition
guard-widening
load-store-vectorizer
loop-simplify
loop-sink
loop-unroll-and-jam
loop-flatten
lowerinvoke
lowerswitch
mem2reg
memcpyopt
mergeicmps
mergereturn
nary-reassociate
newgvn
jump-threading
partially-inline-libcalls
lcssa
loop-data-prefetch
loop-load-elim
loop-fusion
loop-distribute
loop-versioning
objc-arc
objc-arc-contract
objc-arc-expand
pgo-memop-opt
print
"print<assumptions>"
"print<block-freq>"
"print<branch-prob>"
"print<da>"
"print<divergence>"
"print<domtree>"
"print<postdomtree>"
"print<delinearization>"
"print<demanded-bits>"
"print<domfrontier>"
"print<func-properties>"
"print<inline-cost>"
"print<inliner-size-estimator>"
"print<loops>"
"print<memoryssa>"
"print<phi-values>"
"print<regions>"
"print<scalar-evolution>"
"print<stack-safety-local>"
print-alias-sets
print-predicateinfo
print-mustexecute
print-memderefs
reassociate
redundant-dbg-inst-elim
reg2mem
scalarize-masked-mem-intrin
scalarizer
separate-const-offset-from-gep
sccp
simplifycfg
sink
slp-vectorizer
slsr
speculative-execution
spec-phis
sroa
strip-gc-relocates
structurizecfg
tailcallelim
unify-loop-exits
vector-combine
verify
"verify<domtree>"
"verify<loops>"
"verify<memoryssa>"
"verify<regions>"
"verify<safepoint-ir>"
"verify<scalar-evolution>"
view-cfg
view-cfg-only
transform-warning
asan
kasan
msan
kmsan
tsan
memprof
aa
assumptions
block-freq
branch-prob
domtree
postdomtree
demanded-bits
domfrontier
func-properties
loops
lazy-value-info
da
inliner-size-estimator
memdep
memoryssa
phi-values
regions
no-op-function
opt-remark-emit
scalar-evolution
stack-safety-local
targetlibinfo
targetir
verify
pass-instrumentation
divergence
basic-aa
cfl-anders-aa
cfl-steens-aa
objc-arc-aa
scev-aa
scoped-noalias-aa
tbaa
basic-aa
cfl-anders-aa
cfl-steens-aa
objc-arc-aa
scev-aa
scoped-noalias-aa
tbaa
canon-freeze
dot-ddg
"invalidate<all>"
licm
loop-idiom
loop-instsimplify
loop-interchange
loop-rotate
no-op-loop
print
loop-deletion
loop-simplifycfg
loop-reduce
indvars
loop-unroll-full
print-access-info
"print<ddg>"
"print<iv-users>"
"print<loopnest>"
"print<loop-cache-cost>"
loop-predication
guard-widening
simple-loop-unswitch
loop-reroll
loop-versioning-licm
no-op-loop
access-info
ddg
iv-users
pass-instrumentation
)
FILES="/home/xgupta/llvm-project/llvm/test/Transforms/GVNSink/*"
for f in $FILES
do
for s in "${pass[@]}"
do
find="$s"
echo "$line" | sed -i "/RUN/ s/ -${find}/ -passes=$find/g1" "$f"
done
done
for f in $FILES
do
for s in "${pass[@]}"
do
find="$s"
echo "$line" | sed -i "s/-passes=$find -passes=/-passes=$find,/g1" "$f"
done
done
for f in $FILES
do
for s in "${pass[@]}"
do
find="$s"
echo "$line" | sed -i "s/-passes=$find /$find,/g1" "$f"
done
done
for f in $FILES
do
for s in "${pass[@]}"
do
find="$s"
echo "$line" | sed -i "s/-passes=$find /$find,/g1" "$f"
done
done
for f in $FILES
do
for s in "${pass[@]}"
do
find="$s"
echo "$line" | sed -i "RUN s/ $find,/,$find /g1" "$f"
done
done
for f in $FILES
do
for s in "${pass[@]}"
do
find="$s"
echo "$line" | sed -i "RUN s/S,$find/S -passes=$find/g1" "$f"
done
done
for f in $FILES
do
for s in "${pass[@]}"
do
find="$s"
echo "$line" | sed -i "RUN s/,$find -passes=/,$find,/" "$f"
done
done
for f in $FILES
do
for s in "${pass[@]}"
do
find="$s"
echo "$line" | sed -i "s/passes=$find/passes='$find/" "$f"
done
done
for f in $FILES
do
for s in "${pass[@]}"
do
find="$s"
echo "$line" | sed -i "1 s/'$find /'$find' /" "$f"
done
done
for f in $FILES
do
for s in "${pass[@]}"
do
find="$s"
echo "$line" | sed -i "2 s/'$find /'$find' /" "$f"
done
done
for f in $FILES
do
for s in "${pass[@]}"
do
find="$s"
echo "$line" | sed -i "3 s/'$find /'$find' /" "$f"
done
done
for f in $FILES
do
for s in "${pass[@]}"
do
find="$s"
echo "$line" | sed -i "1 s/,$find /,$find' /" "$f"
done
done
for f in $FILES
do
for s in "${pass[@]}"
do
find="$s"
echo "$line" | sed -i "2 s/,$find /,$find' /" "$f"
done
done
for f in $FILES
do
for s in "${pass[@]}"
do
find="$s"
echo "$line" | sed -i "3 s/,$find /,$find' /" "$f"
done
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment