LLVM 18.0.0git
Function.h
Go to the documentation of this file.
1//===- llvm/Function.h - Class to represent a single function ---*- C++ -*-===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8//
9// This file contains the declaration of the Function class, which represents a
10// single function/procedure in LLVM.
11//
12// A function basically consists of a list of basic blocks, a list of arguments,
13// and a symbol table.
14//
15//===----------------------------------------------------------------------===//
16
17#ifndef LLVM_IR_FUNCTION_H
18#define LLVM_IR_FUNCTION_H
19
20#include "llvm/ADT/DenseSet.h"
21#include "llvm/ADT/StringRef.h"
22#include "llvm/ADT/Twine.h"
23#include "llvm/ADT/ilist_node.h"
25#include "llvm/IR/Argument.h"
26#include "llvm/IR/Attributes.h"
27#include "llvm/IR/BasicBlock.h"
28#include "llvm/IR/CallingConv.h"
31#include "llvm/IR/GlobalValue.h"
34#include "llvm/IR/Value.h"
35#include <cassert>
36#include <cstddef>
37#include <cstdint>
38#include <memory>
39#include <string>
40
41namespace llvm {
42
43namespace Intrinsic {
44typedef unsigned ID;
45}
46
47class AssemblyAnnotationWriter;
48class Constant;
49struct DenormalMode;
50class DISubprogram;
51class LLVMContext;
52class Module;
53class raw_ostream;
54class Type;
55class User;
56class BranchProbabilityInfo;
57class BlockFrequencyInfo;
58
60 public ilist_node<Function> {
61public:
63
64 // BasicBlock iterators...
67
70
71private:
72 // Important things that make up a function!
73 BasicBlockListType BasicBlocks; ///< The basic blocks
74 mutable Argument *Arguments = nullptr; ///< The formal arguments
75 size_t NumArgs;
76 std::unique_ptr<ValueSymbolTable>
77 SymTab; ///< Symbol table of args/instructions
78 AttributeList AttributeSets; ///< Parameter attributes
79
80 /*
81 * Value::SubclassData
82 *
83 * bit 0 : HasLazyArguments
84 * bit 1 : HasPrefixData
85 * bit 2 : HasPrologueData
86 * bit 3 : HasPersonalityFn
87 * bits 4-13 : CallingConvention
88 * bits 14 : HasGC
89 * bits 15 : [reserved]
90 */
91
92 /// Bits from GlobalObject::GlobalObjectSubclassData.
93 enum {
94 /// Whether this function is materializable.
95 IsMaterializableBit = 0,
96 };
97
98 friend class SymbolTableListTraits<Function>;
99
100 /// hasLazyArguments/CheckLazyArguments - The argument list of a function is
101 /// built on demand, so that the list isn't allocated until the first client
102 /// needs it. The hasLazyArguments predicate returns true if the arg list
103 /// hasn't been set up yet.
104public:
105 bool hasLazyArguments() const {
106 return getSubclassDataFromValue() & (1<<0);
107 }
108
109private:
110 void CheckLazyArguments() const {
111 if (hasLazyArguments())
112 BuildLazyArguments();
113 }
114
115 void BuildLazyArguments() const;
116
117 void clearArguments();
118
119 void deleteBodyImpl(bool ShouldDrop);
120
121 /// Function ctor - If the (optional) Module argument is specified, the
122 /// function is automatically inserted into the end of the function list for
123 /// the module.
124 ///
125 Function(FunctionType *Ty, LinkageTypes Linkage, unsigned AddrSpace,
126 const Twine &N = "", Module *M = nullptr);
127
128public:
129 Function(const Function&) = delete;
130 void operator=(const Function&) = delete;
131 ~Function();
132
133 // This is here to help easily convert from FunctionT * (Function * or
134 // MachineFunction *) in BlockFrequencyInfoImpl to Function * by calling
135 // FunctionT->getFunction().
136 const Function &getFunction() const { return *this; }
137
139 unsigned AddrSpace, const Twine &N = "",
140 Module *M = nullptr) {
141 return new Function(Ty, Linkage, AddrSpace, N, M);
142 }
143
144 // TODO: remove this once all users have been updated to pass an AddrSpace
146 const Twine &N = "", Module *M = nullptr) {
147 return new Function(Ty, Linkage, static_cast<unsigned>(-1), N, M);
148 }
149
150 /// Creates a new function and attaches it to a module.
151 ///
152 /// Places the function in the program address space as specified
153 /// by the module's data layout.
154 static Function *Create(FunctionType *Ty, LinkageTypes Linkage,
155 const Twine &N, Module &M);
156
157 /// Creates a function with some attributes recorded in llvm.module.flags
158 /// applied.
159 ///
160 /// Use this when synthesizing new functions that need attributes that would
161 /// have been set by command line options.
162 static Function *createWithDefaultAttr(FunctionType *Ty, LinkageTypes Linkage,
163 unsigned AddrSpace,
164 const Twine &N = "",
165 Module *M = nullptr);
166
167 // Provide fast operand accessors.
169
170 /// Returns the number of non-debug IR instructions in this function.
171 /// This is equivalent to the sum of the sizes of each basic block contained
172 /// within this function.
173 unsigned getInstructionCount() const;
174
175 /// Returns the FunctionType for me.
177 return cast<FunctionType>(getValueType());
178 }
179
180 /// Returns the type of the ret val.
181 Type *getReturnType() const { return getFunctionType()->getReturnType(); }
182
183 /// getContext - Return a reference to the LLVMContext associated with this
184 /// function.
185 LLVMContext &getContext() const;
186
187 /// isVarArg - Return true if this function takes a variable number of
188 /// arguments.
189 bool isVarArg() const { return getFunctionType()->isVarArg(); }
190
191 bool isMaterializable() const {
192 return getGlobalObjectSubClassData() & (1 << IsMaterializableBit);
193 }
194 void setIsMaterializable(bool V) {
195 unsigned Mask = 1 << IsMaterializableBit;
196 setGlobalObjectSubClassData((~Mask & getGlobalObjectSubClassData()) |
197 (V ? Mask : 0u));
198 }
199
200 /// getIntrinsicID - This method returns the ID number of the specified
201 /// function, or Intrinsic::not_intrinsic if the function is not an
202 /// intrinsic, or if the pointer is null. This value is always defined to be
203 /// zero to allow easy checking for whether a function is intrinsic or not.
204 /// The particular intrinsic functions which correspond to this value are
205 /// defined in llvm/Intrinsics.h.
207
208 /// isIntrinsic - Returns true if the function's name starts with "llvm.".
209 /// It's possible for this function to return true while getIntrinsicID()
210 /// returns Intrinsic::not_intrinsic!
211 bool isIntrinsic() const { return HasLLVMReservedName; }
212
213 /// isTargetIntrinsic - Returns true if IID is an intrinsic specific to a
214 /// certain target. If it is a generic intrinsic false is returned.
215 static bool isTargetIntrinsic(Intrinsic::ID IID);
216
217 /// isTargetIntrinsic - Returns true if this function is an intrinsic and the
218 /// intrinsic is specific to a certain target. If this is not an intrinsic
219 /// or a generic intrinsic, false is returned.
220 bool isTargetIntrinsic() const;
221
222 /// Returns true if the function is one of the "Constrained Floating-Point
223 /// Intrinsics". Returns false if not, and returns false when
224 /// getIntrinsicID() returns Intrinsic::not_intrinsic.
225 bool isConstrainedFPIntrinsic() const;
226
227 static Intrinsic::ID lookupIntrinsicID(StringRef Name);
228
229 /// Recalculate the ID for this function if it is an Intrinsic defined
230 /// in llvm/Intrinsics.h. Sets the intrinsic ID to Intrinsic::not_intrinsic
231 /// if the name of this function does not match an intrinsic in that header.
232 /// Note, this method does not need to be called directly, as it is called
233 /// from Value::setName() whenever the name of this function changes.
234 void recalculateIntrinsicID();
235
236 /// getCallingConv()/setCallingConv(CC) - These method get and set the
237 /// calling convention of this function. The enum values for the known
238 /// calling conventions are defined in CallingConv.h.
240 return static_cast<CallingConv::ID>((getSubclassDataFromValue() >> 4) &
241 CallingConv::MaxID);
242 }
244 auto ID = static_cast<unsigned>(CC);
245 assert(!(ID & ~CallingConv::MaxID) && "Unsupported calling convention");
246 setValueSubclassData((getSubclassDataFromValue() & 0xc00f) | (ID << 4));
247 }
248
249 enum ProfileCountType { PCT_Real, PCT_Synthetic };
250
251 /// Class to represent profile counts.
252 ///
253 /// This class represents both real and synthetic profile counts.
255 private:
256 uint64_t Count = 0;
257 ProfileCountType PCT = PCT_Real;
258
259 public:
261 : Count(Count), PCT(PCT) {}
262 uint64_t getCount() const { return Count; }
263 ProfileCountType getType() const { return PCT; }
264 bool isSynthetic() const { return PCT == PCT_Synthetic; }
265 };
266
267 /// Set the entry count for this function.
268 ///
269 /// Entry count is the number of times this function was executed based on
270 /// pgo data. \p Imports points to a set of GUIDs that needs to
271 /// be imported by the function for sample PGO, to enable the same inlines as
272 /// the profiled optimized binary.
273 void setEntryCount(ProfileCount Count,
274 const DenseSet<GlobalValue::GUID> *Imports = nullptr);
275
276 /// A convenience wrapper for setting entry count
277 void setEntryCount(uint64_t Count, ProfileCountType Type = PCT_Real,
278 const DenseSet<GlobalValue::GUID> *Imports = nullptr);
279
280 /// Get the entry count for this function.
281 ///
282 /// Entry count is the number of times the function was executed.
283 /// When AllowSynthetic is false, only pgo_data will be returned.
284 std::optional<ProfileCount> getEntryCount(bool AllowSynthetic = false) const;
285
286 /// Return true if the function is annotated with profile data.
287 ///
288 /// Presence of entry counts from a profile run implies the function has
289 /// profile annotations. If IncludeSynthetic is false, only return true
290 /// when the profile data is real.
291 bool hasProfileData(bool IncludeSynthetic = false) const {
292 return getEntryCount(IncludeSynthetic).has_value();
293 }
294
295 /// Returns the set of GUIDs that needs to be imported to the function for
296 /// sample PGO, to enable the same inlines as the profiled optimized binary.
297 DenseSet<GlobalValue::GUID> getImportGUIDs() const;
298
299 /// Set the section prefix for this function.
300 void setSectionPrefix(StringRef Prefix);
301
302 /// Get the section prefix for this function.
303 std::optional<StringRef> getSectionPrefix() const;
304
305 /// hasGC/getGC/setGC/clearGC - The name of the garbage collection algorithm
306 /// to use during code generation.
307 bool hasGC() const {
308 return getSubclassDataFromValue() & (1<<14);
309 }
310 const std::string &getGC() const;
311 void setGC(std::string Str);
312 void clearGC();
313
314 /// Return the attribute list for this Function.
315 AttributeList getAttributes() const { return AttributeSets; }
316
317 /// Set the attribute list for this Function.
318 void setAttributes(AttributeList Attrs) { AttributeSets = Attrs; }
319
320 // TODO: remove non-AtIndex versions of these methods.
321 /// adds the attribute to the list of attributes.
322 void addAttributeAtIndex(unsigned i, Attribute Attr);
323
324 /// Add function attributes to this function.
325 void addFnAttr(Attribute::AttrKind Kind);
326
327 /// Add function attributes to this function.
328 void addFnAttr(StringRef Kind, StringRef Val = StringRef());
329
330 /// Add function attributes to this function.
331 void addFnAttr(Attribute Attr);
332
333 /// Add function attributes to this function.
334 void addFnAttrs(const AttrBuilder &Attrs);
335
336 /// Add return value attributes to this function.
337 void addRetAttr(Attribute::AttrKind Kind);
338
339 /// Add return value attributes to this function.
340 void addRetAttr(Attribute Attr);
341
342 /// Add return value attributes to this function.
343 void addRetAttrs(const AttrBuilder &Attrs);
344
345 /// adds the attribute to the list of attributes for the given arg.
346 void addParamAttr(unsigned ArgNo, Attribute::AttrKind Kind);
347
348 /// adds the attribute to the list of attributes for the given arg.
349 void addParamAttr(unsigned ArgNo, Attribute Attr);
350
351 /// adds the attributes to the list of attributes for the given arg.
352 void addParamAttrs(unsigned ArgNo, const AttrBuilder &Attrs);
353
354 /// removes the attribute from the list of attributes.
355 void removeAttributeAtIndex(unsigned i, Attribute::AttrKind Kind);
356
357 /// removes the attribute from the list of attributes.
358 void removeAttributeAtIndex(unsigned i, StringRef Kind);
359
360 /// Remove function attributes from this function.
361 void removeFnAttr(Attribute::AttrKind Kind);
362
363 /// Remove function attribute from this function.
364 void removeFnAttr(StringRef Kind);
365
366 void removeFnAttrs(const AttributeMask &Attrs);
367
368 /// removes the attribute from the return value list of attributes.
369 void removeRetAttr(Attribute::AttrKind Kind);
370
371 /// removes the attribute from the return value list of attributes.
372 void removeRetAttr(StringRef Kind);
373
374 /// removes the attributes from the return value list of attributes.
375 void removeRetAttrs(const AttributeMask &Attrs);
376
377 /// removes the attribute from the list of attributes.
378 void removeParamAttr(unsigned ArgNo, Attribute::AttrKind Kind);
379
380 /// removes the attribute from the list of attributes.
381 void removeParamAttr(unsigned ArgNo, StringRef Kind);
382
383 /// removes the attribute from the list of attributes.
384 void removeParamAttrs(unsigned ArgNo, const AttributeMask &Attrs);
385
386 /// Return true if the function has the attribute.
387 bool hasFnAttribute(Attribute::AttrKind Kind) const;
388
389 /// Return true if the function has the attribute.
390 bool hasFnAttribute(StringRef Kind) const;
391
392 /// check if an attribute is in the list of attributes for the return value.
393 bool hasRetAttribute(Attribute::AttrKind Kind) const;
394
395 /// check if an attributes is in the list of attributes.
396 bool hasParamAttribute(unsigned ArgNo, Attribute::AttrKind Kind) const;
397
398 /// gets the attribute from the list of attributes.
399 Attribute getAttributeAtIndex(unsigned i, Attribute::AttrKind Kind) const;
400
401 /// gets the attribute from the list of attributes.
402 Attribute getAttributeAtIndex(unsigned i, StringRef Kind) const;
403
404 /// Return the attribute for the given attribute kind.
405 Attribute getFnAttribute(Attribute::AttrKind Kind) const;
406
407 /// Return the attribute for the given attribute kind.
408 Attribute getFnAttribute(StringRef Kind) const;
409
410 /// For a string attribute \p Kind, parse attribute as an integer.
411 ///
412 /// \returns \p Default if attribute is not present.
413 ///
414 /// \returns \p Default if there is an error parsing the attribute integer,
415 /// and error is emitted to the LLVMContext
416 uint64_t getFnAttributeAsParsedInteger(StringRef Kind,
417 uint64_t Default = 0) const;
418
419 /// gets the specified attribute from the list of attributes.
420 Attribute getParamAttribute(unsigned ArgNo, Attribute::AttrKind Kind) const;
421
422 /// Return the stack alignment for the function.
424 return AttributeSets.getFnStackAlignment();
425 }
426
427 /// Returns true if the function has ssp, sspstrong, or sspreq fn attrs.
428 bool hasStackProtectorFnAttr() const;
429
430 /// adds the dereferenceable attribute to the list of attributes for
431 /// the given arg.
432 void addDereferenceableParamAttr(unsigned ArgNo, uint64_t Bytes);
433
434 /// adds the dereferenceable_or_null attribute to the list of
435 /// attributes for the given arg.
436 void addDereferenceableOrNullParamAttr(unsigned ArgNo, uint64_t Bytes);
437
438 MaybeAlign getParamAlign(unsigned ArgNo) const {
439 return AttributeSets.getParamAlignment(ArgNo);
440 }
441
442 MaybeAlign getParamStackAlign(unsigned ArgNo) const {
443 return AttributeSets.getParamStackAlignment(ArgNo);
444 }
445
446 /// Extract the byval type for a parameter.
447 Type *getParamByValType(unsigned ArgNo) const {
448 return AttributeSets.getParamByValType(ArgNo);
449 }
450
451 /// Extract the sret type for a parameter.
452 Type *getParamStructRetType(unsigned ArgNo) const {
453 return AttributeSets.getParamStructRetType(ArgNo);
454 }
455
456 /// Extract the inalloca type for a parameter.
457 Type *getParamInAllocaType(unsigned ArgNo) const {
458 return AttributeSets.getParamInAllocaType(ArgNo);
459 }
460
461 /// Extract the byref type for a parameter.
462 Type *getParamByRefType(unsigned ArgNo) const {
463 return AttributeSets.getParamByRefType(ArgNo);
464 }
465
466 /// Extract the preallocated type for a parameter.
467 Type *getParamPreallocatedType(unsigned ArgNo) const {
468 return AttributeSets.getParamPreallocatedType(ArgNo);
469 }
470
471 /// Extract the number of dereferenceable bytes for a parameter.
472 /// @param ArgNo Index of an argument, with 0 being the first function arg.
474 return AttributeSets.getParamDereferenceableBytes(ArgNo);
475 }
476
477 /// Extract the number of dereferenceable_or_null bytes for a
478 /// parameter.
479 /// @param ArgNo AttributeList ArgNo, referring to an argument.
481 return AttributeSets.getParamDereferenceableOrNullBytes(ArgNo);
482 }
483
484 /// Extract the nofpclass attribute for a parameter.
485 FPClassTest getParamNoFPClass(unsigned ArgNo) const {
486 return AttributeSets.getParamNoFPClass(ArgNo);
487 }
488
489 /// Determine if the function is presplit coroutine.
490 bool isPresplitCoroutine() const {
491 return hasFnAttribute(Attribute::PresplitCoroutine);
492 }
493 void setPresplitCoroutine() { addFnAttr(Attribute::PresplitCoroutine); }
494 void setSplittedCoroutine() { removeFnAttr(Attribute::PresplitCoroutine); }
495
496 MemoryEffects getMemoryEffects() const;
497 void setMemoryEffects(MemoryEffects ME);
498
499 /// Determine if the function does not access memory.
500 bool doesNotAccessMemory() const;
502
503 /// Determine if the function does not access or only reads memory.
504 bool onlyReadsMemory() const;
505 void setOnlyReadsMemory();
506
507 /// Determine if the function does not access or only writes memory.
508 bool onlyWritesMemory() const;
509 void setOnlyWritesMemory();
510
511 /// Determine if the call can access memmory only using pointers based
512 /// on its arguments.
513 bool onlyAccessesArgMemory() const;
515
516 /// Determine if the function may only access memory that is
517 /// inaccessible from the IR.
518 bool onlyAccessesInaccessibleMemory() const;
520
521 /// Determine if the function may only access memory that is
522 /// either inaccessible from the IR or pointed to by its arguments.
523 bool onlyAccessesInaccessibleMemOrArgMem() const;
525
526 /// Determine if the function cannot return.
527 bool doesNotReturn() const {
528 return hasFnAttribute(Attribute::NoReturn);
529 }
531 addFnAttr(Attribute::NoReturn);
532 }
533
534 /// Determine if the function should not perform indirect branch tracking.
535 bool doesNoCfCheck() const { return hasFnAttribute(Attribute::NoCfCheck); }
536
537 /// Determine if the function cannot unwind.
538 bool doesNotThrow() const {
539 return hasFnAttribute(Attribute::NoUnwind);
540 }
542 addFnAttr(Attribute::NoUnwind);
543 }
544
545 /// Determine if the call cannot be duplicated.
546 bool cannotDuplicate() const {
547 return hasFnAttribute(Attribute::NoDuplicate);
548 }
550 addFnAttr(Attribute::NoDuplicate);
551 }
552
553 /// Determine if the call is convergent.
554 bool isConvergent() const {
555 return hasFnAttribute(Attribute::Convergent);
556 }
558 addFnAttr(Attribute::Convergent);
559 }
561 removeFnAttr(Attribute::Convergent);
562 }
563
564 /// Determine if the call has sideeffects.
565 bool isSpeculatable() const {
566 return hasFnAttribute(Attribute::Speculatable);
567 }
569 addFnAttr(Attribute::Speculatable);
570 }
571
572 /// Determine if the call might deallocate memory.
573 bool doesNotFreeMemory() const {
574 return onlyReadsMemory() || hasFnAttribute(Attribute::NoFree);
575 }
577 addFnAttr(Attribute::NoFree);
578 }
579
580 /// Determine if the call can synchroize with other threads
581 bool hasNoSync() const {
582 return hasFnAttribute(Attribute::NoSync);
583 }
584 void setNoSync() {
585 addFnAttr(Attribute::NoSync);
586 }
587
588 /// Determine if the function is known not to recurse, directly or
589 /// indirectly.
590 bool doesNotRecurse() const {
591 return hasFnAttribute(Attribute::NoRecurse);
592 }
594 addFnAttr(Attribute::NoRecurse);
595 }
596
597 /// Determine if the function is required to make forward progress.
598 bool mustProgress() const {
599 return hasFnAttribute(Attribute::MustProgress) ||
600 hasFnAttribute(Attribute::WillReturn);
601 }
602 void setMustProgress() { addFnAttr(Attribute::MustProgress); }
603
604 /// Determine if the function will return.
605 bool willReturn() const { return hasFnAttribute(Attribute::WillReturn); }
606 void setWillReturn() { addFnAttr(Attribute::WillReturn); }
607
608 /// Get what kind of unwind table entry to generate for this function.
610 return AttributeSets.getUWTableKind();
611 }
612
613 /// True if the ABI mandates (or the user requested) that this
614 /// function be in a unwind table.
615 bool hasUWTable() const {
616 return getUWTableKind() != UWTableKind::None;
617 }
619 addFnAttr(Attribute::getWithUWTableKind(getContext(), K));
620 }
621 /// True if this function needs an unwind table.
623 return hasUWTable() || !doesNotThrow() || hasPersonalityFn();
624 }
625
626 /// Determine if the function returns a structure through first
627 /// or second pointer argument.
628 bool hasStructRetAttr() const {
629 return AttributeSets.hasParamAttr(0, Attribute::StructRet) ||
630 AttributeSets.hasParamAttr(1, Attribute::StructRet);
631 }
632
633 /// Determine if the parameter or return value is marked with NoAlias
634 /// attribute.
635 bool returnDoesNotAlias() const {
636 return AttributeSets.hasRetAttr(Attribute::NoAlias);
637 }
638 void setReturnDoesNotAlias() { addRetAttr(Attribute::NoAlias); }
639
640 /// Do not optimize this function (-O0).
641 bool hasOptNone() const { return hasFnAttribute(Attribute::OptimizeNone); }
642
643 /// Optimize this function for minimum size (-Oz).
644 bool hasMinSize() const { return hasFnAttribute(Attribute::MinSize); }
645
646 /// Optimize this function for size (-Os) or minimum size (-Oz).
647 bool hasOptSize() const {
648 return hasFnAttribute(Attribute::OptimizeForSize) || hasMinSize();
649 }
650
651 /// Returns the denormal handling type for the default rounding mode of the
652 /// function.
653 DenormalMode getDenormalMode(const fltSemantics &FPType) const;
654
655 /// Return the representational value of "denormal-fp-math". Code interested
656 /// in the semantics of the function should use getDenormalMode instead.
657 DenormalMode getDenormalModeRaw() const;
658
659 /// Return the representational value of "denormal-fp-math-f32". Code
660 /// interested in the semantics of the function should use getDenormalMode
661 /// instead.
662 DenormalMode getDenormalModeF32Raw() const;
663
664 /// copyAttributesFrom - copy all additional attributes (those not needed to
665 /// create a Function) from the Function Src to this one.
666 void copyAttributesFrom(const Function *Src);
667
668 /// deleteBody - This method deletes the body of the function, and converts
669 /// the linkage to external.
670 ///
671 void deleteBody() {
672 deleteBodyImpl(/*ShouldDrop=*/false);
673 setLinkage(ExternalLinkage);
674 }
675
676 /// removeFromParent - This method unlinks 'this' from the containing module,
677 /// but does not delete it.
678 ///
679 void removeFromParent();
680
681 /// eraseFromParent - This method unlinks 'this' from the containing module
682 /// and deletes it.
683 ///
684 void eraseFromParent();
685
686 /// Steal arguments from another function.
687 ///
688 /// Drop this function's arguments and splice in the ones from \c Src.
689 /// Requires that this has no function body.
690 void stealArgumentListFrom(Function &Src);
691
692 /// Insert \p BB in the basic block list at \p Position. \Returns an iterator
693 /// to the newly inserted BB.
695 return BasicBlocks.insert(Position, BB);
696 }
697
698 /// Transfer all blocks from \p FromF to this function at \p ToIt.
699 void splice(Function::iterator ToIt, Function *FromF) {
700 splice(ToIt, FromF, FromF->begin(), FromF->end());
701 }
702
703 /// Transfer one BasicBlock from \p FromF at \p FromIt to this function
704 /// at \p ToIt.
706 Function::iterator FromIt) {
707 auto FromItNext = std::next(FromIt);
708 // Single-element splice is a noop if destination == source.
709 if (ToIt == FromIt || ToIt == FromItNext)
710 return;
711 splice(ToIt, FromF, FromIt, FromItNext);
712 }
713
714 /// Transfer a range of basic blocks that belong to \p FromF from \p
715 /// FromBeginIt to \p FromEndIt, to this function at \p ToIt.
716 void splice(Function::iterator ToIt, Function *FromF,
717 Function::iterator FromBeginIt,
718 Function::iterator FromEndIt);
719
720 /// Erases a range of BasicBlocks from \p FromIt to (not including) \p ToIt.
721 /// \Returns \p ToIt.
723
724private:
725 // These need access to the underlying BB list.
726 friend void BasicBlock::removeFromParent();
727 friend iplist<BasicBlock>::iterator BasicBlock::eraseFromParent();
728 template <class BB_t, class BB_i_t, class BI_t, class II_t>
729 friend class InstIterator;
731 friend class llvm::ilist_node_with_parent<llvm::BasicBlock, llvm::Function>;
732
733 /// Get the underlying elements of the Function... the basic block list is
734 /// empty for external functions.
735 ///
736 /// This is deliberately private because we have implemented an adequate set
737 /// of functions to modify the list, including Function::splice(),
738 /// Function::erase(), Function::insert() etc.
739 const BasicBlockListType &getBasicBlockList() const { return BasicBlocks; }
740 BasicBlockListType &getBasicBlockList() { return BasicBlocks; }
741
742 static BasicBlockListType Function::*getSublistAccess(BasicBlock*) {
743 return &Function::BasicBlocks;
744 }
745
746public:
747 const BasicBlock &getEntryBlock() const { return front(); }
748 BasicBlock &getEntryBlock() { return front(); }
749
750 //===--------------------------------------------------------------------===//
751 // Symbol Table Accessing functions...
752
753 /// getSymbolTable() - Return the symbol table if any, otherwise nullptr.
754 ///
755 inline ValueSymbolTable *getValueSymbolTable() { return SymTab.get(); }
756 inline const ValueSymbolTable *getValueSymbolTable() const {
757 return SymTab.get();
758 }
759
760 //===--------------------------------------------------------------------===//
761 // BasicBlock iterator forwarding functions
762 //
763 iterator begin() { return BasicBlocks.begin(); }
764 const_iterator begin() const { return BasicBlocks.begin(); }
765 iterator end () { return BasicBlocks.end(); }
766 const_iterator end () const { return BasicBlocks.end(); }
767
768 size_t size() const { return BasicBlocks.size(); }
769 bool empty() const { return BasicBlocks.empty(); }
770 const BasicBlock &front() const { return BasicBlocks.front(); }
771 BasicBlock &front() { return BasicBlocks.front(); }
772 const BasicBlock &back() const { return BasicBlocks.back(); }
773 BasicBlock &back() { return BasicBlocks.back(); }
774
775/// @name Function Argument Iteration
776/// @{
777
779 CheckLazyArguments();
780 return Arguments;
781 }
783 CheckLazyArguments();
784 return Arguments;
785 }
786
788 CheckLazyArguments();
789 return Arguments + NumArgs;
790 }
792 CheckLazyArguments();
793 return Arguments + NumArgs;
794 }
795
796 Argument* getArg(unsigned i) const {
797 assert (i < NumArgs && "getArg() out of range!");
798 CheckLazyArguments();
799 return Arguments + i;
800 }
801
803 return make_range(arg_begin(), arg_end());
804 }
806 return make_range(arg_begin(), arg_end());
807 }
808
809/// @}
810
811 size_t arg_size() const { return NumArgs; }
812 bool arg_empty() const { return arg_size() == 0; }
813
814 /// Check whether this function has a personality function.
815 bool hasPersonalityFn() const {
816 return getSubclassDataFromValue() & (1<<3);
817 }
818
819 /// Get the personality function associated with this function.
820 Constant *getPersonalityFn() const;
821 void setPersonalityFn(Constant *Fn);
822
823 /// Check whether this function has prefix data.
824 bool hasPrefixData() const {
825 return getSubclassDataFromValue() & (1<<1);
826 }
827
828 /// Get the prefix data associated with this function.
829 Constant *getPrefixData() const;
830 void setPrefixData(Constant *PrefixData);
831
832 /// Check whether this function has prologue data.
833 bool hasPrologueData() const {
834 return getSubclassDataFromValue() & (1<<2);
835 }
836
837 /// Get the prologue data associated with this function.
838 Constant *getPrologueData() const;
839 void setPrologueData(Constant *PrologueData);
840
841 /// Print the function to an output stream with an optional
842 /// AssemblyAnnotationWriter.
843 void print(raw_ostream &OS, AssemblyAnnotationWriter *AAW = nullptr,
844 bool ShouldPreserveUseListOrder = false,
845 bool IsForDebug = false) const;
846
847 /// viewCFG - This function is meant for use from the debugger. You can just
848 /// say 'call F->viewCFG()' and a ghostview window should pop up from the
849 /// program, displaying the CFG of the current function with the code for each
850 /// basic block inside. This depends on there being a 'dot' and 'gv' program
851 /// in your path.
852 ///
853 void viewCFG() const;
854
855 /// Extended form to print edge weights.
856 void viewCFG(bool ViewCFGOnly, const BlockFrequencyInfo *BFI,
857 const BranchProbabilityInfo *BPI) const;
858
859 /// viewCFGOnly - This function is meant for use from the debugger. It works
860 /// just like viewCFG, but it does not include the contents of basic blocks
861 /// into the nodes, just the label. If you are only interested in the CFG
862 /// this can make the graph smaller.
863 ///
864 void viewCFGOnly() const;
865
866 /// Extended form to print edge weights.
867 void viewCFGOnly(const BlockFrequencyInfo *BFI,
868 const BranchProbabilityInfo *BPI) const;
869
870 /// Methods for support type inquiry through isa, cast, and dyn_cast:
871 static bool classof(const Value *V) {
872 return V->getValueID() == Value::FunctionVal;
873 }
874
875 /// dropAllReferences() - This method causes all the subinstructions to "let
876 /// go" of all references that they are maintaining. This allows one to
877 /// 'delete' a whole module at a time, even though there may be circular
878 /// references... first all references are dropped, and all use counts go to
879 /// zero. Then everything is deleted for real. Note that no operations are
880 /// valid on an object that has "dropped all references", except operator
881 /// delete.
882 ///
883 /// Since no other object in the module can have references into the body of a
884 /// function, dropping all references deletes the entire body of the function,
885 /// including any contained basic blocks.
886 ///
888 deleteBodyImpl(/*ShouldDrop=*/true);
889 }
890
891 /// hasAddressTaken - returns true if there are any uses of this function
892 /// other than direct calls or invokes to it, or blockaddress expressions.
893 /// Optionally passes back an offending user for diagnostic purposes,
894 /// ignores callback uses, assume like pointer annotation calls, references in
895 /// llvm.used and llvm.compiler.used variables, operand bundle
896 /// "clang.arc.attachedcall", and direct calls with a different call site
897 /// signature (the function is implicitly casted).
898 bool hasAddressTaken(const User ** = nullptr, bool IgnoreCallbackUses = false,
899 bool IgnoreAssumeLikeCalls = true,
900 bool IngoreLLVMUsed = false,
901 bool IgnoreARCAttachedCall = false,
902 bool IgnoreCastedDirectCall = false) const;
903
904 /// isDefTriviallyDead - Return true if it is trivially safe to remove
905 /// this function definition from the module (because it isn't externally
906 /// visible, does not have its address taken, and has no callers). To make
907 /// this more accurate, call removeDeadConstantUsers first.
908 bool isDefTriviallyDead() const;
909
910 /// callsFunctionThatReturnsTwice - Return true if the function has a call to
911 /// setjmp or other function that gcc recognizes as "returning twice".
912 bool callsFunctionThatReturnsTwice() const;
913
914 /// Set the attached subprogram.
915 ///
916 /// Calls \a setMetadata() with \a LLVMContext::MD_dbg.
917 void setSubprogram(DISubprogram *SP);
918
919 /// Get the attached subprogram.
920 ///
921 /// Calls \a getMetadata() with \a LLVMContext::MD_dbg and casts the result
922 /// to \a DISubprogram.
924
925 /// Returns true if we should emit debug info for profiling.
926 bool shouldEmitDebugInfoForProfiling() const;
927
928 /// Check if null pointer dereferencing is considered undefined behavior for
929 /// the function.
930 /// Return value: false => null pointer dereference is undefined.
931 /// Return value: true => null pointer dereference is not undefined.
932 bool nullPointerIsDefined() const;
933
934private:
935 void allocHungoffUselist();
936 template<int Idx> void setHungoffOperand(Constant *C);
937
938 /// Shadow Value::setValueSubclassData with a private forwarding method so
939 /// that subclasses cannot accidentally use it.
940 void setValueSubclassData(unsigned short D) {
941 Value::setValueSubclassData(D);
942 }
943 void setValueSubclassDataBit(unsigned Bit, bool On);
944};
945
946/// Check whether null pointer dereferencing is considered undefined behavior
947/// for a given function or an address space.
948/// Null pointer access in non-zero address space is not considered undefined.
949/// Return value: false => null pointer dereference is undefined.
950/// Return value: true => null pointer dereference is not undefined.
951bool NullPointerIsDefined(const Function *F, unsigned AS = 0);
952
953template <>
955
957
958} // end namespace llvm
959
960#endif // LLVM_IR_FUNCTION_H
aarch64 promote const
AMDGPU Lower Kernel Arguments
static void print(raw_ostream &Out, object::Archive::Kind Kind, T Val)
This file contains the simple types necessary to represent the attributes associated with functions a...
static bool setDoesNotAccessMemory(Function &F)
static bool setOnlyAccessesInaccessibleMemOrArgMem(Function &F)
static bool setOnlyAccessesInaccessibleMemory(Function &F)
static bool setOnlyAccessesArgMemory(Function &F)
static bool setOnlyWritesMemory(Function &F)
static bool setOnlyReadsMemory(Function &F)
static GCRegistry::Add< ShadowStackGC > C("shadow-stack", "Very portable GC for uncooperative code generators")
static GCRegistry::Add< StatepointGC > D("statepoint-example", "an example strategy for statepoint")
static void viewCFG(Function &F, const BlockFrequencyInfo *BFI, const BranchProbabilityInfo *BPI, uint64_t MaxFreq, bool CFGOnly=false)
Definition: CFGPrinter.cpp:84
RelocType Type
Definition: COFFYAML.cpp:391
#define LLVM_READONLY
Definition: Compiler.h:208
#define LLVM_EXTERNAL_VISIBILITY
Definition: Compiler.h:135
static DISubprogram * getSubprogram(bool IsDistinct, Ts &&...Args)
Definition: DIBuilder.cpp:837
This file defines the DenseSet and SmallDenseSet classes.
@ Default
Definition: DwarfDebug.cpp:87
std::string Name
#define F(x, y, z)
Definition: MD5.cpp:55
Machine Check Debug Module
#define DEFINE_TRANSPARENT_OPERAND_ACCESSORS(CLASS, VALUECLASS)
Macro for generating out-of-class operand accessor definitions.
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
raw_pwrite_stream & OS
This class represents an incoming formal argument to a Function.
Definition: Argument.h:28
Type * getParamStructRetType(unsigned ArgNo) const
Return the sret type for the specified function parameter.
uint64_t getParamDereferenceableBytes(unsigned Index) const
Get the number of dereferenceable bytes (or zero if unknown) of an arg.
MaybeAlign getParamAlignment(unsigned ArgNo) const
Return the alignment for the specified function parameter.
Type * getParamInAllocaType(unsigned ArgNo) const
Return the inalloca type for the specified function parameter.
UWTableKind getUWTableKind() const
Get the unwind table kind requested for the function.
Type * getParamPreallocatedType(unsigned ArgNo) const
Return the preallocated type for the specified function parameter.
bool hasParamAttr(unsigned ArgNo, Attribute::AttrKind Kind) const
Return true if the attribute exists for the given argument.
Definition: Attributes.h:767
MaybeAlign getFnStackAlignment() const
Get the stack alignment of the function.
Type * getParamByValType(unsigned ArgNo) const
Return the byval type for the specified function parameter.
MaybeAlign getParamStackAlignment(unsigned ArgNo) const
Return the stack alignment for the specified function parameter.
uint64_t getParamDereferenceableOrNullBytes(unsigned ArgNo) const
Get the number of dereferenceable_or_null bytes (or zero if unknown) of an arg.
FPClassTest getParamNoFPClass(unsigned ArgNo) const
Get the disallowed floating-point classes of the argument value.
Type * getParamByRefType(unsigned ArgNo) const
Return the byref type for the specified function parameter.
bool hasRetAttr(Attribute::AttrKind Kind) const
Return true if the attribute exists for the return value.
Definition: Attributes.h:782
AttrKind
This enumeration lists the attributes that can be associated with parameters, function results,...
Definition: Attributes.h:84
LLVM Basic Block Representation.
Definition: BasicBlock.h:56
BlockFrequencyInfo pass uses BlockFrequencyInfoImpl implementation to estimate IR basic block frequen...
Analysis providing branch probability information.
This is an important base class in LLVM.
Definition: Constant.h:41
Subprogram description.
Implements a dense probed hash-table based set.
Definition: DenseSet.h:271
Class to represent function types.
Definition: DerivedTypes.h:103
Class to represent profile counts.
Definition: Function.h:254
uint64_t getCount() const
Definition: Function.h:262
ProfileCount(uint64_t Count, ProfileCountType PCT)
Definition: Function.h:260
ProfileCountType getType() const
Definition: Function.h:263
void deleteBody()
deleteBody - This method deletes the body of the function, and converts the linkage to external.
Definition: Function.h:671
const ValueSymbolTable * getValueSymbolTable() const
Definition: Function.h:756
bool isConvergent() const
Determine if the call is convergent.
Definition: Function.h:554
static Function * Create(FunctionType *Ty, LinkageTypes Linkage, unsigned AddrSpace, const Twine &N="", Module *M=nullptr)
Definition: Function.h:138
BasicBlock & getEntryBlock()
Definition: Function.h:748
void splice(Function::iterator ToIt, Function *FromF)
Transfer all blocks from FromF to this function at ToIt.
Definition: Function.h:699
const BasicBlock & getEntryBlock() const
Definition: Function.h:747
BasicBlockListType::iterator iterator
Definition: Function.h:65
bool hasOptSize() const
Optimize this function for size (-Os) or minimum size (-Oz).
Definition: Function.h:647
void splice(Function::iterator ToIt, Function *FromF, Function::iterator FromIt)
Transfer one BasicBlock from FromF at FromIt to this function at ToIt.
Definition: Function.h:705
bool empty() const
Definition: Function.h:769
FunctionType * getFunctionType() const
Returns the FunctionType for me.
Definition: Function.h:176
bool isMaterializable() const
Definition: Function.h:191
MaybeAlign getFnStackAlign() const
Return the stack alignment for the function.
Definition: Function.h:423
iterator_range< const_arg_iterator > args() const
Definition: Function.h:805
bool arg_empty() const
Definition: Function.h:812
static bool classof(const Value *V)
Methods for support type inquiry through isa, cast, and dyn_cast:
Definition: Function.h:871
const BasicBlock & front() const
Definition: Function.h:770
const_arg_iterator arg_end() const
Definition: Function.h:791
const_arg_iterator arg_begin() const
Definition: Function.h:782
bool mustProgress() const
Determine if the function is required to make forward progress.
Definition: Function.h:598
bool returnDoesNotAlias() const
Determine if the parameter or return value is marked with NoAlias attribute.
Definition: Function.h:635
bool cannotDuplicate() const
Determine if the call cannot be duplicated.
Definition: Function.h:546
const BasicBlock & back() const
Definition: Function.h:772
void setWillReturn()
Definition: Function.h:606
bool willReturn() const
Determine if the function will return.
Definition: Function.h:605
iterator_range< arg_iterator > args()
Definition: Function.h:802
Intrinsic::ID getIntrinsicID() const LLVM_READONLY
getIntrinsicID - This method returns the ID number of the specified function, or Intrinsic::not_intri...
Definition: Function.h:206
bool doesNotRecurse() const
Determine if the function is known not to recurse, directly or indirectly.
Definition: Function.h:590
bool hasMinSize() const
Optimize this function for minimum size (-Oz).
Definition: Function.h:644
void setDoesNotReturn()
Definition: Function.h:530
bool doesNoCfCheck() const
Determine if the function should not perform indirect branch tracking.
Definition: Function.h:535
void setIsMaterializable(bool V)
Definition: Function.h:194
uint64_t getParamDereferenceableBytes(unsigned ArgNo) const
Extract the number of dereferenceable bytes for a parameter.
Definition: Function.h:473
bool isSpeculatable() const
Determine if the call has sideeffects.
Definition: Function.h:565
bool hasGC() const
hasGC/getGC/setGC/clearGC - The name of the garbage collection algorithm to use during code generatio...
Definition: Function.h:307
CallingConv::ID getCallingConv() const
getCallingConv()/setCallingConv(CC) - These method get and set the calling convention of this functio...
Definition: Function.h:239
Type * getParamByValType(unsigned ArgNo) const
Extract the byval type for a parameter.
Definition: Function.h:447
FPClassTest getParamNoFPClass(unsigned ArgNo) const
Extract the nofpclass attribute for a parameter.
Definition: Function.h:485
bool hasPrefixData() const
Check whether this function has prefix data.
Definition: Function.h:824
void setReturnDoesNotAlias()
Definition: Function.h:638
bool hasPersonalityFn() const
Check whether this function has a personality function.
Definition: Function.h:815
static Function * Create(FunctionType *Ty, LinkageTypes Linkage, const Twine &N="", Module *M=nullptr)
Definition: Function.h:145
AttributeList getAttributes() const
Return the attribute list for this Function.
Definition: Function.h:315
void dropAllReferences()
dropAllReferences() - This method causes all the subinstructions to "let go" of all references that t...
Definition: Function.h:887
void setUWTableKind(UWTableKind K)
Definition: Function.h:618
BasicBlockListType::const_iterator const_iterator
Definition: Function.h:66
UWTableKind getUWTableKind() const
Get what kind of unwind table entry to generate for this function.
Definition: Function.h:609
Type * getParamByRefType(unsigned ArgNo) const
Extract the byref type for a parameter.
Definition: Function.h:462
bool hasNoSync() const
Determine if the call can synchroize with other threads.
Definition: Function.h:581
bool doesNotThrow() const
Determine if the function cannot unwind.
Definition: Function.h:538
arg_iterator arg_end()
Definition: Function.h:787
const Function & getFunction() const
Definition: Function.h:136
iterator begin()
Definition: Function.h:763
const_iterator end() const
Definition: Function.h:766
uint64_t getParamDereferenceableOrNullBytes(unsigned ArgNo) const
Extract the number of dereferenceable_or_null bytes for a parameter.
Definition: Function.h:480
arg_iterator arg_begin()
Definition: Function.h:778
bool isIntrinsic() const
isIntrinsic - Returns true if the function's name starts with "llvm.".
Definition: Function.h:211
bool hasProfileData(bool IncludeSynthetic=false) const
Return true if the function is annotated with profile data.
Definition: Function.h:291
const_iterator begin() const
Definition: Function.h:764
void setConvergent()
Definition: Function.h:557
void setPresplitCoroutine()
Definition: Function.h:493
size_t size() const
Definition: Function.h:768
MaybeAlign getParamAlign(unsigned ArgNo) const
Definition: Function.h:438
void setSpeculatable()
Definition: Function.h:568
ValueSymbolTable * getValueSymbolTable()
getSymbolTable() - Return the symbol table if any, otherwise nullptr.
Definition: Function.h:755
bool hasOptNone() const
Do not optimize this function (-O0).
Definition: Function.h:641
void setCannotDuplicate()
Definition: Function.h:549
Type * getParamPreallocatedType(unsigned ArgNo) const
Extract the preallocated type for a parameter.
Definition: Function.h:467
void setAttributes(AttributeList Attrs)
Set the attribute list for this Function.
Definition: Function.h:318
bool isPresplitCoroutine() const
Determine if the function is presplit coroutine.
Definition: Function.h:490
BasicBlock & back()
Definition: Function.h:773
bool hasStructRetAttr() const
Determine if the function returns a structure through first or second pointer argument.
Definition: Function.h:628
Function::iterator insert(Function::iterator Position, BasicBlock *BB)
Insert BB in the basic block list at Position.
Definition: Function.h:694
void setNotConvergent()
Definition: Function.h:560
bool doesNotFreeMemory() const
Determine if the call might deallocate memory.
Definition: Function.h:573
Type * getParamInAllocaType(unsigned ArgNo) const
Extract the inalloca type for a parameter.
Definition: Function.h:457
bool doesNotReturn() const
Determine if the function cannot return.
Definition: Function.h:527
BasicBlock & front()
Definition: Function.h:771
void setSplittedCoroutine()
Definition: Function.h:494
MaybeAlign getParamStackAlign(unsigned ArgNo) const
Definition: Function.h:442
size_t arg_size() const
Definition: Function.h:811
void setNoSync()
Definition: Function.h:584
bool hasUWTable() const
True if the ABI mandates (or the user requested) that this function be in a unwind table.
Definition: Function.h:615
void operator=(const Function &)=delete
Type * getReturnType() const
Returns the type of the ret val.
Definition: Function.h:181
bool needsUnwindTableEntry() const
True if this function needs an unwind table.
Definition: Function.h:622
bool hasLazyArguments() const
hasLazyArguments/CheckLazyArguments - The argument list of a function is built on demand,...
Definition: Function.h:105
iterator end()
Definition: Function.h:765
void setCallingConv(CallingConv::ID CC)
Definition: Function.h:243
Function(const Function &)=delete
bool hasPrologueData() const
Check whether this function has prologue data.
Definition: Function.h:833
Type * getParamStructRetType(unsigned ArgNo) const
Extract the sret type for a parameter.
Definition: Function.h:452
DECLARE_TRANSPARENT_OPERAND_ACCESSORS(Value)
void setDoesNotRecurse()
Definition: Function.h:593
Argument * getArg(unsigned i) const
Definition: Function.h:796
bool isVarArg() const
isVarArg - Return true if this function takes a variable number of arguments.
Definition: Function.h:189
void setMustProgress()
Definition: Function.h:602
void setDoesNotFreeMemory()
Definition: Function.h:576
void setDoesNotThrow()
Definition: Function.h:541
LinkageTypes
An enumeration for the kinds of linkage for global values.
Definition: GlobalValue.h:47
This is an important class for using LLVM in a threaded context.
Definition: LLVMContext.h:67
A Module instance is used to store all the information related to an LLVM module.
Definition: Module.h:65
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.
Definition: SmallVector.h:1200
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:50
Twine - A lightweight data structure for efficiently representing the concatenation of temporary valu...
Definition: Twine.h:81
The instances of the Type class are immutable: once they are created, they are never changed.
Definition: Type.h:45
This class provides a symbol table of name/value pairs.
LLVM Value Representation.
Definition: Value.h:74
Iterator for intrusive lists based on ilist_node.
An ilist node that can access its parent list.
Definition: ilist_node.h:257
iterator insert(iterator where, pointer New)
Definition: ilist.h:165
A range adaptor for a pair of iterators.
This class implements an extremely fast bulk output stream that can only output to a stream.
Definition: raw_ostream.h:52
This file defines the ilist_node class template, which is a convenient base class for creating classe...
This provides a very simple, boring adaptor for a begin and end iterator into a range type.
@ User
could "use" a pointer
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18
iterator_range< T > make_range(T x, T y)
Convenience function for iterating over sub-ranges.
UWTableKind
Definition: CodeGen.h:120
FPClassTest
Floating-point class tests, supported by 'is_fpclass' intrinsic.
bool NullPointerIsDefined(const Function *F, unsigned AS=0)
Check whether null pointer dereferencing is considered undefined behavior for a given function or an ...
Definition: Function.cpp:1985
#define N
Represent subnormal handling kind for floating point instruction inputs and outputs.
HungoffOperandTraits - determine the allocation regime of the Use array when it is not a prefix to th...
Definition: OperandTraits.h:95
This struct is a compact representation of a valid (power of two) or undefined (0) alignment.
Definition: Alignment.h:117
Compile-time customization of User operands.
Definition: User.h:42