diff options
author | David Majnemer <david.majnemer@gmail.com> | 2016-01-04 03:37:39 +0000 |
---|---|---|
committer | David Majnemer <david.majnemer@gmail.com> | 2016-01-04 03:37:39 +0000 |
commit | 82e76d50b1e550cfda3c49ba031205b50f1b283e (patch) | |
tree | f059a86361e1c5e7ee1806a491f67493b11fdf52 /include | |
parent | 2507b00594dc90749c8cb02b74ba261cac25a5db (diff) |
[LICM] Make instruction sinking funclet-aware
We had two bugs here:
- We might try to sink into a catchswitch, causing verifier failures.
- We will succeed in sinking into a cleanuppad but we didn't update the
funclet operand bundle.
This fixes PR26000.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256728 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r-- | include/llvm/Transforms/Utils/LoopUtils.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/llvm/Transforms/Utils/LoopUtils.h b/include/llvm/Transforms/Utils/LoopUtils.h index 17aaee03e4a..2cfacb650ff 100644 --- a/include/llvm/Transforms/Utils/LoopUtils.h +++ b/include/llvm/Transforms/Utils/LoopUtils.h @@ -16,6 +16,7 @@ #include "llvm/ADT/SmallVector.h" #include "llvm/Analysis/AliasAnalysis.h" +#include "llvm/Analysis/EHPersonalities.h" #include "llvm/IR/Dominators.h" #include "llvm/IR/IRBuilder.h" @@ -39,6 +40,8 @@ struct LICMSafetyInfo { bool MayThrow; // The current loop contains an instruction which // may throw. bool HeaderMayThrow; // Same as previous, but specific to loop header + // Used to update funclet bundle operands. + DenseMap<BasicBlock *, ColorVector> BlockColors; LICMSafetyInfo() : MayThrow(false), HeaderMayThrow(false) {} }; |