summaryrefslogtreecommitdiffstats
path: root/contrib/llvm/lib/CodeGen
diff options
context:
space:
mode:
authordim <dim@FreeBSD.org>2016-02-24 22:07:56 +0000
committerdim <dim@FreeBSD.org>2016-02-24 22:07:56 +0000
commit7964a6d9e94efb6a149df4b5a4fc07c99d4cde28 (patch)
treede35813fce0fe1effb9c40218b537fb972bdcbec /contrib/llvm/lib/CodeGen
parent72672a13f91ec00fcf43f669f86c9706e973a925 (diff)
downloadFreeBSD-src-7964a6d9e94efb6a149df4b5a4fc07c99d4cde28.zip
FreeBSD-src-7964a6d9e94efb6a149df4b5a4fc07c99d4cde28.tar.gz
Update llvm and clang to release_38 branch r261684.
Diffstat (limited to 'contrib/llvm/lib/CodeGen')
-rw-r--r--contrib/llvm/lib/CodeGen/RegAllocFast.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/contrib/llvm/lib/CodeGen/RegAllocFast.cpp b/contrib/llvm/lib/CodeGen/RegAllocFast.cpp
index f4c076f..8d7a721 100644
--- a/contrib/llvm/lib/CodeGen/RegAllocFast.cpp
+++ b/contrib/llvm/lib/CodeGen/RegAllocFast.cpp
@@ -1002,11 +1002,13 @@ void RAFast::AllocateBasicBlock() {
unsigned DefOpEnd = MI->getNumOperands();
if (MI->isCall()) {
- // Spill all virtregs before a call. This serves two purposes: 1. If an
+ // Spill all virtregs before a call. This serves one purpose: If an
// exception is thrown, the landing pad is going to expect to find
- // registers in their spill slots, and 2. we don't have to wade through
- // all the <imp-def> operands on the call instruction.
- DefOpEnd = VirtOpEnd;
+ // registers in their spill slots.
+ // Note: although this is appealing to just consider all definitions
+ // as call-clobbered, this is not correct because some of those
+ // definitions may be used later on and we do not want to reuse
+ // those for virtual registers in between.
DEBUG(dbgs() << " Spilling remaining registers before call.\n");
spillAll(MI);
OpenPOWER on IntegriCloud