[ObjCARC] Run ObjCARCContract before PreISelIntrinsicLowering (#184149)

74e4694 moved ObjCARCContract from running before the codegen pipeline
into addISelPrepare(), which runs after PreISelIntrinsicLowering.

This broke ObjCARCContract's retainRV-to-claimRV optimization because
ObjCARCContract identifies ARC calls via intrinsics, not their lowered
counterparts.

This patch restores the pre-74e4694 ordering by moving ObjCARCContract
to addISelPasses.

The IntrinsicInst.cpp change looks extraneous but is required here:
ObjCARCContract may now rewrite the bundle operand from retainRV to
claimRV. When PreISelIntrinsicLowering then encounters this new
intrinsic use, lowerObjCCall asserts mayLowerToFunctionCall.

Assisted-by: claude

rdar://137997453
This commit is contained in:
Marina Taylor
2026-03-27 15:37:47 +00:00
committed by GitHub
parent e56161ef98
commit 55322f2d43
16 changed files with 126 additions and 67 deletions

View File

@@ -698,6 +698,12 @@ void CodeGenPassBuilder<Derived, TargetMachineT>::addISelPasses(
if (TM.useEmulatedTLS())
addModulePass(LowerEmuTLSPass(), PMW);
// ObjCARCContract operates on ObjC intrinsics and must run before
// PreISelIntrinsicLowering.
if (getOptLevel() != CodeGenOptLevel::None) {
addFunctionPass(ObjCARCContractPass(), PMW);
flushFPMsToMPM(PMW);
}
addModulePass(PreISelIntrinsicLoweringPass(&TM), PMW);
addFunctionPass(ExpandIRInstsPass(TM, getOptLevel()), PMW);
@@ -856,9 +862,6 @@ void CodeGenPassBuilder<Derived, TargetMachineT>::addISelPrepare(
if (Opt.RequiresCodeGenSCCOrder && !AddInCGSCCOrder)
requireCGSCCOrder(PMW);
if (getOptLevel() != CodeGenOptLevel::None)
addFunctionPass(ObjCARCContractPass(), PMW);
addFunctionPass(InlineAsmPreparePass(), PMW);
// Add both the safe stack and the stack protection passes: each of them will
// only protect functions that have corresponding attributes.

View File

@@ -982,9 +982,6 @@ void TargetPassConfig::addISelPrepare() {
if (requiresCodeGenSCCOrder())
addPass(new DummyCGSCCPass);
if (getOptLevel() != CodeGenOptLevel::None)
addPass(createObjCARCContractPass());
addPass(createInlineAsmPreparePass());
// Add both the safe stack and the stack protection passes: each of them will
@@ -1095,6 +1092,10 @@ bool TargetPassConfig::addISelPasses() {
addPass(createLowerEmuTLSPass());
PM->add(createTargetTransformInfoWrapperPass(TM->getTargetIRAnalysis()));
// ObjCARCContract operates on ObjC intrinsics and must run before
// PreISelIntrinsicLowering.
if (getOptLevel() != CodeGenOptLevel::None)
addPass(createObjCARCContractPass());
addPass(createPreISelIntrinsicLoweringPass());
addPass(createExpandIRInstsPass(getOptLevel()));
addIRPasses();

View File

@@ -39,6 +39,7 @@ bool IntrinsicInst::mayLowerToFunctionCall(Intrinsic::ID IID) {
case Intrinsic::objc_autoreleasePoolPop:
case Intrinsic::objc_autoreleasePoolPush:
case Intrinsic::objc_autoreleaseReturnValue:
case Intrinsic::objc_claimAutoreleasedReturnValue:
case Intrinsic::objc_copyWeak:
case Intrinsic::objc_destroyWeak:
case Intrinsic::objc_initWeak:

View File

@@ -9,8 +9,8 @@
; CHECK-NEXT: Target Pass Configuration
; CHECK-NEXT: Machine Module Information
; CHECK-NEXT: Target Transform Information
; CHECK-NEXT: Library Function Lowering Analysis
; CHECK-NEXT: Assumption Cache Tracker
; CHECK-NEXT: Library Function Lowering Analysis
; CHECK-NEXT: Profile summary info
; CHECK-NEXT: Type-Based Alias Analysis
; CHECK-NEXT: Scoped NoAlias Alias Analysis
@@ -19,6 +19,11 @@
; CHECK-NEXT: Default Regalloc Eviction Advisor
; CHECK-NEXT: Default Regalloc Priority Advisor
; CHECK-NEXT: ModulePass Manager
; CHECK-NEXT: FunctionPass Manager
; CHECK-NEXT: Dominator Tree Construction
; CHECK-NEXT: Basic Alias Analysis (stateless AA impl)
; CHECK-NEXT: Function Alias Analysis Results
; CHECK-NEXT: ObjC ARC contraction
; CHECK-NEXT: Pre-ISel Intrinsic Lowering
; CHECK-NEXT: FunctionPass Manager
; CHECK-NEXT: Expand IR instructions
@@ -109,15 +114,12 @@
; CHECK-NEXT: Dominator Tree Construction
; CHECK-NEXT: FunctionPass Manager
; CHECK-NEXT: Merge internal globals
; CHECK-NEXT: Dominator Tree Construction
; CHECK-NEXT: Basic Alias Analysis (stateless AA impl)
; CHECK-NEXT: Function Alias Analysis Results
; CHECK-NEXT: ObjC ARC contraction
; CHECK-NEXT: Prepare inline asm insts
; CHECK-NEXT: Safe Stack instrumentation pass
; CHECK-NEXT: Insert stack protectors
; CHECK-NEXT: Module Verifier
; CHECK-NEXT: Analysis containing CSE Info
; CHECK-NEXT: Dominator Tree Construction
; CHECK-NEXT: Natural Loop Information
; CHECK-NEXT: Post-Dominator Tree Construction
; CHECK-NEXT: Branch Probability Analysis

View File

@@ -0,0 +1,26 @@
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 6
; RUN: llc -o - %s | FileCheck %s
target triple = "arm64-apple-ios18"
declare ptr @f()
; Verify that ObjCARCContract rewrites retainRV to claimRV, removing the
; retainRV marker (i.e. there should be no `mov x29, x29` instruction).
define ptr @t() {
; CHECK-LABEL: t:
; CHECK: ; %bb.0:
; CHECK-NEXT: stp x29, x30, [sp, #-16]! ; 16-byte Folded Spill
; CHECK-NEXT: .cfi_def_cfa_offset 16
; CHECK-NEXT: .cfi_offset w30, -8
; CHECK-NEXT: .cfi_offset w29, -16
; CHECK-NEXT: bl _f
; CHECK-NEXT: bl _objc_claimAutoreleasedReturnValue
; CHECK-NEXT: ldp x29, x30, [sp], #16 ; 16-byte Folded Reload
; CHECK-NEXT: ret
%call = call ptr @f() [ "clang.arc.attachedcall"(ptr @llvm.objc.retainAutoreleasedReturnValue) ]
ret ptr %call
}
declare ptr @llvm.objc.retainAutoreleasedReturnValue(ptr)

View File

@@ -99,6 +99,7 @@
; GCN-O2-NEXT: require<collector-metadata>
; GCN-O2-NEXT: require<runtime-libcall-info>
; GCN-O2-NEXT: require<libcall-lowering-info>
; GCN-O2-NEXT: function(objc-arc-contract)
; GCN-O2-NEXT: pre-isel-intrinsic-lowering
; GCN-O2-NEXT: function(expand-ir-insts<O2>)
; GCN-O2-NEXT: amdgpu-remove-incompatible-functions
@@ -158,7 +159,6 @@
; GCN-O2-NEXT: lcssa))
; GCN-O2-NEXT: amdgpu-perf-hint
; GCN-O2-NEXT: cgscc(function(require<uniformity>
; GCN-O2-NEXT: objc-arc-contract
; GCN-O2-NEXT: inline-asm-prepare
; GCN-O2-NEXT: safe-stack
; GCN-O2-NEXT: stack-protector
@@ -270,6 +270,7 @@
; GCN-O3-NEXT: require<collector-metadata>
; GCN-O3-NEXT: require<runtime-libcall-info>
; GCN-O3-NEXT: require<libcall-lowering-info>
; GCN-O3-NEXT: function(objc-arc-contract)
; GCN-O3-NEXT: pre-isel-intrinsic-lowering
; GCN-O3-NEXT: function(expand-ir-insts<O3>)
; GCN-O3-NEXT: amdgpu-remove-incompatible-functions
@@ -329,7 +330,6 @@
; GCN-O3-NEXT: lcssa))
; GCN-O3-NEXT: amdgpu-perf-hint
; GCN-O3-NEXT: cgscc(function(require<uniformity>
; GCN-O3-NEXT: objc-arc-contract
; GCN-O3-NEXT: inline-asm-prepare
; GCN-O3-NEXT: safe-stack
; GCN-O3-NEXT: stack-protector

View File

@@ -166,8 +166,8 @@
; GCN-O1-NEXT:Target Pass Configuration
; GCN-O1-NEXT:Machine Module Information
; GCN-O1-NEXT:Target Transform Information
; GCN-O1-NEXT:Library Function Lowering Analysis
; GCN-O1-NEXT:Assumption Cache Tracker
; GCN-O1-NEXT:Library Function Lowering Analysis
; GCN-O1-NEXT:Profile summary info
; GCN-O1-NEXT:AMDGPU Address space based Alias Analysis
; GCN-O1-NEXT:External Alias Analysis
@@ -179,6 +179,11 @@
; GCN-O1-NEXT:Default Regalloc Eviction Advisor
; GCN-O1-NEXT:Default Regalloc Priority Advisor
; GCN-O1-NEXT: ModulePass Manager
; GCN-O1-NEXT: FunctionPass Manager
; GCN-O1-NEXT: Dominator Tree Construction
; GCN-O1-NEXT: Basic Alias Analysis (stateless AA impl)
; GCN-O1-NEXT: Function Alias Analysis Results
; GCN-O1-NEXT: ObjC ARC contraction
; GCN-O1-NEXT: Pre-ISel Intrinsic Lowering
; GCN-O1-NEXT: FunctionPass Manager
; GCN-O1-NEXT: Expand IR instructions
@@ -299,13 +304,10 @@
; GCN-O1-NEXT: Call Graph SCC Pass Manager
; GCN-O1-NEXT: DummyCGSCCPass
; GCN-O1-NEXT: FunctionPass Manager
; GCN-O1-NEXT: Dominator Tree Construction
; GCN-O1-NEXT: Basic Alias Analysis (stateless AA impl)
; GCN-O1-NEXT: Function Alias Analysis Results
; GCN-O1-NEXT: ObjC ARC contraction
; GCN-O1-NEXT: Prepare inline asm insts
; GCN-O1-NEXT: Safe Stack instrumentation pass
; GCN-O1-NEXT: Insert stack protectors
; GCN-O1-NEXT: Dominator Tree Construction
; GCN-O1-NEXT: Cycle Info Analysis
; GCN-O1-NEXT: Uniformity Analysis
; GCN-O1-NEXT: Basic Alias Analysis (stateless AA impl)
@@ -461,8 +463,8 @@
; GCN-O1-OPTS-NEXT:Target Pass Configuration
; GCN-O1-OPTS-NEXT:Machine Module Information
; GCN-O1-OPTS-NEXT:Target Transform Information
; GCN-O1-OPTS-NEXT:Library Function Lowering Analysis
; GCN-O1-OPTS-NEXT:Assumption Cache Tracker
; GCN-O1-OPTS-NEXT:Library Function Lowering Analysis
; GCN-O1-OPTS-NEXT:Profile summary info
; GCN-O1-OPTS-NEXT:AMDGPU Address space based Alias Analysis
; GCN-O1-OPTS-NEXT:External Alias Analysis
@@ -474,6 +476,11 @@
; GCN-O1-OPTS-NEXT:Default Regalloc Eviction Advisor
; GCN-O1-OPTS-NEXT:Default Regalloc Priority Advisor
; GCN-O1-OPTS-NEXT: ModulePass Manager
; GCN-O1-OPTS-NEXT: FunctionPass Manager
; GCN-O1-OPTS-NEXT: Dominator Tree Construction
; GCN-O1-OPTS-NEXT: Basic Alias Analysis (stateless AA impl)
; GCN-O1-OPTS-NEXT: Function Alias Analysis Results
; GCN-O1-OPTS-NEXT: ObjC ARC contraction
; GCN-O1-OPTS-NEXT: Pre-ISel Intrinsic Lowering
; GCN-O1-OPTS-NEXT: FunctionPass Manager
; GCN-O1-OPTS-NEXT: Expand IR instructions
@@ -614,13 +621,10 @@
; GCN-O1-OPTS-NEXT: Call Graph SCC Pass Manager
; GCN-O1-OPTS-NEXT: DummyCGSCCPass
; GCN-O1-OPTS-NEXT: FunctionPass Manager
; GCN-O1-OPTS-NEXT: Dominator Tree Construction
; GCN-O1-OPTS-NEXT: Basic Alias Analysis (stateless AA impl)
; GCN-O1-OPTS-NEXT: Function Alias Analysis Results
; GCN-O1-OPTS-NEXT: ObjC ARC contraction
; GCN-O1-OPTS-NEXT: Prepare inline asm insts
; GCN-O1-OPTS-NEXT: Safe Stack instrumentation pass
; GCN-O1-OPTS-NEXT: Insert stack protectors
; GCN-O1-OPTS-NEXT: Dominator Tree Construction
; GCN-O1-OPTS-NEXT: Cycle Info Analysis
; GCN-O1-OPTS-NEXT: Uniformity Analysis
; GCN-O1-OPTS-NEXT: Basic Alias Analysis (stateless AA impl)
@@ -783,8 +787,8 @@
; GCN-O2-NEXT:Target Pass Configuration
; GCN-O2-NEXT:Machine Module Information
; GCN-O2-NEXT:Target Transform Information
; GCN-O2-NEXT:Library Function Lowering Analysis
; GCN-O2-NEXT:Assumption Cache Tracker
; GCN-O2-NEXT:Library Function Lowering Analysis
; GCN-O2-NEXT:Profile summary info
; GCN-O2-NEXT:AMDGPU Address space based Alias Analysis
; GCN-O2-NEXT:External Alias Analysis
@@ -796,6 +800,11 @@
; GCN-O2-NEXT:Default Regalloc Eviction Advisor
; GCN-O2-NEXT:Default Regalloc Priority Advisor
; GCN-O2-NEXT: ModulePass Manager
; GCN-O2-NEXT: FunctionPass Manager
; GCN-O2-NEXT: Dominator Tree Construction
; GCN-O2-NEXT: Basic Alias Analysis (stateless AA impl)
; GCN-O2-NEXT: Function Alias Analysis Results
; GCN-O2-NEXT: ObjC ARC contraction
; GCN-O2-NEXT: Pre-ISel Intrinsic Lowering
; GCN-O2-NEXT: FunctionPass Manager
; GCN-O2-NEXT: Expand IR instructions
@@ -940,13 +949,10 @@
; GCN-O2-NEXT: Analysis if a function is memory bound
; GCN-O2-NEXT: DummyCGSCCPass
; GCN-O2-NEXT: FunctionPass Manager
; GCN-O2-NEXT: Dominator Tree Construction
; GCN-O2-NEXT: Basic Alias Analysis (stateless AA impl)
; GCN-O2-NEXT: Function Alias Analysis Results
; GCN-O2-NEXT: ObjC ARC contraction
; GCN-O2-NEXT: Prepare inline asm insts
; GCN-O2-NEXT: Safe Stack instrumentation pass
; GCN-O2-NEXT: Insert stack protectors
; GCN-O2-NEXT: Dominator Tree Construction
; GCN-O2-NEXT: Cycle Info Analysis
; GCN-O2-NEXT: Uniformity Analysis
; GCN-O2-NEXT: Basic Alias Analysis (stateless AA impl)
@@ -1110,8 +1116,8 @@
; GCN-O3-NEXT:Target Pass Configuration
; GCN-O3-NEXT:Machine Module Information
; GCN-O3-NEXT:Target Transform Information
; GCN-O3-NEXT:Library Function Lowering Analysis
; GCN-O3-NEXT:Assumption Cache Tracker
; GCN-O3-NEXT:Library Function Lowering Analysis
; GCN-O3-NEXT:Profile summary info
; GCN-O3-NEXT:AMDGPU Address space based Alias Analysis
; GCN-O3-NEXT:External Alias Analysis
@@ -1123,6 +1129,11 @@
; GCN-O3-NEXT:Default Regalloc Eviction Advisor
; GCN-O3-NEXT:Default Regalloc Priority Advisor
; GCN-O3-NEXT: ModulePass Manager
; GCN-O3-NEXT: FunctionPass Manager
; GCN-O3-NEXT: Dominator Tree Construction
; GCN-O3-NEXT: Basic Alias Analysis (stateless AA impl)
; GCN-O3-NEXT: Function Alias Analysis Results
; GCN-O3-NEXT: ObjC ARC contraction
; GCN-O3-NEXT: Pre-ISel Intrinsic Lowering
; GCN-O3-NEXT: FunctionPass Manager
; GCN-O3-NEXT: Expand IR instructions
@@ -1280,13 +1291,10 @@
; GCN-O3-NEXT: Analysis if a function is memory bound
; GCN-O3-NEXT: DummyCGSCCPass
; GCN-O3-NEXT: FunctionPass Manager
; GCN-O3-NEXT: Dominator Tree Construction
; GCN-O3-NEXT: Basic Alias Analysis (stateless AA impl)
; GCN-O3-NEXT: Function Alias Analysis Results
; GCN-O3-NEXT: ObjC ARC contraction
; GCN-O3-NEXT: Prepare inline asm insts
; GCN-O3-NEXT: Safe Stack instrumentation pass
; GCN-O3-NEXT: Insert stack protectors
; GCN-O3-NEXT: Dominator Tree Construction
; GCN-O3-NEXT: Cycle Info Analysis
; GCN-O3-NEXT: Uniformity Analysis
; GCN-O3-NEXT: Basic Alias Analysis (stateless AA impl)

View File

@@ -3,6 +3,11 @@
; REQUIRES: asserts
; CHECK: ModulePass Manager
; CHECK-NEXT: FunctionPass Manager
; CHECK-NEXT: Dominator Tree Construction
; CHECK-NEXT: Basic Alias Analysis (stateless AA impl)
; CHECK-NEXT: Function Alias Analysis Results
; CHECK-NEXT: ObjC ARC contraction
; CHECK-NEXT: Pre-ISel Intrinsic Lowering
; CHECK-NEXT: FunctionPass Manager
; CHECK-NEXT: Expand IR instructions
@@ -68,14 +73,11 @@
; CHECK-NEXT: Transform predicated vector loops to use MVE tail predication
; CHECK-NEXT: A No-Op Barrier Pass
; CHECK-NEXT: FunctionPass Manager
; CHECK-NEXT: Dominator Tree Construction
; CHECK-NEXT: Basic Alias Analysis (stateless AA impl)
; CHECK-NEXT: Function Alias Analysis Results
; CHECK-NEXT: ObjC ARC contraction
; CHECK-NEXT: Prepare inline asm insts
; CHECK-NEXT: Safe Stack instrumentation pass
; CHECK-NEXT: Insert stack protectors
; CHECK-NEXT: Module Verifier
; CHECK-NEXT: Dominator Tree Construction
; CHECK-NEXT: Basic Alias Analysis (stateless AA impl)
; CHECK-NEXT: Function Alias Analysis Results
; CHECK-NEXT: Natural Loop Information

View File

@@ -21,8 +21,8 @@
; LAXX-NEXT: Target Pass Configuration
; LAXX-NEXT: Machine Module Information
; LAXX-NEXT: Target Transform Information
; LAXX-NEXT: Library Function Lowering Analysis
; LAXX-NEXT: Assumption Cache Tracker
; LAXX-NEXT: Library Function Lowering Analysis
; LAXX-NEXT: Type-Based Alias Analysis
; LAXX-NEXT: Scoped NoAlias Alias Analysis
; LAXX-NEXT: Profile summary info
@@ -31,6 +31,11 @@
; LAXX-NEXT: Default Regalloc Eviction Advisor
; LAXX-NEXT: Default Regalloc Priority Advisor
; LAXX-NEXT: ModulePass Manager
; LAXX-NEXT: FunctionPass Manager
; LAXX-NEXT: Dominator Tree Construction
; LAXX-NEXT: Basic Alias Analysis (stateless AA impl)
; LAXX-NEXT: Function Alias Analysis Results
; LAXX-NEXT: ObjC ARC contraction
; LAXX-NEXT: Pre-ISel Intrinsic Lowering
; LAXX-NEXT: FunctionPass Manager
; LAXX-NEXT: Expand IR instructions
@@ -76,9 +81,6 @@
; LAXX-NEXT: CodeGen Prepare
; LAXX-NEXT: Dominator Tree Construction
; LAXX-NEXT: Exception handling preparation
; LAXX-NEXT: Basic Alias Analysis (stateless AA impl)
; LAXX-NEXT: Function Alias Analysis Results
; LAXX-NEXT: ObjC ARC contraction
; LAXX-NEXT: Prepare inline asm insts
; LAXX-NEXT: Safe Stack instrumentation pass
; LAXX-NEXT: Insert stack protectors

View File

@@ -1,5 +1,10 @@
; RUN: llc -mtriple=m68k -debug-pass=Structure < %s -o /dev/null 2>&1 | grep -v "Verify generated machine code" | FileCheck %s
; CHECK: ModulePass Manager
; CHECK-NEXT: FunctionPass Manager
; CHECK-NEXT: Dominator Tree Construction
; CHECK-NEXT: Basic Alias Analysis (stateless AA impl)
; CHECK-NEXT: Function Alias Analysis Results
; CHECK-NEXT: ObjC ARC contraction
; CHECK-NEXT: Pre-ISel Intrinsic Lowering
; CHECK-NEXT: FunctionPass Manager
; CHECK-NEXT: Expand IR instructions
@@ -44,9 +49,6 @@
; CHECK-NEXT: CodeGen Prepare
; CHECK-NEXT: Dominator Tree Construction
; CHECK-NEXT: Exception handling preparation
; CHECK-NEXT: Basic Alias Analysis (stateless AA impl)
; CHECK-NEXT: Function Alias Analysis Results
; CHECK-NEXT: ObjC ARC contraction
; CHECK-NEXT: Prepare inline asm insts
; CHECK-NEXT: Safe Stack instrumentation pass
; CHECK-NEXT: Insert stack protectors

View File

@@ -9,8 +9,8 @@
; CHECK-NEXT: Target Pass Configuration
; CHECK-NEXT: Machine Module Information
; CHECK-NEXT: Target Transform Information
; CHECK-NEXT: Library Function Lowering Analysis
; CHECK-NEXT: Assumption Cache Tracker
; CHECK-NEXT: Library Function Lowering Analysis
; CHECK-NEXT: Type-Based Alias Analysis
; CHECK-NEXT: Scoped NoAlias Alias Analysis
; CHECK-NEXT: Profile summary info
@@ -19,6 +19,11 @@
; CHECK-NEXT: Default Regalloc Eviction Advisor
; CHECK-NEXT: Default Regalloc Priority Advisor
; CHECK-NEXT: ModulePass Manager
; CHECK-NEXT: FunctionPass Manager
; CHECK-NEXT: Dominator Tree Construction
; CHECK-NEXT: Basic Alias Analysis (stateless AA impl)
; CHECK-NEXT: Function Alias Analysis Results
; CHECK-NEXT: ObjC ARC contraction
; CHECK-NEXT: Pre-ISel Intrinsic Lowering
; CHECK-NEXT: FunctionPass Manager
; CHECK-NEXT: Expand IR instructions
@@ -85,9 +90,6 @@
; CHECK-NEXT: Lazy Block Frequency Analysis
; CHECK-NEXT: Optimization Remark Emitter
; CHECK-NEXT: Hardware Loop Insertion
; CHECK-NEXT: Basic Alias Analysis (stateless AA impl)
; CHECK-NEXT: Function Alias Analysis Results
; CHECK-NEXT: ObjC ARC contraction
; CHECK-NEXT: Prepare inline asm insts
; CHECK-NEXT: Safe Stack instrumentation pass
; CHECK-NEXT: Insert stack protectors

View File

@@ -13,8 +13,8 @@
; CHECK-NEXT: Target Pass Configuration
; CHECK-NEXT: Machine Module Information
; CHECK-NEXT: Target Transform Information
; CHECK-NEXT: Library Function Lowering Analysis
; CHECK-NEXT: Assumption Cache Tracker
; CHECK-NEXT: Library Function Lowering Analysis
; CHECK-NEXT: Profile summary info
; CHECK-NEXT: Type-Based Alias Analysis
; CHECK-NEXT: Scoped NoAlias Alias Analysis
@@ -23,6 +23,11 @@
; CHECK-NEXT: Default Regalloc Eviction Advisor
; CHECK-NEXT: Default Regalloc Priority Advisor
; CHECK-NEXT: ModulePass Manager
; CHECK-NEXT: FunctionPass Manager
; CHECK-NEXT: Dominator Tree Construction
; CHECK-NEXT: Basic Alias Analysis (stateless AA impl)
; CHECK-NEXT: Function Alias Analysis Results
; CHECK-NEXT: ObjC ARC contraction
; CHECK-NEXT: Pre-ISel Intrinsic Lowering
; CHECK-NEXT: FunctionPass Manager
; CHECK-NEXT: Expand IR instructions
@@ -92,14 +97,11 @@
; CHECK-NEXT: A No-Op Barrier Pass
; CHECK-NEXT: FunctionPass Manager
; CHECK-NEXT: Merge internal globals
; CHECK-NEXT: Dominator Tree Construction
; CHECK-NEXT: Basic Alias Analysis (stateless AA impl)
; CHECK-NEXT: Function Alias Analysis Results
; CHECK-NEXT: ObjC ARC contraction
; CHECK-NEXT: Prepare inline asm insts
; CHECK-NEXT: Safe Stack instrumentation pass
; CHECK-NEXT: Insert stack protectors
; CHECK-NEXT: Module Verifier
; CHECK-NEXT: Dominator Tree Construction
; CHECK-NEXT: Basic Alias Analysis (stateless AA impl)
; CHECK-NEXT: Function Alias Analysis Results
; CHECK-NEXT: Natural Loop Information

View File

@@ -94,14 +94,19 @@
; SPIRV-Opt-NEXT:Target Pass Configuration
; SPIRV-Opt-NEXT:Machine Module Information
; SPIRV-Opt-NEXT:Target Transform Information
; SPIRV-Opt-NEXT:Library Function Lowering Analysis
; SPIRV-Opt-NEXT:Assumption Cache Tracker
; SPIRV-Opt-NEXT:Library Function Lowering Analysis
; SPIRV-Opt-NEXT:Type-Based Alias Analysis
; SPIRV-Opt-NEXT:Scoped NoAlias Alias Analysis
; SPIRV-Opt-NEXT:Profile summary info
; SPIRV-Opt-NEXT:Create Garbage Collector Module Metadata
; SPIRV-Opt-NEXT:Machine Branch Probability Analysis
; SPIRV-Opt-NEXT: ModulePass Manager
; SPIRV-Opt-NEXT: FunctionPass Manager
; SPIRV-Opt-NEXT: Dominator Tree Construction
; SPIRV-Opt-NEXT: Basic Alias Analysis (stateless AA impl)
; SPIRV-Opt-NEXT: Function Alias Analysis Results
; SPIRV-Opt-NEXT: ObjC ARC contraction
; SPIRV-Opt-NEXT: Pre-ISel Intrinsic Lowering
; SPIRV-Opt-NEXT: FunctionPass Manager
; SPIRV-Opt-NEXT: Expand IR instructions
@@ -161,14 +166,11 @@
; SPIRV-Opt-NEXT: SPIRV emit intrinsics
; SPIRV-Opt-NEXT: FunctionPass Manager
; SPIRV-Opt-NEXT: SPIRV legalize bitcast pass
; SPIRV-Opt-NEXT: Dominator Tree Construction
; SPIRV-Opt-NEXT: Basic Alias Analysis (stateless AA impl)
; SPIRV-Opt-NEXT: Function Alias Analysis Results
; SPIRV-Opt-NEXT: ObjC ARC contraction
; SPIRV-Opt-NEXT: Prepare inline asm insts
; SPIRV-Opt-NEXT: Safe Stack instrumentation pass
; SPIRV-Opt-NEXT: Insert stack protectors
; SPIRV-Opt-NEXT: Analysis containing CSE Info
; SPIRV-Opt-NEXT: Dominator Tree Construction
; SPIRV-Opt-NEXT: Natural Loop Information
; SPIRV-Opt-NEXT: Post-Dominator Tree Construction
; SPIRV-Opt-NEXT: Branch Probability Analysis

View File

@@ -25,6 +25,7 @@
; ENABLED-O1-NEXT: WebAssemblyPostLegalizerCombiner
; ENABLED-NEXT: RegBankSelect
; ENABLED-NEXT: Analysis for ComputingKnownBits
; ENABLED-O1-NEXT: Dominator Tree Construction
; ENABLED-O1-NEXT: Natural Loop Information
; ENABLED-O1-NEXT: Lazy Branch Probability Analysis
; ENABLED-O1-NEXT: Lazy Block Frequency Analysis

View File

@@ -79,6 +79,7 @@
; O2-NEXT: require<collector-metadata>
; O2-NEXT: require<runtime-libcall-info>
; O2-NEXT: require<libcall-lowering-info>
; O2-NEXT: function(objc-arc-contract)
; O2-NEXT: pre-isel-intrinsic-lowering
; O2-NEXT: function(expand-ir-insts<O2>
; O2-NEXT: atomic-expand
@@ -103,7 +104,6 @@
; O2-NEXT: indirectbr-expand
; O2-NEXT: codegenprepare
; O2-NEXT: dwarf-eh-prepare
; O2-NEXT: objc-arc-contract
; O2-NEXT: inline-asm-prepare
; O2-NEXT: safe-stack
; O2-NEXT: stack-protector
@@ -267,6 +267,7 @@
; O3-WINDOWS-NEXT: require<collector-metadata>
; O3-WINDOWS-NEXT: require<runtime-libcall-info>
; O3-WINDOWS-NEXT: require<libcall-lowering-info>
; O3-WINDOWS-NEXT: function(objc-arc-contract)
; O3-WINDOWS-NEXT: pre-isel-intrinsic-lowering
; O3-WINDOWS-NEXT: function(expand-ir-insts<O3>
; O3-WINDOWS-NEXT: atomic-expand
@@ -293,7 +294,6 @@
; O3-WINDOWS-NEXT: codegenprepare
; O3-WINDOWS-NEXT: win-eh-prepare
; O3-WINDOWS-NEXT: dwarf-eh-prepare
; O3-WINDOWS-NEXT: objc-arc-contract
; O3-WINDOWS-NEXT: inline-asm-prepare
; O3-WINDOWS-NEXT: safe-stack
; O3-WINDOWS-NEXT: stack-protector

View File

@@ -17,8 +17,8 @@
; CHECK-NEXT: Target Pass Configuration
; CHECK-NEXT: Machine Module Information
; CHECK-NEXT: Target Transform Information
; CHECK-NEXT: Library Function Lowering Analysis
; CHECK-NEXT: Assumption Cache Tracker
; CHECK-NEXT: Library Function Lowering Analysis
; CHECK-NEXT: Type-Based Alias Analysis
; CHECK-NEXT: Scoped NoAlias Alias Analysis
; CHECK-NEXT: Profile summary info
@@ -27,6 +27,11 @@
; CHECK-NEXT: Default Regalloc Eviction Advisor
; CHECK-NEXT: Default Regalloc Priority Advisor
; CHECK-NEXT: ModulePass Manager
; CHECK-NEXT: FunctionPass Manager
; CHECK-NEXT: Dominator Tree Construction
; CHECK-NEXT: Basic Alias Analysis (stateless AA impl)
; CHECK-NEXT: Function Alias Analysis Results
; CHECK-NEXT: ObjC ARC contraction
; CHECK-NEXT: Pre-ISel Intrinsic Lowering
; CHECK-NEXT: FunctionPass Manager
; CHECK-NEXT: Expand IR instructions
@@ -76,9 +81,6 @@
; CHECK-NEXT: CodeGen Prepare
; CHECK-NEXT: Dominator Tree Construction
; CHECK-NEXT: Exception handling preparation
; CHECK-NEXT: Basic Alias Analysis (stateless AA impl)
; CHECK-NEXT: Function Alias Analysis Results
; CHECK-NEXT: ObjC ARC contraction
; CHECK-NEXT: Prepare inline asm insts
; CHECK-NEXT: Safe Stack instrumentation pass
; CHECK-NEXT: Insert stack protectors
@@ -233,9 +235,12 @@
; CHECK-NEXT: X86 Assembly Printer
; CHECK-NEXT: Free MachineFunction
; We should only have one function pass manager.
; In the past, module passes have accidentally been added into the middle of
; the codegen pipeline, implicitly creating new function pass managers.
; We should only have two function pass managers: one for ObjCARCContract
; (which must run before the PreISelIntrinsicLowering module pass), and one
; for everything else. In the past, module passes have accidentally been added
; into the middle of the codegen pipeline, implicitly creating new function
; pass managers.
; FPM: FunctionPass Manager
; FPM: FunctionPass Manager
; FPM-NOT: FunctionPass Manager