[PATCH] D37091: Expose -mllvm -accurate-sample-profile to clang.

Richard Smith - zygoloid via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Aug 24 13:27:06 PDT 2017

rsmith added inline comments.

Comment at: test/CodeGen/thinlto-profile-sample-accurate.c:2-4
+// RUN: %clang -O2 %s -flto=thin -fprofile-sample-accurate -c -o %t.o
+// RUN: llvm-lto -thinlto -o %t %t.o
+// RUN: %clang_cc1 -O2 -x ir %t.o -fthinlto-index=%t.thinlto.bc -emit-llvm -o - | FileCheck %s
test/CodeGen tests should generally not run the optimizer; these tests are intended to check that the correct IR is produced by CodeGen prior to any optimization.

So: we should have a unit test that the IR produced by Clang contains the attribute in the right place (prior to any LLVM passes running), here in test/CodeGen. It seems fine to me to have an end-to-end integration test in addition to that (but not instead of it); we haven't yet established a systematic organization for those tests, but putting it in test/Integration for now will make it easier to find in the future when we work that out.


More information about the cfe-commits mailing list