https://github.com/serge-sans-paille closed
https://github.com/llvm/llvm-project/pull/70381
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/serge-sans-paille updated
https://github.com/llvm/llvm-project/pull/70381
>From c815ac1403fac8f6bb147573d65ec9906158b9d6 Mon Sep 17 00:00:00 2001
From: serge-sans-paille
Date: Thu, 26 Oct 2023 22:31:43 +0200
Subject: [PATCH 1/4] [clang] Change representation of CurLexerKind
https://github.com/AaronBallman approved this pull request.
LGTM! It's always great to improve compile-time performance!
https://github.com/llvm/llvm-project/pull/70381
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-
serge-sans-paille wrote:
As expected, the formatter iw now red, otherwise looks good (to me at least),
waiting for official approval :-)
https://github.com/llvm/llvm-project/pull/70381
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://li
https://github.com/serge-sans-paille updated
https://github.com/llvm/llvm-project/pull/70381
>From 8ee0ca67fcd45ba462701ba2b4c58d412d77d2bd Mon Sep 17 00:00:00 2001
From: serge-sans-paille
Date: Thu, 26 Oct 2023 22:31:43 +0200
Subject: [PATCH 1/4] [clang] Change representation of CurLexerKind
https://github.com/serge-sans-paille updated
https://github.com/llvm/llvm-project/pull/70381
>From 8ee0ca67fcd45ba462701ba2b4c58d412d77d2bd Mon Sep 17 00:00:00 2001
From: serge-sans-paille
Date: Thu, 26 Oct 2023 22:31:43 +0200
Subject: [PATCH 1/4] [clang] Change representation of CurLexerKind
@@ -767,7 +762,7 @@ class Preprocessor {
/// \#included, and macros currently being expanded from, not counting
/// CurLexer/CurTokenLexer.
struct IncludeStackInfo {
-enum CurLexerKind CurLexerKind;
+LexerCallback CurLexerCallback;
Aaron
@@ -767,7 +762,7 @@ class Preprocessor {
/// \#included, and macros currently being expanded from, not counting
/// CurLexer/CurTokenLexer.
struct IncludeStackInfo {
-enum CurLexerKind CurLexerKind;
+LexerCallback CurLexerCallback;
serge
@@ -767,7 +762,7 @@ class Preprocessor {
/// \#included, and macros currently being expanded from, not counting
/// CurLexer/CurTokenLexer.
struct IncludeStackInfo {
-enum CurLexerKind CurLexerKind;
+LexerCallback CurLexerCallback;
Aaron
@@ -817,7 +817,7 @@ For later versions of Visual Studio, no setup is required-->
{IncludeMacroStack._Mypair._Myval2._Mylast - 1,na}
{CurLexer._Mypair._Myval2,na}
Expanding
Macro: {CurTokenLexer._Mypair._Myval2,na}
-
AaronBallman wrote:
Yeah,
https://github.com/serge-sans-paille updated
https://github.com/llvm/llvm-project/pull/70381
>From 3fe63f81fcb999681daa11b2890c82fda3aaeef5 Mon Sep 17 00:00:00 2001
From: serge-sans-paille
Date: Thu, 26 Oct 2023 22:31:43 +0200
Subject: [PATCH 1/3] [clang] Change representation of CurLexerKind
https://github.com/serge-sans-paille updated
https://github.com/llvm/llvm-project/pull/70381
>From 3fe63f81fcb999681daa11b2890c82fda3aaeef5 Mon Sep 17 00:00:00 2001
From: serge-sans-paille
Date: Thu, 26 Oct 2023 22:31:43 +0200
Subject: [PATCH 1/2] [clang] Change representation of CurLexerKind
https://github.com/serge-sans-paille updated
https://github.com/llvm/llvm-project/pull/70381
>From 3fe63f81fcb999681daa11b2890c82fda3aaeef5 Mon Sep 17 00:00:00 2001
From: serge-sans-paille
Date: Thu, 26 Oct 2023 22:31:43 +0200
Subject: [PATCH 1/2] [clang] Change representation of CurLexerKind
@@ -1914,7 +1909,7 @@ class Preprocessor {
/// Recompute the current lexer kind based on the CurLexer/
/// CurTokenLexer pointers.
- void recomputeCurLexerKind();
+ void recomputeCurLexerCallback();
cor3ntin wrote:
I think renaming this one is a bit too
@@ -817,7 +817,7 @@ For later versions of Visual Studio, no setup is required-->
{IncludeMacroStack._Mypair._Myval2._Mylast - 1,na}
{CurLexer._Mypair._Myval2,na}
Expanding
Macro: {CurTokenLexer._Mypair._Myval2,na}
-
cor3ntin wrote:
@AaronBal
https://github.com/serge-sans-paille updated
https://github.com/llvm/llvm-project/pull/70381
>From 3fe63f81fcb999681daa11b2890c82fda3aaeef5 Mon Sep 17 00:00:00 2001
From: serge-sans-paille
Date: Thu, 26 Oct 2023 22:31:43 +0200
Subject: [PATCH] [clang] Change representation of CurLexerKind
Prev
serge-sans-paille wrote:
Agreed. Sorry I pushed --force my change out of habit :-/
https://github.com/llvm/llvm-project/pull/70381
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/serge-sans-paille updated
https://github.com/llvm/llvm-project/pull/70381
>From 6a41a1f9a48135fe1a43b70904e105fe638189ce Mon Sep 17 00:00:00 2001
From: serge-sans-paille
Date: Thu, 26 Oct 2023 22:31:43 +0200
Subject: [PATCH] [clang] Change representation of CurLexerKind
Prev
https://github.com/serge-sans-paille updated
https://github.com/llvm/llvm-project/pull/70381
>From 7711f8c85c7e106b2662d1a2505f91f0417fac5a Mon Sep 17 00:00:00 2001
From: serge-sans-paille
Date: Thu, 26 Oct 2023 22:31:43 +0200
Subject: [PATCH] [clang] Change representation of CurLexerKind
Prev
@@ -751,13 +751,8 @@ class Preprocessor {
std::unique_ptr CurTokenLexer;
/// The kind of lexer we're currently working with.
- enum CurLexerKind {
-CLK_Lexer,
-CLK_TokenLexer,
-CLK_CachingLexer,
-CLK_DependencyDirectivesLexer,
-CLK_LexAfterModuleImport
https://github.com/cor3ntin commented:
This is excellent!
I made some naming suggestion. Now that we don't have an enum i think it is
clearer to drop the "kind" terminology
https://github.com/llvm/llvm-project/pull/70381
___
cfe-commits mailing list
c
@@ -643,23 +643,7 @@ void Preprocessor::SkipTokensWhileUsingPCH() {
while (true) {
bool InPredefines =
(CurLexer && CurLexer->getFileID() == getPredefinesFileID());
-switch (CurLexerKind) {
-case CLK_Lexer:
- CurLexer->Lex(Tok);
- break;
-case
@@ -751,13 +751,8 @@ class Preprocessor {
std::unique_ptr CurTokenLexer;
/// The kind of lexer we're currently working with.
- enum CurLexerKind {
-CLK_Lexer,
-CLK_TokenLexer,
-CLK_CachingLexer,
-CLK_DependencyDirectivesLexer,
-CLK_LexAfterModuleImport
https://github.com/cor3ntin edited
https://github.com/llvm/llvm-project/pull/70381
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
serge-sans-paille wrote:
Updated compile time metrics:
https://llvm-compile-time-tracker.com/compare.php?from=f9906508bc4f05d3950e2219b4c56f6c078a61ef&to=2631a5163de552a8e482f5cbc51525fb8bb5082f&stat=instructions:u
https://github.com/llvm/llvm-project/pull/70381
github-actions[bot] wrote:
:warning: C/C++ code formatter, clang-format found issues in your code.
:warning:
You can test this locally with the following command:
``bash
git-clang-format --diff 543f9e781032f086afa7438065b9ce7a9c07ca2b
2631a5163de552a8e482f5cbc51525fb8bb5082f --
llvmbot wrote:
@llvm/pr-subscribers-clang
Author: None (serge-sans-paille)
Changes
Previous representation used an enumeration combined to a switch to dispatch to
the appropriate lexer.
Use function pointer so that the dispatching is just an indirect call, which is
actually better becau
https://github.com/serge-sans-paille created
https://github.com/llvm/llvm-project/pull/70381
Previous representation used an enumeration combined to a switch to dispatch to
the appropriate lexer.
Use function pointer so that the dispatching is just an indirect call, which is
actually better b
28 matches
Mail list logo