summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2013-06-21 22:56:30 +0000
committerDavid Blaikie <dblaikie@gmail.com>2013-06-21 22:56:30 +0000
commit97c6c5bd9869a3c929cef0880425c198b70b6d46 (patch)
tree7a435003e1a346421ac0d16aba56eb1b30914438 /llvm/lib/CodeGen/SelectionDAG/FastISel.cpp
parent1060eae78e3db0f9e0a4235fd9dcacc6a135cc94 (diff)
downloadbcm5719-llvm-97c6c5bd9869a3c929cef0880425c198b70b6d46.tar.gz
bcm5719-llvm-97c6c5bd9869a3c929cef0880425c198b70b6d46.zip
DebugInfo: Don't lose unreferenced non-trivial by-value parameters
A FastISel optimization was causing us to emit no information for such parameters & when they go missing we end up emitting a different function type. By avoiding that shortcut we not only get types correct (very important) but also location information (handy) - even if it's only live at the start of a function & may be clobbered later. Reviewed/discussion by Evan Cheng & Dan Gohman. llvm-svn: 184604
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/FastISel.cpp')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/FastISel.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp b/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp
index 82f9f76baba..49169b4fa3a 100644
--- a/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp
@@ -97,14 +97,12 @@ bool FastISel::LowerArguments() {
if (!FastLowerArguments())
return false;
- // Enter non-dead arguments into ValueMap for uses in non-entry BBs.
+ // Enter arguments into ValueMap for uses in non-entry BBs.
for (Function::const_arg_iterator I = FuncInfo.Fn->arg_begin(),
E = FuncInfo.Fn->arg_end(); I != E; ++I) {
- if (!I->use_empty()) {
- DenseMap<const Value *, unsigned>::iterator VI = LocalValueMap.find(I);
- assert(VI != LocalValueMap.end() && "Missed an argument?");
- FuncInfo.ValueMap[I] = VI->second;
- }
+ DenseMap<const Value *, unsigned>::iterator VI = LocalValueMap.find(I);
+ assert(VI != LocalValueMap.end() && "Missed an argument?");
+ FuncInfo.ValueMap[I] = VI->second;
}
return true;
}
OpenPOWER on IntegriCloud