Negative numbers are represented using DW_OP_consts along with signed representation
of the number as the argument.
Test case IR is generated using Fortran front-end.
Differential D99273
[DebugInfo] Support for signed constants inside DIExpression SouraVX on Mar 24 2021, 9:00 AM. Authored by
Details Negative numbers are represented using DW_OP_consts along with signed representation Test case IR is generated using Fortran front-end.
Diff Detail
Event Timeline
Comment Actions Thanks for review @dstenb !
Comment Actions Thanks @aprantl for reviewing this.
Comment Actions Sounds good overall, with a comment inline about the test for isSignedConstant. IMO, there should be some test coverage of expressions that shouldn't be recognised as a signed constant too.
|
These functions can be cascaded/merged into isConstant function body(with multiple if statements). However keeping them orthogonal/independent has advantages of it's own.
One motivating example can be seen at llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp:217 where this function call fulfill the intent of conveying the necessary info i.e signed or unsigned.