diff options
| author | Craig Topper <craig.topper@intel.com> | 2017-10-31 19:03:51 +0000 |
|---|---|---|
| committer | Craig Topper <craig.topper@intel.com> | 2017-10-31 19:03:51 +0000 |
| commit | 7c7fcabd3f4a7e1f484af8c69ac3514de5737ea5 (patch) | |
| tree | 30b8dc498f1e72a65ffa14d6f206b6dd1fc9037e /llvm/lib/Transforms | |
| parent | 81d6d6b643294cbef490a6446a9c993cf9349b52 (diff) | |
| download | bcm5719-llvm-7c7fcabd3f4a7e1f484af8c69ac3514de5737ea5.tar.gz bcm5719-llvm-7c7fcabd3f4a7e1f484af8c69ac3514de5737ea5.zip | |
[SimplifyCFG] Use a more generic name for the selects created by SpeculativelyExecuteBB to prevent long names from being created
Currently the selects are created with the names of their inputs concatenated together. It's possible to get cases that chain these selects together resulting in long names due to multiple levels of concatenation. Our internal branch of llvm managed to generate names over 100000 characters in length on a particular test due to an extreme compounding of the names.
This patch changes the name to a generic name that is not dependent on its inputs.
Differential Revision: https://reviews.llvm.org/D39440
llvm-svn: 317024
Diffstat (limited to 'llvm/lib/Transforms')
| -rw-r--r-- | llvm/lib/Transforms/Utils/SimplifyCFG.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/Utils/SimplifyCFG.cpp b/llvm/lib/Transforms/Utils/SimplifyCFG.cpp index 5e38e0e7ca4..c71cc764e6d 100644 --- a/llvm/lib/Transforms/Utils/SimplifyCFG.cpp +++ b/llvm/lib/Transforms/Utils/SimplifyCFG.cpp @@ -2034,7 +2034,7 @@ static bool SpeculativelyExecuteBB(BranchInst *BI, BasicBlock *ThenBB, if (Invert) std::swap(TrueV, FalseV); Value *S = Builder.CreateSelect( - BrCond, TrueV, FalseV, TrueV->getName() + "." + FalseV->getName(), BI); + BrCond, TrueV, FalseV, "spec.store.select", BI); SpeculatedStore->setOperand(0, S); SpeculatedStore->applyMergedLocation(BI->getDebugLoc(), SpeculatedStore->getDebugLoc()); @@ -2069,7 +2069,7 @@ static bool SpeculativelyExecuteBB(BranchInst *BI, BasicBlock *ThenBB, if (Invert) std::swap(TrueV, FalseV); Value *V = Builder.CreateSelect( - BrCond, TrueV, FalseV, TrueV->getName() + "." + FalseV->getName(), BI); + BrCond, TrueV, FalseV, "spec.select", BI); PN->setIncomingValue(OrigI, V); PN->setIncomingValue(ThenI, V); } |

