[PATCH] D52915: [PM] keeping history when original SCC split and then merge into itself in the same round of SCC update .

Chandler Carruth via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 10 16:02:36 PDT 2018


chandlerc added a comment.

Basic suggestions on test case...



================
Comment at: test/Transforms/Inline/cgscc-cycle-2.ll:1-2
+; This test contains another tricky call graph structures for the inliner to
+; handle correctly. The callgraph is like following:
+;
----------------
We have multiple tests in `cgscc-cycle.ll` already -- why not add this one there?

I suspect all of those will work fine with whatever inlining threshold makes it easy to exercise.


================
Comment at: test/Transforms/Inline/cgscc-cycle-2.ll:28
+;
+; RUN: opt < %s -passes='cgscc(inline)' -inline-threshold=50 -S
+
----------------
I strongly prefer to always include check patterns that verify the inlining we expect to happen does happen (or does not happen). Otherwise some other change may make this entire test irrelevant and we would never know.


================
Comment at: test/Transforms/Inline/cgscc-cycle-2.ll:100-102
+attributes #0 = { noinline nounwind uwtable "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "less-precise-fpmad"="false" "no-frame-pointer-elim"="false" "no-infs-fp-math"="false" "no-jump-tables"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+fxsr,+mmx,+sse,+sse2,+x87" "unsafe-fp-math"="false" "use-soft-float"="false" }
+attributes #1 = { nounwind "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "less-precise-fpmad"="false" "no-frame-pointer-elim"="false" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+fxsr,+mmx,+sse,+sse2,+x87" "unsafe-fp-math"="false" "use-soft-float"="false" }
+attributes #2 = { nounwind }
----------------
Please always minimize the attributes for test cases.

Similarly, use unmangled symbol names, avoid dso_local, and avoid unnecessary `tail`, `align` and other noise in the test case. The goal is to make the IR of the test case as minimal as possible while still exercising the behavior and being easy to read and modify.


Repository:
  rL LLVM

https://reviews.llvm.org/D52915





More information about the llvm-commits mailing list