diff options
| author | Tim Northover <tnorthover@apple.com> | 2016-08-11 16:21:29 +0000 |
|---|---|---|
| committer | Tim Northover <tnorthover@apple.com> | 2016-08-11 16:21:29 +0000 |
| commit | 0d51044b69f63f621cfff74f117f83ea581e97a0 (patch) | |
| tree | 85f031aac203e6ca8347dc34829235fd1e4ac1b7 /llvm/lib/CodeGen | |
| parent | 26f9e9ebc3224a82287e9eeed9262fbc31784e28 (diff) | |
| download | llvm-0d51044b69f63f621cfff74f117f83ea581e97a0.zip llvm-0d51044b69f63f621cfff74f117f83ea581e97a0.tar.gz llvm-0d51044b69f63f621cfff74f117f83ea581e97a0.tar.bz2 | |
GlobalISel: clear vreg mapping after translating each function
Otherwise we only materialize (shared) constants in the first function they
appear in. This doesn't go well.
llvm-svn: 278351
Diffstat (limited to 'llvm/lib/CodeGen')
| -rw-r--r-- | llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp b/llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp index 0f06b54..5e07723 100644 --- a/llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp +++ b/llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp @@ -311,7 +311,9 @@ bool IRTranslator::translate(const Constant &C, unsigned Reg) { } -void IRTranslator::finalize() { +void IRTranslator::finalizeFunction() { + finishPendingPhis(); + // Release the memory used by the different maps we // needed during the translation. ValToVReg.clear(); @@ -362,7 +364,7 @@ bool IRTranslator::runOnMachineFunction(MachineFunction &MF) { } } - finishPendingPhis(); + finalizeFunction(); // Now that the MachineFrameInfo has been configured, no further changes to // the reserved registers are possible. |
