diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2016-02-24 21:32:58 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2016-02-24 21:32:58 +0000 |
commit | d9c9bd8485071afb22adcd2bb08f6a8e5e587ed6 (patch) | |
tree | 53c036d35173ba19f107d9afe07678667d270bee /lib/CodeGen/RegAllocFast.cpp | |
parent | 3f4bde29a30d8c43db5cbe8f5541ebc5d1fdc6af (diff) | |
download | src-d9c9bd8485071afb22adcd2bb08f6a8e5e587ed6.tar.gz src-d9c9bd8485071afb22adcd2bb08f6a8e5e587ed6.zip |
Vendor import of llvm release_38 branch r261684:vendor/llvm/llvm-release_38-r261684
Notes
Notes:
svn path=/vendor/llvm/dist/; revision=296003
svn path=/vendor/llvm/llvm-release_38-r261684/; revision=296004; tag=vendor/llvm/llvm-release_38-r261684
Diffstat (limited to 'lib/CodeGen/RegAllocFast.cpp')
-rw-r--r-- | lib/CodeGen/RegAllocFast.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/CodeGen/RegAllocFast.cpp b/lib/CodeGen/RegAllocFast.cpp index f4c076fea0e7..8d7a7213ba07 100644 --- a/lib/CodeGen/RegAllocFast.cpp +++ b/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); |