1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 11:13:28 +01:00

[MachineOutliner] Freeze registers in new functions

Summary:
Call MRI.freezeReservedRegs() on functions created during outlining so
that calls to isReserved() by the verifier called after this pass won't
assert.

Reviewers: MatzeB, qcolombet, paquette

Subscribers: mcrosier, javed.absar, llvm-commits

Differential Revision: https://reviews.llvm.org/D42749

llvm-svn: 323905
This commit is contained in:
Geoff Berry 2018-01-31 20:15:16 +00:00
parent 874b9d04f1
commit 4f06f37de9
2 changed files with 3 additions and 1 deletions

View File

@ -62,6 +62,7 @@
#include "llvm/CodeGen/MachineFunction.h"
#include "llvm/CodeGen/MachineModuleInfo.h"
#include "llvm/CodeGen/MachineOptimizationRemarkEmitter.h"
#include "llvm/CodeGen/MachineRegisterInfo.h"
#include "llvm/CodeGen/Passes.h"
#include "llvm/CodeGen/TargetInstrInfo.h"
#include "llvm/CodeGen/TargetRegisterInfo.h"
@ -1311,6 +1312,7 @@ MachineOutliner::createOutlinedFunction(Module &M, const OutlinedFunction &OF,
DB.finalize();
}
MF.getRegInfo().freezeReservedRegs(MF);
return &MF;
}

View File

@ -1,4 +1,4 @@
# RUN: llc -mtriple=aarch64--- -run-pass=machine-outliner %s -o - | FileCheck %s
# RUN: llc -mtriple=aarch64--- -run-pass=machine-outliner -verify-machineinstrs %s -o - | FileCheck %s
--- |
@x = common global i32 0, align 4