mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-22 10:42:39 +01:00
[CSInfo] Fix the assertions regarding updating the CSInfo
The call site info was not updated correctly when deleting corresponding call instructions. Differential Revision: https://reviews.llvm.org/D73700
This commit is contained in:
parent
5ea9129151
commit
290bca5867
@ -1367,6 +1367,11 @@ MachineInstr *MachineLICMBase::ExtractHoistableLoad(MachineInstr *MI) {
|
||||
UpdateRegPressure(NewMIs[1]);
|
||||
|
||||
// Otherwise we successfully unfolded a load that we can hoist.
|
||||
|
||||
// Update the call site info.
|
||||
if (MI->isCandidateForCallSiteEntry())
|
||||
MF.eraseCallSiteInfo(MI);
|
||||
|
||||
MI->eraseFromParent();
|
||||
return NewMIs[0];
|
||||
}
|
||||
|
@ -105,6 +105,10 @@ struct LDTLSCleanup : public MachineFunctionPass {
|
||||
TII->get(TargetOpcode::COPY), AArch64::X0)
|
||||
.addReg(TLSBaseAddrReg);
|
||||
|
||||
// Update the call site info.
|
||||
if (I.isCandidateForCallSiteEntry())
|
||||
I.getMF()->eraseCallSiteInfo(&I);
|
||||
|
||||
// Erase the TLS_base_addr instruction.
|
||||
I.eraseFromParent();
|
||||
|
||||
|
@ -920,6 +920,11 @@ void X86SpeculativeLoadHardeningPass::unfoldCallAndJumpLoads(
|
||||
// Now stitch the new instructions into place and erase the old one.
|
||||
for (auto *NewMI : NewMIs)
|
||||
MBB.insert(MI.getIterator(), NewMI);
|
||||
|
||||
// Update the call site info.
|
||||
if (MI.isCandidateForCallSiteEntry())
|
||||
MF.eraseCallSiteInfo(&MI);
|
||||
|
||||
MI.eraseFromParent();
|
||||
LLVM_DEBUG({
|
||||
dbgs() << "Unfolded load successfully into:\n";
|
||||
|
@ -1,3 +1,7 @@
|
||||
; Verify the call site info. If the call site info is not
|
||||
; in the valid state, an assert should be triggered.
|
||||
; RUN: llc < %s -debug-entry-values -mtriple=arm64-none-linux-gnu -stop-after=machineverifier -relocation-model=pic -aarch64-elf-ldtls-generation=1 < %s
|
||||
|
||||
; RUN: llc -mtriple=arm64-none-linux-gnu -relocation-model=pic -aarch64-elf-ldtls-generation=1 -verify-machineinstrs < %s | FileCheck %s
|
||||
; RUN: llc -mtriple=arm64-none-linux-gnu -relocation-model=pic -aarch64-elf-ldtls-generation=1 -filetype=obj < %s | llvm-objdump -r - | FileCheck --check-prefix=CHECK-RELOC %s
|
||||
; RUN: llc -mtriple=arm64-none-linux-gnu -relocation-model=pic -verify-machineinstrs < %s | FileCheck --check-prefix=CHECK-NOLD %s
|
||||
|
@ -1,4 +1,9 @@
|
||||
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
|
||||
|
||||
; Verify the call site info. If the call site info is not
|
||||
; in the valid state, an assert should be triggered.
|
||||
; RUN: llc < %s -debug-entry-values -stop-after=machineverifier
|
||||
|
||||
; REQUIRES: asserts
|
||||
; RUN: llc -mcpu=haswell < %s -O2 2>&1 | FileCheck %s
|
||||
; For test:
|
||||
|
@ -1,4 +1,9 @@
|
||||
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
|
||||
|
||||
; Verify the call site info. If the call site info is not
|
||||
; in the valid state, an assert should be triggered.
|
||||
; RUN: llc < %s -debug-entry-values -mtriple=x86_64-unknown-linux-gnu -x86-speculative-load-hardening -stop-after=machineverifier
|
||||
|
||||
; RUN: llc < %s -mtriple=x86_64-unknown-linux-gnu -x86-speculative-load-hardening -data-sections | FileCheck %s --check-prefix=X64
|
||||
; FIXME: Fix machine verifier issues and remove -verify-machineinstrs=0. PR39451.
|
||||
; RUN: llc < %s -mtriple=x86_64-unknown-linux-gnu -x86-speculative-load-hardening -relocation-model pic -data-sections -verify-machineinstrs=0 | FileCheck %s --check-prefix=X64-PIC
|
||||
|
Loading…
Reference in New Issue
Block a user