HomePhabricator

[DebugInfo] Introduce DW_OP_LLVM_convert
Audit Requiredcd8a940b37b2

Authored by markus on Mar 19 2019, 1:48 AM.

Description

[DebugInfo] Introduce DW_OP_LLVM_convert

Introduce a DW_OP_LLVM_convert Dwarf expression pseudo op that allows
for a convenient way to perform type conversions on the Dwarf expression
stack. As an additional bonus it paves the way for using other Dwarf
v5 ops that need to reference a base_type.

The new DW_OP_LLVM_convert is used from lib/Transforms/Utils/Local.cpp
to perform sext/zext on debug values but mainly the patch is about
preparing terrain for adding other Dwarf v5 ops that need to reference a
base_type.

For Dwarf v5 the op maps to DW_OP_convert and for earlier versions a
complex shift & mask pattern is generated to emulate sext/zext.

Differential Revision: https://reviews.llvm.org/D56587

llvm-svn: 356442

Details

Auditors
grosbach
Committed
markusMar 19 2019, 1:48 AM
Differential Revision
D56587: Introduce DW_OP_LLVM_convert
Parents
rGf170dff3c198: Refactor cast<>'s in if conditionals, which can only assert on failure.
Branches
Unknown
Tags
Unknown