[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
This commit is contained in:
OCHyams
2023-01-20 14:19:14 +00:00
parent d49b842ea2
commit 4ece50737d
86 changed files with 264 additions and 194 deletions

View File

@@ -2302,7 +2302,7 @@ llvm::InlineResult llvm::InlineFunction(CallBase &CB, InlineFunctionInfo &IFI,
fixupLineNumbers(Caller, FirstNewBlock, &CB,
CalledFunc->getSubprogram() != nullptr);
if (getEnableAssignmentTracking()) {
if (isAssignmentTrackingEnabled(*Caller->getParent())) {
// Interpret inlined stores to caller-local variables as assignments.
trackInlinedStores(FirstNewBlock, Caller->end(), CB);