diff options
author | Matt Arsenault <Matthew.Arsenault@amd.com> | 2024-07-19 22:09:05 +0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-07-19 22:09:05 +0400 |
commit | 0f0cfcff2ca65e295cd84d3eda6f8e93b76cb3a8 (patch) | |
tree | 0a4fec8c763053a185701237c0818ecee7e4435e /llvm/lib/CodeGen/RegAllocBase.cpp | |
parent | 54dab7dfcfdffe7bd8697737fbd65fda8385d77e (diff) | |
download | llvm-0f0cfcff2ca65e295cd84d3eda6f8e93b76cb3a8.zip llvm-0f0cfcff2ca65e295cd84d3eda6f8e93b76cb3a8.tar.gz llvm-0f0cfcff2ca65e295cd84d3eda6f8e93b76cb3a8.tar.bz2 |
CodeGen: Avoid some references to MachineFunction's getMMI (#99652)
MachineFunction's probably should not include a backreference to
the owning MachineModuleInfo. Most of these references were used
just to query the MCContext, which MachineFunction already directly
stores. Other contexts are using it to query the LLVMContext, which
can already be accessed through the IR function reference.
Diffstat (limited to 'llvm/lib/CodeGen/RegAllocBase.cpp')
-rw-r--r-- | llvm/lib/CodeGen/RegAllocBase.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/RegAllocBase.cpp b/llvm/lib/CodeGen/RegAllocBase.cpp index fb18f5a..60deb62 100644 --- a/llvm/lib/CodeGen/RegAllocBase.cpp +++ b/llvm/lib/CodeGen/RegAllocBase.cpp @@ -130,7 +130,7 @@ void RegAllocBase::allocatePhysRegs() { MI->emitError("inline assembly requires more registers than available"); } else if (MI) { LLVMContext &Context = - MI->getParent()->getParent()->getMMI().getModule()->getContext(); + MI->getParent()->getParent()->getFunction().getContext(); Context.emitError("ran out of registers during register allocation"); } else { report_fatal_error("ran out of registers during register allocation"); |