diff options
| author | Matt Arsenault <Matthew.Arsenault@amd.com> | 2018-01-17 16:30:01 +0000 |
|---|---|---|
| committer | Matt Arsenault <Matthew.Arsenault@amd.com> | 2018-01-17 16:30:01 +0000 |
| commit | 1491ca8911e4ae28020e647fe5e2da37df26c43a (patch) | |
| tree | 32d5e2694cc6a13c3f6bb5872493be08a8a08e1a /llvm/lib | |
| parent | 0cfebd94c2b14eaff477a6d3c97c735aee619df6 (diff) | |
| download | bcm5719-llvm-1491ca8911e4ae28020e647fe5e2da37df26c43a.tar.gz bcm5719-llvm-1491ca8911e4ae28020e647fe5e2da37df26c43a.zip | |
AMDGPU: Error in SIAnnotateControlFlow instead of assert
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.
llvm-svn: 322685
Diffstat (limited to 'llvm/lib')
| -rw-r--r-- | llvm/lib/Target/AMDGPU/SIAnnotateControlFlow.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/llvm/lib/Target/AMDGPU/SIAnnotateControlFlow.cpp b/llvm/lib/Target/AMDGPU/SIAnnotateControlFlow.cpp index 150d8c3dc3d..97983ea21ed 100644 --- a/llvm/lib/Target/AMDGPU/SIAnnotateControlFlow.cpp +++ b/llvm/lib/Target/AMDGPU/SIAnnotateControlFlow.cpp @@ -422,7 +422,11 @@ bool SIAnnotateControlFlow::runOnFunction(Function &F) { openIf(Term); } - assert(Stack.empty()); + if (!Stack.empty()) { + // CFG was probably not structured. + report_fatal_error("failed to annotate CFG"); + } + return true; } |

