Lines Matching full:we
88 auto WE = std::make_unique<WebAssemblyException>(EHPad);
89 discoverAndMapException(WE.get(), MDT, MDF);
90 Exceptions.push_back(std::move(WE));
109 // We group exceptions in this analysis simply by including all BBs dominated
115 // Here we extract those unwind destinations from their (incorrect) parent
117 // children of the parent exception, so we have to traverse the parent chain.
119 // We should traverse BBs in the preorder of the dominator tree, because
122 // and A's unwind destination is B and B's is C. When we visit B before A, we
155 // subexception of Exception A, and we fix it by taking Exception B out of
160 // A because they were dominated by EHPad A. We fix this case by taking those
164 // 1. First, we take out remaining incorrect subexceptions. This part is
165 // easier, because we haven't added BBs to exceptions yet, we only need to
171 auto *WE = getExceptionFor(EHPad);
177 // If WE (the current EH pad's exception) is still contained in SrcWE but
178 // reachable from DstWE that was taken out of SrcWE above, we have to take
179 // out WE out of SrcWE too.
180 if (WE != SrcWE && SrcWE->contains(WE) && !DstWE->contains(WE) &&
184 << WE->getEHPad()->getNumber() << "."
185 << WE->getEHPad()->getName()
189 WE->setParentException(SrcWE->getParentException());
195 // remaining incorect BBs from exceptions, because we need to iterate over BBs
199 WebAssemblyException *WE = getExceptionFor(MBB);
200 for (; WE; WE = WE->getParentException())
201 WE->addToBlocksSet(MBB);
204 // 2. We take out remaining individual BBs out. Now we have added BBs to each
205 // exceptions' BlockSet, when we take a BB out of an exception, we need to fix
215 "We already handled EH pads above");
246 WebAssemblyException *WE = getExceptionFor(MBB);
247 for (; WE; WE = WE->getParentException())
248 WE->addToBlocksVector(MBB);
255 for (auto &WE : Exceptions) {
256 ExceptionPointers.push_back(WE.get());
257 if (WE->getParentException())
258 WE->getParentException()->getSubExceptions().push_back(std::move(WE));
260 addTopLevelException(std::move(WE));
265 for (auto *WE : ExceptionPointers) {
266 WE->reverseBlock();
267 std::reverse(WE->getSubExceptions().begin(), WE->getSubExceptions().end());
284 WebAssemblyException *WE, const MachineDominatorTree &MDT,
290 MachineBasicBlock *EHPad = WE->getEHPad();
300 if (SubE != WE) {
302 SubE->setParentException(WE);
316 changeExceptionFor(MBB, WE);
325 WE->getSubExceptions().reserve(NumSubExceptions);
326 WE->reserveBlocks(NumBlocks);
331 WebAssemblyException *WE = getExceptionFor(MBB);
332 if (WE) {
333 while (WebAssemblyException *Parent = WE->getParentException())
334 WE = Parent;
336 return WE;
365 raw_ostream &operator<<(raw_ostream &OS, const WebAssemblyException &WE) {
366 WE.print(OS);
371 for (auto &WE : TopLevelExceptions)
372 WE->print(OS);