From 136a6f0dbbe9e438b7b937ca75ffd97573757932 Mon Sep 17 00:00:00 2001 From: Duncan Sands Date: Mon, 26 Jul 2010 07:54:17 +0000 Subject: [PATCH] Pacify gcc-4.5 which wrongly thinks that RExcess (passed as the Excess parameter) may be used uninitialized in the callers of HighRegPressure. llvm-svn: 109393 --- llvm/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp b/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp index cb69314348bc..b31f1123dcc6 100644 --- a/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp @@ -1192,11 +1192,12 @@ namespace { } bool HighRegPressure(const SUnit *SU, unsigned &Excess) const { + Excess = 0; + if (!TLI) return false; bool High = false; - Excess = 0; for (SUnit::const_pred_iterator I = SU->Preds.begin(),E = SU->Preds.end(); I != E; ++I) { if (I->isCtrl())