summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms
diff options
context:
space:
mode:
authorAdrian Prantl <aprantl@apple.com>2015-02-09 23:57:15 +0000
committerAdrian Prantl <aprantl@apple.com>2015-02-09 23:57:15 +0000
commit27bd01f71cbc9ef5c489e27980b21087232b229c (patch)
treeebff33b7a1a66482dece6d63656820d095522330 /llvm/lib/Transforms
parent328b1633d79a61db739a366b1f58cee42e307240 (diff)
downloadbcm5719-llvm-27bd01f71cbc9ef5c489e27980b21087232b229c.tar.gz
bcm5719-llvm-27bd01f71cbc9ef5c489e27980b21087232b229c.zip
Debug info: Use DW_OP_bit_piece instead of DW_OP_piece in the
intermediate representation. This - increases consistency by using the same granularity everywhere - allows for pieces < 1 byte - DW_OP_piece didn't actually allow storing an offset. Part of PR22495. llvm-svn: 228631
Diffstat (limited to 'llvm/lib/Transforms')
-rw-r--r--llvm/lib/Transforms/Scalar/SROA.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/llvm/lib/Transforms/Scalar/SROA.cpp b/llvm/lib/Transforms/Scalar/SROA.cpp
index 6faf905f9b3..eaf73ee5e68 100644
--- a/llvm/lib/Transforms/Scalar/SROA.cpp
+++ b/llvm/lib/Transforms/Scalar/SROA.cpp
@@ -4175,15 +4175,15 @@ bool SROA::splitAlloca(AllocaInst &AI, AllocaSlices &AS) {
// Create a piece expression describing the new partition or reuse AI's
// expression if there is only one partition.
DIExpression PieceExpr = Expr;
- if (IsSplit || Expr.isVariablePiece()) {
+ if (IsSplit || Expr.isBitPiece()) {
// If this alloca is already a scalar replacement of a larger aggregate,
// Piece.Offset describes the offset inside the scalar.
- unsigned Offset = Expr.isVariablePiece() ? Expr.getPieceOffset() : 0;
+ unsigned Offset = Expr.isBitPiece() ? Expr.getBitPieceOffset() : 0;
assert((Offset == 0 ||
- Offset+Piece.Offset+Piece.Size <=
- Expr.getPieceOffset()+Expr.getPieceSize()) &&
+ Offset+Piece.Offset+Piece.Size*8 <=
+ Expr.getBitPieceOffset()+Expr.getBitPieceSize()) &&
"inner piece is not inside original alloca");
- PieceExpr = DIB.createPieceExpression(Offset+Piece.Offset, Piece.Size);
+ PieceExpr = DIB.createBitPieceExpression(Offset+Piece.Offset*8, Piece.Size*8);
}
// Remove any existing dbg.declare intrinsic describing the same alloca.
OpenPOWER on IntegriCloud