MCPcopy Create free account
hub / github.com/AliveToolkit/alive2 / getAlign

Method getAlign

ir/instr.cpp:2339–2348  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2337}
2338
2339uint64_t FnCall::getAlign() const {
2340 uint64_t align = 1;
2341 // TODO: add support for non constant alignments
2342 if (auto *arg = getAlignArg())
2343 align = getIntOr(*arg, 1);
2344
2345 return max(align,
2346 attrs.has(FnAttrs::Align) ? attrs.align :
2347 (attrs.isAlloc() ? heap_block_alignment : 1));
2348}
2349
2350uint64_t FnCall::getMaxAccessSize() const {
2351 uint64_t sz = attrs.has(FnAttrs::Dereferenceable) ? attrs.derefBytes : 0;

Callers 4

preprocessMethod · 0.45
alignmentMethod · 0.45
pref_alignmentMethod · 0.45
get_operandFunction · 0.45

Calls 3

getIntOrFunction · 0.85
isAllocMethod · 0.80
hasMethod · 0.45

Tested by

no test coverage detected