mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-24 23:28:41 +00:00
[FaultMaps] Let the frontend pre-select implicit null check candidates.
Summary: This change introduces a !make.implicit metadata that allows the frontend to pre-select the set of explicit null checks that will be considered for transformation into implicit null checks. The reason for not using profiling data instead of !make.implicit is explained in the change to `FaultMaps.rst`. Reviewers: atrick, reames, pgavlin, JosephTremoulet Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D10824 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241116 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -124,6 +124,13 @@ bool ImplicitNullChecks::analyzeBlockForNullChecks(
|
||||
MachineBasicBlock &MBB, SmallVectorImpl<NullCheck> &NullCheckList) {
|
||||
typedef TargetInstrInfo::MachineBranchPredicate MachineBranchPredicate;
|
||||
|
||||
MDNode *BranchMD =
|
||||
MBB.getBasicBlock()
|
||||
? MBB.getBasicBlock()->getTerminator()->getMetadata("make.implicit")
|
||||
: nullptr;
|
||||
if (!BranchMD)
|
||||
return false;
|
||||
|
||||
MachineBranchPredicate MBP;
|
||||
|
||||
if (TII->AnalyzeBranchPredicate(MBB, MBP, true))
|
||||
|
Reference in New Issue
Block a user