[NFC][LLVM][CodeGen] Move LiveDebugVariables.h into llvm/include/llvm/CodeGen (#88374)
commit32cb3c55080eec70abf282fbe75e6a58cf76f92a
authorPiyou Chen <piyou.chen@sifive.com>
Mon, 15 Apr 2024 13:58:57 +0000 (15 21:58 +0800)
committerGitHub <noreply@github.com>
Mon, 15 Apr 2024 13:58:57 +0000 (15 21:58 +0800)
tree1f746cefddc811fd8478100f5c23bd9e093fd777
parent105dcc882cf0152baeaa02ac0e50e2527b6940db
[NFC][LLVM][CodeGen] Move LiveDebugVariables.h into llvm/include/llvm/CodeGen (#88374)

This patch make `LiveDebugVariables` can be used by passes outside of
`lib/CodeGen`.

If we run a pass that occurs between the split register allocation pass
without preserving this pass, it will be freed and recomputed until it
encounters the next pass that needs LiveDebugVariables.

However, `LiveDebugVariables` will raise an assertion due to the pass
being freed without emitting a debug value.

This is reason we need `LiveDebugVariables` to be available for passes
outside of lib/Codegen.
llvm/include/llvm/CodeGen/LiveDebugVariables.h [moved from llvm/lib/CodeGen/LiveDebugVariables.h with 90% similarity]
llvm/lib/CodeGen/LiveDebugVariables.cpp
llvm/lib/CodeGen/RegAllocBasic.cpp
llvm/lib/CodeGen/RegAllocGreedy.cpp
llvm/lib/CodeGen/VirtRegMap.cpp