diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2016-08-24 17:35:37 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2016-08-24 17:35:37 +0000 |
commit | 887f197370e1d3969f8fe559d55b146f73f06a3e (patch) | |
tree | 3bc1a11cffd970e8fd97646b588430671515ddb5 /lib/Transforms/Utils | |
parent | a7fe922b98bb45be7dce7c1cfe668ec27eeddc74 (diff) |
Diffstat (limited to 'lib/Transforms/Utils')
-rw-r--r-- | lib/Transforms/Utils/CloneFunction.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/Transforms/Utils/CloneFunction.cpp b/lib/Transforms/Utils/CloneFunction.cpp index 4f1052d81433f..4d33e22fecfbd 100644 --- a/lib/Transforms/Utils/CloneFunction.cpp +++ b/lib/Transforms/Utils/CloneFunction.cpp @@ -566,6 +566,12 @@ void llvm::CloneAndPruneIntoFromInst(Function *NewFunc, const Function *OldFunc, if (!I) continue; + // Skip over non-intrinsic callsites, we don't want to remove any nodes from + // the CGSCC. + CallSite CS = CallSite(I); + if (CS && CS.getCalledFunction() && !CS.getCalledFunction()->isIntrinsic()) + continue; + // See if this instruction simplifies. Value *SimpleV = SimplifyInstruction(I, DL); if (!SimpleV) |