summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Utils/SimplifyCFG.cpp
diff options
context:
space:
mode:
authorPiotr Padlewski <prazek@google.com>2015-10-02 22:12:22 +0000
committerPiotr Padlewski <prazek@google.com>2015-10-02 22:12:22 +0000
commitdc9b2cfc5013684456ec7d632eaa2edf7c030f2b (patch)
treeaedc153caf7a87e8ddb930b4974f389663f9b1cc /llvm/lib/Transforms/Utils/SimplifyCFG.cpp
parent1f31a2c11c1aa56431c43bfe62f8465635801058 (diff)
downloadbcm5719-llvm-dc9b2cfc5013684456ec7d632eaa2edf7c030f2b.tar.gz
bcm5719-llvm-dc9b2cfc5013684456ec7d632eaa2edf7c030f2b.zip
inariant.group handling in GVN
The most important part required to make clang devirtualization works ( ͡°͜ʖ ͡°). The code is able to find non local dependencies, but unfortunatelly because the caller can only handle local dependencies, I had to add some restrictions to look for dependencies only in the same BB. http://reviews.llvm.org/D12992 llvm-svn: 249196
Diffstat (limited to 'llvm/lib/Transforms/Utils/SimplifyCFG.cpp')
-rw-r--r--llvm/lib/Transforms/Utils/SimplifyCFG.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/llvm/lib/Transforms/Utils/SimplifyCFG.cpp b/llvm/lib/Transforms/Utils/SimplifyCFG.cpp
index 403356931ca..e2bd46e85c3 100644
--- a/llvm/lib/Transforms/Utils/SimplifyCFG.cpp
+++ b/llvm/lib/Transforms/Utils/SimplifyCFG.cpp
@@ -1095,12 +1095,9 @@ static bool HoistThenElseCodeToIf(BranchInst *BI,
I2->replaceAllUsesWith(I1);
I1->intersectOptionalDataWith(I2);
unsigned KnownIDs[] = {
- LLVMContext::MD_tbaa,
- LLVMContext::MD_range,
- LLVMContext::MD_fpmath,
- LLVMContext::MD_invariant_load,
- LLVMContext::MD_nonnull
- };
+ LLVMContext::MD_tbaa, LLVMContext::MD_range,
+ LLVMContext::MD_fpmath, LLVMContext::MD_invariant_load,
+ LLVMContext::MD_nonnull, LLVMContext::MD_invariant_group};
combineMetadata(I1, I2, KnownIDs);
I2->eraseFromParent();
Changed = true;
OpenPOWER on IntegriCloud