[PATCH] D46525: [Debugify] Introduce debugify-each and DebugifyFunctionPass

Vedant Kumar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri May 11 11:17:56 PDT 2018


vsk added inline comments.


================
Comment at: test/DebugInfo/debugify-each.ll:1
+; RUN: opt -debugify-each -O1 -S -print-after=called-value-propagation -o - < %s 2> %t
+; FileCheck < %t %s
----------------
vsk wrote:
> At a high level, we don't want to test the debugify logic in this file, because we already have a test for that. Instead, we want to check that -debugify-each is running after each pass.
> 
> Let's minimize this test:
> 
> - Please remove the checks for what the inserted debug info metadata looks like.
> - We just need two functions, e.g "foo" and "bar", which both only contain "ret void".
> - Add RUN lines for: "-debugify-each -O{1,2,3}", and "-enable-debugify -debugify-each -sroa -sccp". All of these separate test runs should share the exact same FileCheck "CHECK" commands. Specifically, we expect the module & function debugify passes to run at least twice. So you could write:
> 
> ```
> ; Verify that the module & function (check-)debugify passes run at least twice.
> 
> ; CHECK: CheckModuleDebugify: PASS
> ; CHECK: CheckFunctionDebugify: PASS
> ; CHECK: CheckFunctionDebugify: PASS
> 
> ; CHECK: CheckModuleDebugify: PASS
> ; CHECK: CheckFunctionDebugify: PASS
> ; CHECK: CheckFunctionDebugify: PASS
> ```
> 
> These should be the only CHECK lines you need.
Actually, s/-sroa/-instrprof -sroa/, because you'll want to run some ModulePass. It would also be fine to use CHECK-DAG here, to avoid a dependence on the pass order.


Repository:
  rL LLVM

https://reviews.llvm.org/D46525





More information about the llvm-commits mailing list