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

Side by Side Diff: src/IceCfg.cpp

Issue 1876413002: Subzero. WASM. Additional progress. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Code review feedback and merging with master Created 4 years, 8 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 unified diff | Download patch
« no previous file with comments | « runtime/wasm-runtime.c ('k') | src/IceInst.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 //===- subzero/src/IceCfg.cpp - Control flow graph implementation ---------===// 1 //===- subzero/src/IceCfg.cpp - Control flow graph implementation ---------===//
2 // 2 //
3 // The Subzero Code Generator 3 // The Subzero Code Generator
4 // 4 //
5 // This file is distributed under the University of Illinois Open Source 5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details. 6 // License. See LICENSE.TXT for details.
7 // 7 //
8 //===----------------------------------------------------------------------===// 8 //===----------------------------------------------------------------------===//
9 /// 9 ///
10 /// \file 10 /// \file
(...skipping 581 matching lines...) Expand 10 before | Expand all | Expand 10 after
592 // Allocate the fixed area in the function prolog. 592 // Allocate the fixed area in the function prolog.
593 getTarget()->reserveFixedAllocaArea(TotalSize, CombinedAlignment); 593 getTarget()->reserveFixedAllocaArea(TotalSize, CombinedAlignment);
594 } break; 594 } break;
595 } 595 }
596 } 596 }
597 597
598 void Cfg::processAllocas(bool SortAndCombine) { 598 void Cfg::processAllocas(bool SortAndCombine) {
599 TimerMarker _(TimerStack::TT_alloca, this); 599 TimerMarker _(TimerStack::TT_alloca, this);
600 const uint32_t StackAlignment = getTarget()->getStackAlignment(); 600 const uint32_t StackAlignment = getTarget()->getStackAlignment();
601 CfgNode *EntryNode = getEntryNode(); 601 CfgNode *EntryNode = getEntryNode();
602 assert(EntryNode);
602 // LLVM enforces power of 2 alignment. 603 // LLVM enforces power of 2 alignment.
603 assert(llvm::isPowerOf2_32(StackAlignment)); 604 assert(llvm::isPowerOf2_32(StackAlignment));
604 // Determine if there are large alignment allocations in the entry block or 605 // Determine if there are large alignment allocations in the entry block or
605 // dynamic allocations (variable size in the entry block). 606 // dynamic allocations (variable size in the entry block).
606 bool HasLargeAlignment = false; 607 bool HasLargeAlignment = false;
607 bool HasDynamicAllocation = false; 608 bool HasDynamicAllocation = false;
608 for (Inst &Instr : EntryNode->getInsts()) { 609 for (Inst &Instr : EntryNode->getInsts()) {
609 if (auto *Alloca = llvm::dyn_cast<InstAlloca>(&Instr)) { 610 if (auto *Alloca = llvm::dyn_cast<InstAlloca>(&Instr)) {
610 uint32_t AlignmentParam = Alloca->getAlignInBytes(); 611 uint32_t AlignmentParam = Alloca->getAlignInBytes();
611 if (AlignmentParam > StackAlignment) 612 if (AlignmentParam > StackAlignment)
(...skipping 553 matching lines...) Expand 10 before | Expand all | Expand 10 after
1165 } 1166 }
1166 } 1167 }
1167 // Print each basic block 1168 // Print each basic block
1168 for (CfgNode *Node : Nodes) 1169 for (CfgNode *Node : Nodes)
1169 Node->dump(this); 1170 Node->dump(this);
1170 if (isVerbose(IceV_Instructions)) 1171 if (isVerbose(IceV_Instructions))
1171 Str << "}\n"; 1172 Str << "}\n";
1172 } 1173 }
1173 1174
1174 } // end of namespace Ice 1175 } // end of namespace Ice
OLDNEW
« no previous file with comments | « runtime/wasm-runtime.c ('k') | src/IceInst.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698