aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Transforms/Utils/BasicBlockUtils.cpp
diff options
context:
space:
mode:
authorOCHyams <orlando.hyams@sony.com>2023-01-20 14:19:14 +0000
committerOCHyams <orlando.hyams@sony.com>2023-01-20 14:24:15 +0000
commit4ece50737d5385fb80cfa23f5297d1111f8eed39 (patch)
tree6d0b11b0ea21876d329b0133e021b41cea520b5f /llvm/lib/Transforms/Utils/BasicBlockUtils.cpp
parentd49b842ea2b466ead10a140037c90901438ba9d3 (diff)
downloadllvm-4ece50737d5385fb80cfa23f5297d1111f8eed39.zip
llvm-4ece50737d5385fb80cfa23f5297d1111f8eed39.tar.gz
llvm-4ece50737d5385fb80cfa23f5297d1111f8eed39.tar.bz2
[Assignment Tracking][NFC] Replace LLVM command line option with a module flag
Remove LLVM flag -experimental-assignment-tracking. Assignment tracking is still enabled from Clang with the command line -Xclang -fexperimental-assignment-tracking which tells Clang to ask LLVM to run the pass declare-to-assign. That pass converts conventional debug intrinsics to assignment tracking metadata. With this patch it now also sets a module flag debug-info-assignment-tracking with the value `i1 true` (using the flag conflict rule `Max` since enabling assignment tracking on IR that contains only conventional debug intrinsics should cause no issues). Update the docs and tests too. Reviewed By: CarlosAlbertoEnciso Differential Revision: https://reviews.llvm.org/D142027
Diffstat (limited to 'llvm/lib/Transforms/Utils/BasicBlockUtils.cpp')
-rw-r--r--llvm/lib/Transforms/Utils/BasicBlockUtils.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Utils/BasicBlockUtils.cpp b/llvm/lib/Transforms/Utils/BasicBlockUtils.cpp
index d14e5b8..9b35faf1 100644
--- a/llvm/lib/Transforms/Utils/BasicBlockUtils.cpp
+++ b/llvm/lib/Transforms/Utils/BasicBlockUtils.cpp
@@ -531,7 +531,8 @@ bool llvm::RemoveRedundantDbgInstrs(BasicBlock *BB) {
// getting (2) out of the way, the foward scan will remove (3) since "x"
// already is described as having the value V1 at (1).
MadeChanges |= removeRedundantDbgInstrsUsingBackwardScan(BB);
- if (BB->isEntryBlock() && getEnableAssignmentTracking())
+ if (BB->isEntryBlock() &&
+ isAssignmentTrackingEnabled(*BB->getParent()->getParent()))
MadeChanges |= remomveUndefDbgAssignsFromEntryBlock(BB);
MadeChanges |= removeRedundantDbgInstrsUsingForwardScan(BB);