aboutsummaryrefslogtreecommitdiff
path: root/llvm/tools/llvm-reduce/DeltaManager.cpp
diff options
context:
space:
mode:
authorJeremy Morse <jeremy.morse@sony.com>2024-01-23 14:30:56 +0000
committerGitHub <noreply@github.com>2024-01-23 14:30:56 +0000
commit40bdfd39e394baa08fa67c5943c1b53c66c94bed (patch)
treedb9fb5a84055a1e63a30960d3cba40a373c08030 /llvm/tools/llvm-reduce/DeltaManager.cpp
parent30845e8ab46c416a2e333eb84239e9ec71e92617 (diff)
downloadllvm-40bdfd39e394baa08fa67c5943c1b53c66c94bed.zip
llvm-40bdfd39e394baa08fa67c5943c1b53c66c94bed.tar.gz
llvm-40bdfd39e394baa08fa67c5943c1b53c66c94bed.tar.bz2
[llvm-reduce][DebugInfo] Support reducing non-instruction debug-info (#78995)
LLVM will shortly be able to represent variable locations without encoding information into intrinsics -- they'll be stored as DPValue objects instead. We'll still need to be able to llvm-reduce these variable location assignments just like we can with intrinsics today, thus, here's an llvm-reduce pass that enumerates and reduces the DPValue objects. The test for this is paradoxically written with dbg.value intrinsics: this is because we're changing all the core parts of LLVM to support this first, with the textual IR format coming last. Until that arrives, testing the llvm-reduce'ing of DPValues needs the added test using intrinsics. We should be able to drop the variable assignment using %alsoloaded using this method. As with the other llvm-reduce tests, I've got one set of check lines for making the reduction happen as desired, and the other set to check the final output.
Diffstat (limited to 'llvm/tools/llvm-reduce/DeltaManager.cpp')
-rw-r--r--llvm/tools/llvm-reduce/DeltaManager.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/llvm/tools/llvm-reduce/DeltaManager.cpp b/llvm/tools/llvm-reduce/DeltaManager.cpp
index bfe299c..56e39b8 100644
--- a/llvm/tools/llvm-reduce/DeltaManager.cpp
+++ b/llvm/tools/llvm-reduce/DeltaManager.cpp
@@ -20,6 +20,7 @@
#include "deltas/ReduceAttributes.h"
#include "deltas/ReduceBasicBlocks.h"
#include "deltas/ReduceDIMetadata.h"
+#include "deltas/ReduceDPValues.h"
#include "deltas/ReduceFunctionBodies.h"
#include "deltas/ReduceFunctions.h"
#include "deltas/ReduceGlobalObjects.h"
@@ -78,9 +79,11 @@ static cl::list<std::string>
DELTA_PASS("aliases", reduceAliasesDeltaPass) \
DELTA_PASS("ifuncs", reduceIFuncsDeltaPass) \
DELTA_PASS("simplify-conditionals-true", reduceConditionalsTrueDeltaPass) \
- DELTA_PASS("simplify-conditionals-false", reduceConditionalsFalseDeltaPass)\
+ DELTA_PASS("simplify-conditionals-false", \
+ reduceConditionalsFalseDeltaPass) \
DELTA_PASS("invokes", reduceInvokesDeltaPass) \
- DELTA_PASS("unreachable-basic-blocks", reduceUnreachableBasicBlocksDeltaPass) \
+ DELTA_PASS("unreachable-basic-blocks", \
+ reduceUnreachableBasicBlocksDeltaPass) \
DELTA_PASS("basic-blocks", reduceBasicBlocksDeltaPass) \
DELTA_PASS("simplify-cfg", reduceUsingSimplifyCFGDeltaPass) \
DELTA_PASS("function-data", reduceFunctionDataDeltaPass) \
@@ -89,6 +92,7 @@ static cl::list<std::string>
DELTA_PASS("global-initializers", reduceGlobalsInitializersDeltaPass) \
DELTA_PASS("global-variables", reduceGlobalsDeltaPass) \
DELTA_PASS("di-metadata", reduceDIMetadataDeltaPass) \
+ DELTA_PASS("dpvalues", reduceDPValuesDeltaPass) \
DELTA_PASS("metadata", reduceMetadataDeltaPass) \
DELTA_PASS("named-metadata", reduceNamedMetadataDeltaPass) \
DELTA_PASS("arguments", reduceArgumentsDeltaPass) \