You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a combination of multiple commits.
This is the 1st commit message:
DIOp-based DIExpression infrastructure
Add the minimal support for DIOp-in-DIExpression, including DIOpFragment
and DW_OP_LLVM_poisoned, and the API to differentiate the variants.
This is the commit message #2:
[Bitcode] Serialization for DIOp-based DIExpression
This is the commit message #3:
Dwarf generation for DIOp-based DIExpression
This is a rather large patch with very minimal testing. It should
probably be split up further, and more tests exercising every path are
needed.
This is the commit message #4:
Extend clang option and add clang codegen for DIOp-based DIExpression
This is the commit message #5:
Support DIOp-based DIExpressions in SROA/mem2reg/instcombine
This patch doesn't actually touch those passes, but just the utilities
they use, namely createFragmentExpression(), and
ConvertDebugDeclareToDebugValue().
This doesn't include assignment tracking, which has some special handling in
SROA.cpp and PromoteMemoryToRegister.cpp. We're not planning on using dbg.assign
for this (at least for the time being), so I just ignored that for now.
This is the commit message #6:
[HeterogeneousDwarf] Handle signed integers in DIOpShr and DIOpConvert
This commit adds new DI operations to differentiate between a zext/sext
DIOpConvert and a ashr/lshr DIOpShr. It isn't possible to use the IR
type for this, since it doesn't distinguish between signed and unsigned
integers. Fixes SWDEV-466183.
This is the commit message #7:
[Debugify] Add a flag to make DIOp-based DIExpressions
This should be useful for porting debugify-based optimizer tests. Part
of SWDEV-462843.
This is the commit message #8:
Handle new DIOp-DIExpressions in replaceAllDbgUsesWith
Fixes part of SWDEV-465029
This is the commit message #9:
Handle new DIOp-DIExpressions in salvageDebugInfo
This fixes part of SWDEV-465029.
This is the commit message #10:
[IRGen] Strip addrspacecasts when creating dbg.declares
dbg.def does this in DIBuilder, but this commit just adds it to clang to
avoid introducing a diff with upstream.
This is the commit message #11:
Verifier support for DIOp-based DIExpression
Effectively a ported and updated version of
https://gerrit-git.amd.com/c/lightning/ec/llvm-project/+/974933
Changed to one overload set rather than distinct method names for
visitor base so the derived class can opt in to non-exhaustive visiting,
rather than it be implied. Added a means to visit the result of the
expression when it is otherwise valid (i.e. there is exactly one result).
Moved as much of the validation as possible into the base class, leaving
the only derived class using the visitor so far to essentially just do
bitsize-based type checks when the arguments and/or DataLayout are available.
The AsmPrinter support could be ported over to the visitor pattern
eventually, and the verifier can be ported over to DIExpr, but these
are left as future improvements.
This is the commit message #12:
Add DIOp AsmPrinter support for Convert/ZExt/SExt
Since AsmPrinter currently require values on evaluation stack to be of
generic type, we have to use the "legacy" dwarf-4 conversion operations.
This can be a little verbose, particularly for sext. It would be
technically possible to represent these with three DW_OP_converts
(converting generic -> signed FromBits -> signed ToBits -> generic), but
using the legacy version seemed simpler.
In the future we could use DW_OP_convert to implement these, but in
order to do that we would need to ensure that values on the dwarf
evaluation stack have non-generic types. For instance, we would need to
use use DW_OP_const_type instead of DW_OP_lit for constants. Failing to
do so would break binary operators, which require compatible types for
their inputs.
One note: it seems like it's ambigious whether a DIOpArg that produces a
negative signed value with a type smaller than the generic type will
have it's higher order bits signed extended or not. For constants,
FastISel produces a zero extended value, and non-fast ISel produces a
sign extended value (see FastISel.cpp:1263 vs InstrEmitter:740 @ this
commit). This can be observed by passing --fast-isel=false to the test
file. SExt is correct for both cases, and always creates a fully
sign-extended value of the generic type.
Fixes SWDEV-467965
This is the commit message #13:
Add DIOp-in-DIExpression test for MIR serialization
This is the commit message #14:
Change -gheterogeneous-dwarf default to diexpression
This is the commit message #15:
[HeterogeneousDWARF] Various fixes against PSDB
Resolve failures in PSDB smoke tests, catch2 tests, and one lit test
(caused by upstream work in SROA).
Several `FIXME(diexpression-poison)` comments mark places where there
is additional work required still, e.g. workarounds or partial fixes
to get changes passing PSDB.
This is the commit message #16:
[HeterogeneousDWARF] Restore -gheterogeneous-dwarf cc1 option
This is the commit message #17:
[MIR] Replace bespoke DIExpression parser
Resolve FIXME by using the LLParser implementation of parseDIExpression
from the MIParser.
This is the commit message #18:
[HetereogeneousDWARF] Revert default to =diexpr
Change-Id: I650ec1e9f6f88ef881f79ef3959785439871e0ba
0 commit comments