Copy a range metadata node to a new load instruction.

Synopsis

Declared in <llvm/Transforms/Utils/Local.h>

void
copyRangeMetadata(
    DataLayout const& DL,
    LoadInst const& OldLI,
    MDNode* N,
    LoadInst& NewLI);

Description

This handles mapping it to nonnull metadata if the new load is a pointer load instead of an integer load and the range doesn't cover null.

Parameters

Name

Description

DL

A parsed version of the target data layout string in and methods for querying it.

OldLI

An instruction for reading from memory. This uses the SubclassData field in Value to store whether or not the load is volatile.

N

Metadata node.

NewLI

An instruction for reading from memory. This uses the SubclassData field in Value to store whether or not the load is volatile.

Created with MrDocs