aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Passes/PassBuilder.cpp
diff options
context:
space:
mode:
authorDavid Green <david.green@arm.com>2025-05-14 11:05:04 +0100
committerGitHub <noreply@github.com>2025-05-14 11:05:04 +0100
commitec406e86745af0a306870d3e4ce56325584f9b1e (patch)
tree5c1f49cb593900eefae349079df181b3df6851ed /llvm/lib/Passes/PassBuilder.cpp
parent82b179ca6621f2f0b7bc6062fddb1af663785041 (diff)
downloadllvm-ec406e86745af0a306870d3e4ce56325584f9b1e.zip
llvm-ec406e86745af0a306870d3e4ce56325584f9b1e.tar.gz
llvm-ec406e86745af0a306870d3e4ce56325584f9b1e.tar.bz2
[GlobalISel] Add a GISelValueTracker printing pass (#139687)
This adds a GISelValueTrackingPrinterPass that can print the known bits and sign bit of each def in a function. It is built on the new pass manager and so adds a NPM GISelValueTrackingAnalysis, renaming the older class to GISelValueTrackingAnalysisLegacy. The first 2 functions from the AArch64GISelMITest are ported over to an mir test to show it working. It also runs successfully on all files in llvm/test/CodeGen/AArch64/GlobalISel/*.mir that are not invalid. It can hopefully be used to test GlobalISel known bits analysis more directly in common cases, without jumping through the hoops that the C++ tests requires.
Diffstat (limited to 'llvm/lib/Passes/PassBuilder.cpp')
-rw-r--r--llvm/lib/Passes/PassBuilder.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/llvm/lib/Passes/PassBuilder.cpp b/llvm/lib/Passes/PassBuilder.cpp
index 7740f622..8e69683c1 100644
--- a/llvm/lib/Passes/PassBuilder.cpp
+++ b/llvm/lib/Passes/PassBuilder.cpp
@@ -99,6 +99,7 @@
#include "llvm/CodeGen/FinalizeISel.h"
#include "llvm/CodeGen/FixupStatepointCallerSaved.h"
#include "llvm/CodeGen/GCMetadata.h"
+#include "llvm/CodeGen/GlobalISel/GISelValueTracking.h"
#include "llvm/CodeGen/GlobalMerge.h"
#include "llvm/CodeGen/GlobalMergeFunctions.h"
#include "llvm/CodeGen/HardwareLoops.h"