[PATCH] D58034: [IR/DIVar] Add flag for params that have unchanged values

Djordje Todorovic via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 13 02:36:09 PST 2019

djtodoro marked an inline comment as done.
djtodoro added a comment.

@aprantl I agree. Thanks for the comment!

> Could you please add a round-trip test (like or perhaps even in test/Assembler/debug-info.ll )?


Besides this, there is a test case in clang's part for generating the flag. For now, we restricted generating it only in the case of '-femit-param-entry-values' option.

Comment at: include/llvm/IR/DebugInfoFlags.def:62
 HANDLE_DI_FLAG((1 << 29), AllCallsDescribed)
+HANDLE_DI_FLAG((1 << 30), VariableNotChanged)
aprantl wrote:
> The attribute it named `VariableNotChanged`, but IIUC, this can only be applied to function arguments? Should it be called `ArgumentNotModified` instead?
Since we are using it only for arguments now, it sounds reasonable to me.

We put `VariableNotChanged` in order to leave a chance for it to be used at some other places in compiler for whether local variables or function arguments. Either for extension of 'tracking parameter's entry value' feature or somewhere else. For now, using `ArgumentNotModified` is better.



More information about the llvm-commits mailing list