[clang] [Frontend] Consolidate frontend timer setup in CompilerInstance::ExecuteAction. NFC (PR #192266)

via cfe-commits cfe-commits at lists.llvm.org
Wed Apr 15 07:49:24 PDT 2026


github-actions[bot] wrote:

<!--PREMERGE ADVISOR COMMENT: Linux-->
# :penguin: Linux x64 Test Results

* 87403 tests passed
* 1413 tests skipped
* 3 tests failed

## Failed Tests
(click on a test name to see its output)

### Clang-Unit
<details>
<summary>Clang-Unit._/AllClangUnitTests/TimeProfilerTest/ClassTemplateInstantiations</summary>

```
Script:
--
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/unittests/./AllClangUnitTests --gtest_filter=TimeProfilerTest.ClassTemplateInstantiations
--
/home/gha/actions-runner/_work/llvm-project/llvm-project/clang/unittests/Support/TimeProfilerTest.cpp:288
Expected equality of these values:
  R"(
Frontend (test.cc)
| ParseClass (S)
| CheckConstraintSatisfaction (<test.cc:9:21, col:29>)
| InstantiateClass (S<double>, test.cc:9)
| InstantiateFunction (S<double>::foo, test.cc:5)
| ParseDeclarationOrFunctionDefinition (test.cc:11:5)
| | ParseFunctionDefinition (user)
| | | CheckConstraintSatisfaction (<test.cc:12:7, col:12>)
| | | InstantiateClass (S<int>, test.cc:3)
| | | CheckConstraintSatisfaction (<test.cc:13:7, col:14>)
| | | InstantiateClass (S<float>, test.cc:3)
| | | DeferInstantiation (S<float>::foo)
| PerformPendingInstantiations
| | InstantiateFunction (S<float>::foo, test.cc:5)
)"
    Which is: "\nFrontend (test.cc)\n| ParseClass (S)\n| CheckConstraintSatisfaction (<test.cc:9:21, col:29>)\n| InstantiateClass (S<double>, test.cc:9)\n| InstantiateFunction (S<double>::foo, test.cc:5)\n| ParseDeclarationOrFunctionDefinition (test.cc:11:5)\n| | ParseFunctionDefinition (user)\n| | | CheckConstraintSatisfaction (<test.cc:12:7, col:12>)\n| | | InstantiateClass (S<int>, test.cc:3)\n| | | CheckConstraintSatisfaction (<test.cc:13:7, col:14>)\n| | | InstantiateClass (S<float>, test.cc:3)\n| | | DeferInstantiation (S<float>::foo)\n| PerformPendingInstantiations\n| | InstantiateFunction (S<float>::foo, test.cc:5)\n"
  buildTraceGraph(Json)
    Which is: "\nExecuteCompiler\n| Frontend (test.cc)\n| | ParseClass (S)\n| | CheckConstraintSatisfaction (<test.cc:9:21, col:29>)\n| | InstantiateClass (S<double>, test.cc:9)\n| | InstantiateFunction (S<double>::foo, test.cc:5)\n| | ParseDeclarationOrFunctionDefinition (test.cc:11:5)\n| | | ParseFunctionDefinition (user)\n| | | | CheckConstraintSatisfaction (<test.cc:12:7, col:12>)\n| | | | InstantiateClass (S<int>, test.cc:3)\n| | | | CheckConstraintSatisfaction (<test.cc:13:7, col:14>)\n| | | | InstantiateClass (S<float>, test.cc:3)\n| | | | DeferInstantiation (S<float>::foo)\n| PerformPendingInstantiations\n| | InstantiateFunction (S<float>::foo, test.cc:5)\n"
With diff:
@@ -1,15 +1,16 @@
 
-Frontend (test.cc)
-| ParseClass (S)
-| CheckConstraintSatisfaction (<test.cc:9:21, col:29>)
-| InstantiateClass (S<double>, test.cc:9)
-| InstantiateFunction (S<double>::foo, test.cc:5)
-| ParseDeclarationOrFunctionDefinition (test.cc:11:5)
-| | ParseFunctionDefinition (user)
-| | | CheckConstraintSatisfaction (<test.cc:12:7, col:12>)
-| | | InstantiateClass (S<int>, test.cc:3)
-| | | CheckConstraintSatisfaction (<test.cc:13:7, col:14>)
-| | | InstantiateClass (S<float>, test.cc:3)
-| | | DeferInstantiation (S<float>::foo)
+ExecuteCompiler
+| Frontend (test.cc)
+| | ParseClass (S)
+| | CheckConstraintSatisfaction (<test.cc:9:21, col:29>)
+| | InstantiateClass (S<double>, test.cc:9)
+| | InstantiateFunction (S<double>::foo, test.cc:5)
+| | ParseDeclarationOrFunctionDefinition (test.cc:11:5)
+| | | ParseFunctionDefinition (user)
+| | | | CheckConstraintSatisfaction (<test.cc:12:7, col:12>)
+| | | | InstantiateClass (S<int>, test.cc:3)
+| | | | CheckConstraintSatisfaction (<test.cc:13:7, col:14>)
+| | | | InstantiateClass (S<float>, test.cc:3)
+| | | | DeferInstantiation (S<float>::foo)
 | PerformPendingInstantiations
 | | InstantiateFunction (S<float>::foo, test.cc:5)\n



```
</details>
<details>
<summary>Clang-Unit._/AllClangUnitTests/TimeProfilerTest/ConstantEvaluationC99</summary>

```
Script:
--
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/unittests/./AllClangUnitTests --gtest_filter=TimeProfilerTest.ConstantEvaluationC99
--
/home/gha/actions-runner/_work/llvm-project/llvm-project/clang/unittests/Support/TimeProfilerTest.cpp:362
Expected equality of these values:
  R"(
Frontend (test.c)
| ParseDeclarationOrFunctionDefinition (test.c:2:1)
| | isIntegerConstantExpr (<test.c:3:18>)
| | EvaluateKnownConstIntCheckOverflow (<test.c:3:18>)
| PerformPendingInstantiations
)"
    Which is: "\nFrontend (test.c)\n| ParseDeclarationOrFunctionDefinition (test.c:2:1)\n| | isIntegerConstantExpr (<test.c:3:18>)\n| | EvaluateKnownConstIntCheckOverflow (<test.c:3:18>)\n| PerformPendingInstantiations\n"
  buildTraceGraph(Json)
    Which is: "\nExecuteCompiler\n| Frontend (test.c)\n| | ParseDeclarationOrFunctionDefinition (test.c:2:1)\n| | | isIntegerConstantExpr (<test.c:3:18>)\n| | | EvaluateKnownConstIntCheckOverflow (<test.c:3:18>)\n| PerformPendingInstantiations\n"
With diff:
@@ -1,6 +1,7 @@
 
-Frontend (test.c)
-| ParseDeclarationOrFunctionDefinition (test.c:2:1)
-| | isIntegerConstantExpr (<test.c:3:18>)
-| | EvaluateKnownConstIntCheckOverflow (<test.c:3:18>)
+ExecuteCompiler
+| Frontend (test.c)
+| | ParseDeclarationOrFunctionDefinition (test.c:2:1)
+| | | isIntegerConstantExpr (<test.c:3:18>)
+| | | EvaluateKnownConstIntCheckOverflow (<test.c:3:18>)
 | PerformPendingInstantiations\n



```
</details>
<details>
<summary>Clang-Unit._/AllClangUnitTests/TimeProfilerTest/TemplateInstantiations</summary>

```
Script:
--
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/unittests/./AllClangUnitTests --gtest_filter=TimeProfilerTest.TemplateInstantiations
--
/home/gha/actions-runner/_work/llvm-project/llvm-project/clang/unittests/Support/TimeProfilerTest.cpp:342
Expected equality of these values:
  R"(
Frontend (test.cc)
| ParseFunctionDefinition (fooC)
| ParseFunctionDefinition (fooB)
| ParseFunctionDefinition (fooMTA)
| ParseFunctionDefinition (fooA)
| ParseDeclarationOrFunctionDefinition (test.cc:3:5)
| | ParseFunctionDefinition (user)
| | | DeferInstantiation (fooA<int>)
| PerformPendingInstantiations
| | InstantiateFunction (fooA<int>, a.h:7)
| | | InstantiateFunction (fooB<int>, b.h:8)
| | | | DeferInstantiation (fooC<int>)
| | | | BuildCFG
| | | DeferInstantiation (fooMTA<int>)
| | | InstantiateFunction (fooC<int>, b.h:3)
| | | | BuildCFG
| | | InstantiateFunction (fooMTA<int>, a.h:4)
)"
    Which is: "\nFrontend (test.cc)\n| ParseFunctionDefinition (fooC)\n| ParseFunctionDefinition (fooB)\n| ParseFunctionDefinition (fooMTA)\n| ParseFunctionDefinition (fooA)\n| ParseDeclarationOrFunctionDefinition (test.cc:3:5)\n| | ParseFunctionDefinition (user)\n| | | DeferInstantiation (fooA<int>)\n| PerformPendingInstantiations\n| | InstantiateFunction (fooA<int>, a.h:7)\n| | | InstantiateFunction (fooB<int>, b.h:8)\n| | | | DeferInstantiation (fooC<int>)\n| | | | BuildCFG\n| | | DeferInstantiation (fooMTA<int>)\n| | | InstantiateFunction (fooC<int>, b.h:3)\n| | | | BuildCFG\n| | | InstantiateFunction (fooMTA<int>, a.h:4)\n"
  buildTraceGraph(Json)
    Which is: "\nExecuteCompiler\n| Frontend (test.cc)\n| | ParseFunctionDefinition (fooC)\n| | ParseFunctionDefinition (fooB)\n| | ParseFunctionDefinition (fooMTA)\n| | ParseFunctionDefinition (fooA)\n| | ParseDeclarationOrFunctionDefinition (test.cc:3:5)\n| | | ParseFunctionDefinition (user)\n| | | | DeferInstantiation (fooA<int>)\n| PerformPendingInstantiations\n| | InstantiateFunction (fooA<int>, a.h:7)\n| | | InstantiateFunction (fooB<int>, b.h:8)\n| | | | DeferInstantiation (fooC<int>)\n| | | | BuildCFG\n| | | DeferInstantiation (fooMTA<int>)\n| | | InstantiateFunction (fooC<int>, b.h:3)\n| | | | BuildCFG\n| | | InstantiateFunction (fooMTA<int>, a.h:4)\n"
With diff:
@@ -1,11 +1,12 @@
 
-Frontend (test.cc)
-| ParseFunctionDefinition (fooC)
-| ParseFunctionDefinition (fooB)
-| ParseFunctionDefinition (fooMTA)
-| ParseFunctionDefinition (fooA)
-| ParseDeclarationOrFunctionDefinition (test.cc:3:5)
-| | ParseFunctionDefinition (user)
-| | | DeferInstantiation (fooA<int>)
+ExecuteCompiler
+| Frontend (test.cc)
+| | ParseFunctionDefinition (fooC)
+| | ParseFunctionDefinition (fooB)
+| | ParseFunctionDefinition (fooMTA)
+| | ParseFunctionDefinition (fooA)
+| | ParseDeclarationOrFunctionDefinition (test.cc:3:5)
+| | | ParseFunctionDefinition (user)
+| | | | DeferInstantiation (fooA<int>)
 | PerformPendingInstantiations
 | | InstantiateFunction (fooA<int>, a.h:7)



```
</details>

If these failures are unrelated to your changes (for example tests are broken or flaky at HEAD), please open an issue at https://github.com/llvm/llvm-project/issues and add the `infrastructure` label.

https://github.com/llvm/llvm-project/pull/192266


More information about the cfe-commits mailing list