15#ifndef LLVM_TARGET_LASTSUBTARGETCACHE_H
16#define LLVM_TARGET_LASTSUBTARGETCACHE_H
35 const SubtargetT *Subtarget =
nullptr;
40 return Subtarget && FnAttrs == NewFnAttrs && M == NewM ? Subtarget
47 const AttrsT &NewAttrs) {
48 if (!Subtarget || Attrs != NewAttrs)
57 const SubtargetT *NewSubtarget) {
61 Subtarget = NewSubtarget;
This file contains the simple types necessary to represent the attributes associated with functions a...
This class holds the attributes for a particular argument, parameter, function, or return value.
Cache of the last subtarget returned by getSubtargetImpl.
void set(AttributeSet NewFnAttrs, const Module *NewM, const AttrsT &NewAttrs, const SubtargetT *NewSubtarget)
Remember NewSubtarget for these attributes.
const SubtargetT * lookup(AttributeSet NewFnAttrs, const Module *NewM, const AttrsT &NewAttrs)
Return the last subtarget if NewAttrs match, and remember NewFnAttrs and NewM for it.
const SubtargetT * lookup(AttributeSet NewFnAttrs, const Module *NewM) const
Return the last subtarget if the function attributes and module match.
A Module instance is used to store all the information related to an LLVM module.
This is an optimization pass for GlobalISel generic memory operations.