diff options
| author | Quentin Colombet <qcolombet@apple.com> | 2013-11-08 18:14:17 +0000 |
|---|---|---|
| committer | Quentin Colombet <qcolombet@apple.com> | 2013-11-08 18:14:17 +0000 |
| commit | b06a0ed4b09754501fddd164ba6125ee8ae9bcd5 (patch) | |
| tree | a7ede50e6803620163fe220ce6487803a3190106 /llvm/lib | |
| parent | 5f54c655c140305abbb71546b88b4324f273a105 (diff) | |
| download | bcm5719-llvm-b06a0ed4b09754501fddd164ba6125ee8ae9bcd5.tar.gz bcm5719-llvm-b06a0ed4b09754501fddd164ba6125ee8ae9bcd5.zip | |
[VirtRegMap] Fix for PR17825. Do not ignore noreturn definitions when setting
isPhysRegUsed if the unwind information is required.
Indeed, the runtime may need a correct stack to be able to unwind the call.
llvm-svn: 194271
Diffstat (limited to 'llvm/lib')
| -rw-r--r-- | llvm/lib/CodeGen/VirtRegMap.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/VirtRegMap.cpp b/llvm/lib/CodeGen/VirtRegMap.cpp index 0a08608ecfc..e0aa4053987 100644 --- a/llvm/lib/CodeGen/VirtRegMap.cpp +++ b/llvm/lib/CodeGen/VirtRegMap.cpp @@ -285,7 +285,11 @@ void VirtRegRewriter::rewrite() { if (!MO.isGlobal()) continue; const Function *Func = dyn_cast<Function>(MO.getGlobal()); - if (!Func || !Func->hasFnAttribute(Attribute::NoReturn)) + if (!Func || !Func->hasFnAttribute(Attribute::NoReturn) || + // We need to keep correct unwind information + // even if the function will not return, since the + // runtime may need it. + !Func->hasFnAttribute(Attribute::NoUnwind)) continue; NoReturnInsts.insert(MI); break; |

