|
LLVM 24.0.0git
|
Cache of the last subtarget returned by getSubtargetImpl. More...
#include "llvm/Target/LastSubtargetCache.h"
Public Member Functions | |
| const SubtargetT * | lookup (AttributeSet NewFnAttrs, const Module *NewM) const |
| Return the last subtarget if the function attributes and module match. | |
| 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. | |
| void | set (AttributeSet NewFnAttrs, const Module *NewM, const AttrsT &NewAttrs, const SubtargetT *NewSubtarget) |
Remember NewSubtarget for these attributes. | |
| void | clear () |
Cache of the last subtarget returned by getSubtargetImpl.
A query hits if the function has the same function attributes and module as the last one, or else the same AttrsT, which must hold every input to the subtarget key, including module-level ones.
Attributes are compared by their uniqued pointers, so the cache must be cleared before it sees functions from a different LLVMContext.
Definition at line 31 of file LastSubtargetCache.h.
|
inline |
Definition at line 64 of file LastSubtargetCache.h.
|
inline |
Return the last subtarget if the function attributes and module match.
Definition at line 39 of file LastSubtargetCache.h.
|
inline |
Return the last subtarget if NewAttrs match, and remember NewFnAttrs and NewM for it.
Definition at line 46 of file LastSubtargetCache.h.
|
inline |
Remember NewSubtarget for these attributes.
Definition at line 56 of file LastSubtargetCache.h.