Skip to content
Commit 086635d6 authored by OCHyams's avatar OCHyams
Browse files

[Assignment Tracking][SROA] Fix fragment when slice size equals variable size

Correctly handle the case of splitting an alloca which backs contiguous
distinct variables, where a slice's size equals the size of a backed variable.

We need to ensure that we don't generate fragments expressions with fragments
of the same size as the variable as this is a verifier error.

Prior to this patch a fragment expression would be created in this
situation. e.g. splitting an alloca i64 with two adjacent 32-bit variables into
two 32-bit allocas, the new dbg.assign expressions would contain
(DW_OP_LLVM_fragment, 0, 32) and (DW_OP_LLVM_fragment, 32, 32) even though
those fragments cover each variable entirely.

Reviewed By: jmorse

Differential Revision: https://reviews.llvm.org/D147696
parent 0c049ea6
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment