aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/AssignmentTrackingAnalysis.cpp
diff options
context:
space:
mode:
authorOCHyams <orlando.hyams@sony.com>2023-04-26 11:15:37 +0100
committerOCHyams <orlando.hyams@sony.com>2023-04-26 11:24:31 +0100
commitac6e177ce60efdd688e0823389cd167f931437bd (patch)
tree03b1fbf771ed7530116d68967ee6bbc845d01a8d /llvm/lib/CodeGen/AssignmentTrackingAnalysis.cpp
parentde7bfec8850ee402493d8386225129dd5ef33b5c (diff)
downloadllvm-ac6e177ce60efdd688e0823389cd167f931437bd.zip
llvm-ac6e177ce60efdd688e0823389cd167f931437bd.tar.gz
llvm-ac6e177ce60efdd688e0823389cd167f931437bd.tar.bz2
[Assignment Tracking] Remove overly defensive AllocaInst assertion
Remove assert from AssignmentTrackingAnalysis that fires if a local variable has non-alloca storage. The analysis can emit these locations but the assignment tracking code in SelectionDAG isn't ready to handle non-alloca storage for locals yet. The AssignmentTrackingPass (pass that adds assignment tracking metadata) ignores non-alloca dbg.declares, so the only variables affected are those who's backing storage is changed from an alloca during optimisation, and the result is the variables are dropped. Fixes: https://ci.chromium.org/ui/p/pigweed/builders/toolchain/ toolchain-ci-pigweed-linux/b8783274592206481489/overview Reviewed By: StephenTozer Differential Revision: https://reviews.llvm.org/D149135
Diffstat (limited to 'llvm/lib/CodeGen/AssignmentTrackingAnalysis.cpp')
-rw-r--r--llvm/lib/CodeGen/AssignmentTrackingAnalysis.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/AssignmentTrackingAnalysis.cpp b/llvm/lib/CodeGen/AssignmentTrackingAnalysis.cpp
index d5e133d..5ef850d 100644
--- a/llvm/lib/CodeGen/AssignmentTrackingAnalysis.cpp
+++ b/llvm/lib/CodeGen/AssignmentTrackingAnalysis.cpp
@@ -2194,8 +2194,7 @@ bool AssignmentTrackingLowering::run(FunctionVarLocsBuilder *FnVarLocsBuilder) {
//
// Unless we've already done so, create the single location def now.
if (AlwaysStackHomed.insert(Aggr).second) {
- assert(!VarLoc.Values.hasArgList() &&
- isa<AllocaInst>(VarLoc.Values.getVariableLocationOp(0)));
+ assert(!VarLoc.Values.hasArgList());
// TODO: When more complex cases are handled VarLoc.Expr should be
// built appropriately rather than always using an empty DIExpression.
// The assert below is a reminder.