[PATCH] D41866: AMDGPU: Error in SIAnnotateControlFlow instead of assert
Matt Arsenault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 9 08:09:06 PST 2018
arsenm created this revision.
arsenm added reviewers: rampitec, cfang.
Herald added subscribers: t-tye, tpr, dstuttard, yaxunl, nhaehnle, wdng, kzhuravl.
This assert typically happens if an unstructured CFG is passed
to the pass. This can happen if the pass is run independently
without the structurizer.
https://reviews.llvm.org/D41866
Files:
lib/Target/AMDGPU/SIAnnotateControlFlow.cpp
Index: lib/Target/AMDGPU/SIAnnotateControlFlow.cpp
===================================================================
--- lib/Target/AMDGPU/SIAnnotateControlFlow.cpp
+++ lib/Target/AMDGPU/SIAnnotateControlFlow.cpp
@@ -422,7 +422,11 @@
openIf(Term);
}
- assert(Stack.empty());
+ if (!Stack.empty()) {
+ // CFG was probably not structured.
+ report_fatal_error("failed to annotate CFG");
+ }
+
return true;
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D41866.129088.patch
Type: text/x-patch
Size: 433 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180109/a105db22/attachment.bin>
More information about the llvm-commits
mailing list