diff options
author | Philip Reames <listmail@philipreames.com> | 2015-04-13 19:07:47 +0000 |
---|---|---|
committer | Philip Reames <listmail@philipreames.com> | 2015-04-13 19:07:47 +0000 |
commit | 2114275263405e842f34a313297889c5064535f5 (patch) | |
tree | 53491eee1ef24f706f3fd779f0456602191a9548 /llvm/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp | |
parent | 3c2d70434bd750683baa94432bfe9fd1f639f968 (diff) | |
download | bcm5719-llvm-2114275263405e842f34a313297889c5064535f5.tar.gz bcm5719-llvm-2114275263405e842f34a313297889c5064535f5.zip |
[RewriteStatepointsForGC] Avoid inserting empty holder
We use dummy calls to adjust the liveness of values over statepoints in the midst of the insertion. If there are no values which need held live, there's no point in actually inserting the holder.
llvm-svn: 234779
Diffstat (limited to 'llvm/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp')
-rw-r--r-- | llvm/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp b/llvm/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp index 47d6ffb3064..8c2cb355668 100644 --- a/llvm/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp +++ b/llvm/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp @@ -1571,6 +1571,10 @@ static Function *getUseHolder(Module &M) { /// liftetime of the call. static void insertUseHolderAfter(CallSite &CS, const ArrayRef<Value *> Values, SmallVectorImpl<CallInst *> &holders) { + if (Values.empty()) + // No values to hold live, might as well not insert the empty holder + return; + Module *M = CS.getInstruction()->getParent()->getParent()->getParent(); Function *Func = getUseHolder(*M); if (CS.isCall()) { |