Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(8)

Unified Diff: src/IceCfg.cpp

Issue 2095763002: Instrumented local variables and implemented runtime. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/IceCfg.cpp
diff --git a/src/IceCfg.cpp b/src/IceCfg.cpp
index a113b95d47948ddd03c1bbe7bd864c2aa3642bd5..531660bc703b9a53ff669c3477fd233806afc043 100644
--- a/src/IceCfg.cpp
+++ b/src/IceCfg.cpp
@@ -747,6 +747,8 @@ void Cfg::processAllocas(bool SortAndCombine) {
bool HasDynamicAllocation = false;
for (Inst &Instr : EntryNode->getInsts()) {
if (auto *Alloca = llvm::dyn_cast<InstAlloca>(&Instr)) {
+ if (Instr.isDeleted())
+ continue;
uint32_t AlignmentParam = Alloca->getAlignInBytes();
if (AlignmentParam > StackAlignment)
HasLargeAlignment = true;
@@ -769,7 +771,7 @@ void Cfg::processAllocas(bool SortAndCombine) {
if (Node == EntryNode)
continue;
for (Inst &Instr : Node->getInsts()) {
- if (llvm::isa<InstAlloca>(&Instr)) {
+ if (llvm::isa<InstAlloca>(&Instr) && !Instr.isDeleted()) {
// Allocations outside the entry block require a frame pointer.
HasDynamicAllocation = true;
break;
@@ -792,7 +794,7 @@ void Cfg::processAllocas(bool SortAndCombine) {
uint32_t MaxAlignment = StackAlignment;
for (Inst &Instr : EntryNode->getInsts()) {
if (auto *Alloca = llvm::dyn_cast<InstAlloca>(&Instr)) {
- if (!llvm::isa<Constant>(Alloca->getSizeInBytes()))
+ if (!llvm::isa<Constant>(Alloca->getSizeInBytes()) || Alloca->isDeleted())
continue;
uint32_t AlignmentParam = Alloca->getAlignInBytes();
// For default align=0, set it to the real value 1, to avoid any

Powered by Google App Engine
This is Rietveld 408576698