[llvm] [LLVM] Add color to SDNode ID's when dumping (PR #141295)

Francesco Petrogalli via llvm-commits llvm-commits at lists.llvm.org
Fri May 23 16:25:12 PDT 2025


fpetrogalli wrote:





> ![image](https://private-user-images.githubusercontent.com/3663689/447185276-c6af989d-988e-4a3b-b456-5cbf67181868.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NDgwNDIzMzIsIm5iZiI6MTc0ODA0MjAzMiwicGF0aCI6Ii8zNjYzNjg5LzQ0NzE4NTI3Ni1jNmFmOTg5ZC05ODhlLTRhM2ItYjQ1Ni01Y2JmNjcxODE4NjgucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MDUyMyUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTA1MjNUMjMxMzUyWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9MTJiZTdmYmRiYTBhYzNjMjBkZjczMGU1NTMyMTk3YjczMDU0ZWY4OTEzNGJiNTQ5ZTgwZTYwYmE2ODg5MGUzYiZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.DXgc0CGiXi0uh31AGsskgB8aOAbq-t6l6T_AD5w7IA0)

If I look at this dump I see:
1. The dump uses the same colors for t1 and t8, and t10 and t3.
2. The nodes t8, t3 and t5 should not be printed at all [*]

Now I have two things that confuse me, instead of just one. 

But this is my personal preference, if other people like the feature, I will not stop it.

[*] Why are these nodes even printed is a separate issue that I think it is worth pointing out. They are made explicit in the nodes that use them!



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


More information about the llvm-commits mailing list