Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions llvm/lib/Transforms/Utils/PromoteMemoryToRegister.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -849,9 +849,12 @@ void PromoteMem2Reg::run() {
for (unsigned i = 0, e = Allocas.size(); i != e; ++i)
IncomingVals.init(i, UndefValue::get(Allocas[i]->getAllocatedType()));

// When handling debug info, treat all incoming values as if they have unknown
// locations until proven otherwise.
// When handling debug info, treat all incoming values as if they have
// compiler-generated (empty) locations, representing the uninitialized
// alloca, until proven otherwise.
IncomingLocs.resize(Allocas.size());
for (unsigned i = 0, e = Allocas.size(); i != e; ++i)
IncomingLocs.init(i, DebugLoc::getCompilerGenerated());

// The renamer uses the Visited set to avoid infinite loops.
Visited.resize(F.getMaxBlockNumber(), false);
Expand Down