ROSE 0.11.145.147
SgAsmInstruction.h
1
2#ifndef ROSE_SgAsmInstruction_H
3#define ROSE_SgAsmInstruction_H
4#include <RoseFirst.h>
5#include <Cxx_GrammarDeclarations.h>
6#include <SgAsmStatement.h>
7
8
9
10/* #line 1 "/workspace/src/ROSETTA/Grammar/grammarClassDeclarationMacros.macro" */
11
12// WARNING -- GENERATED CODE -- DO NOT MODIFY THIS CODE -- WARNING!
13// This code is automatically generated for each
14// terminal and non-terminal within the defined
15// grammar. There is a simple way to change the
16// code to fix bugs etc. See the ROSE README file
17// for directions.
18
19// tps: (02/22/2010): Adding DLL export requirements
20#include "rosedll.h"
21
22// predeclarations for SgAsmInstruction
23
24/* #line 25 "../../../src/frontend/SageIII//SgAsmInstruction.h" */
25/* #line 43484 "/workspace/src/ROSETTA/src/binaryInstruction.C" */
26
27#include <Rose/BinaryAnalysis/Architecture/BasicTypes.h>
28#include <Rose/BinaryAnalysis/MemoryMap.h>
29#include <sageContainer.h>
30#include <Sawyer/Cached.h>
31
32#ifdef ROSE_SgAsmInstruction_IMPL
33#include <SgAsmExprListExp.h>
34#include <SgAsmOperandList.h>
35#endif
36
37
38/* #line 13 "/workspace/src/ROSETTA/Grammar/grammarClassDeclarationMacros.macro after subst for $PREDECLARATIONS" */
39
40/* #line 14 "/workspace/src/ROSETTA/Grammar/grammarClassDeclarationMacros.macro" */
41
42#if !defined(DOCUMENTATION)
43// Class Definition for SgAsmInstruction
44class ROSE_DLL_API SgAsmInstruction : public SgAsmStatement
45 {
46 public:
47
48
49/* #line 50 "../../../src/frontend/SageIII//SgAsmInstruction.h" */
50
51 virtual SgNode* copy ( SgCopyHelp& help) const override;
52// Start of memberFunctionString
53/* #line 43558 "/workspace/src/ROSETTA/src/binaryInstruction.C" */
54
55
56 //----------------------- Boost serialization for SgAsmInstruction -----------------------
57#ifdef ROSE_HAVE_BOOST_SERIALIZATION_LIB
58private:
59 friend class boost::serialization::access;
60
61 template<class S>
62 void serialize(S &s, const unsigned /*version*/) {
63 debugSerializationBegin("SgAsmInstruction");
64 s & BOOST_SERIALIZATION_BASE_OBJECT_NVP(SgAsmStatement);
65 {
66 auto temp = architectureIdSerialize(p_architectureId);
67 s & boost::serialization::make_nvp("p_architectureId", temp);
68 p_architectureId = architectureIdDeserialize(temp);
69 }
70 s & BOOST_SERIALIZATION_NVP(p_rawBytes);
71 s & BOOST_SERIALIZATION_NVP(p_operandList);
72 s & BOOST_SERIALIZATION_NVP(p_delaySlot);
73 debugSerializationEnd("SgAsmInstruction");
74 }
75#endif // ROSE_HAVE_BOOST_SERIALIZATION_LIB
77 // Local types
79private:
80 struct SemanticFailure {
81 size_t n;
82 SemanticFailure(): n(0) {}
83
84#ifdef ROSE_HAVE_BOOST_SERIALIZATION_LIB
85 private:
86 friend class boost::serialization::access;
87 template<class S>
88 void serialize(S &s, const unsigned /*version*/) {
89 s & BOOST_SERIALIZATION_NVP(n);
90 }
91#endif
92 };
93
95 // Properties
97public:
98public:
110 uint8_t const& get_architectureId() const;
112 // Architecture registration IDs change from run to run, so serialize the architecture name instead. The architecture names
113 // will probably not change as frequently as their registration IDs.
114 std::string architectureIdSerialize(uint8_t id) const;
115 uint8_t architectureIdDeserialize(const std::string &name) const;
116public:
122 SgUnsignedCharList const& get_rawBytes() const;
123 void set_rawBytes(SgUnsignedCharList const&);
126public:
133 SgAsmOperandList* const& get_operandList() const;
134 void set_operandList(SgAsmOperandList* const&);
137public:
150 SgAsmInstruction* const& get_delaySlot() const;
151 void set_delaySlot(SgAsmInstruction* const&);
153 // FIXME[Robb Matzke 2023-03-18]: is the lack of serialization a bug?
154public:
161 int64_t const& get_stackDeltaIn() const;
162 void set_stackDeltaIn(int64_t const&);
164 // FIXME[Robb Matzke 2023-03-18]: is the lack of serialization a bug?
165public:
173 SgAsmExprListExp* const& get_semantics() const;
174 void set_semantics(SgAsmExprListExp* const&);
177 // Non-property data members
179private:
180 SemanticFailure semanticFailure_;
181
182public:
187 static const int64_t INVALID_STACK_DELTA;
188
190 // Functions
192public:
200 Rose::BinaryAnalysis::Architecture::BaseConstPtr architecture() const /*final*/;
201
208 std::string get_mnemonic() const;
209
210 // [Robb Matzke 2023-12-04]: deprecated
211 virtual std::string description() const final ROSE_DEPRECATED("use Architecture::Base::instructionDescription");
212
214 size_t nOperands() const;
215
219 SgAsmExpression* operand(size_t) const;
220
221 // [Robb Matzke 2023-12-04]: deprecated
222 virtual bool terminatesBasicBlock() final ROSE_DEPRECATED("use Architecture::Base::terminatesBasicBlock");
223 virtual bool isFunctionCallFast(const std::vector<SgAsmInstruction*>&, rose_addr_t *target, rose_addr_t *ret) final
224 ROSE_DEPRECATED("use Architecture::Base::isFunctionCallFast");
225 virtual bool isFunctionCallSlow(const std::vector<SgAsmInstruction*>&, rose_addr_t *target, rose_addr_t *ret) final
226 ROSE_DEPRECATED("use Architecture::Base::isFunctionCallSlow");
227 virtual bool isFunctionReturnFast(const std::vector<SgAsmInstruction*>&) final
228 ROSE_DEPRECATED("use Architecture::Base::isFunctionReturnFast");
229 virtual bool isFunctionReturnSlow(const std::vector<SgAsmInstruction*>&) final
230 ROSE_DEPRECATED("use Architecture::Base::isFunctionReturnSlow");
231 virtual Sawyer::Optional<rose_addr_t> branchTarget() final
232 ROSE_DEPRECATED("use Architecture::Base::branchTarget");
233
237 bool isFirstInBlock();
238
242 bool isLastInBlock();
243
378 virtual bool hasEffect();
379
388 virtual bool hasEffect(const std::vector<SgAsmInstruction*>&, bool allow_branch=false,
389 bool relax_stack_semantics=false);
390
400 virtual std::vector<std::pair<size_t,size_t> >
401 findNoopSubsequences(const std::vector<SgAsmInstruction*>& insns, bool allow_branch=false,
402 bool relax_stack_semantics=false);
403
404 // [Robb Matzke 2023-12-04]: deprecated
405 virtual Rose::BinaryAnalysis::AddressSet getSuccessors(bool &complete)
406 ROSE_DEPRECATED("use Architecture::Base::getSuccessors");
407 virtual Rose::BinaryAnalysis::AddressSet getSuccessors(const std::vector<SgAsmInstruction*> &basicBlock,
408 bool &complete,
409 const Rose::BinaryAnalysis::MemoryMap::Ptr &initial_memory =
410 Rose::BinaryAnalysis::MemoryMap::Ptr())
411 ROSE_DEPRECATED("use Architecture::Base::getSuccessors");
412
418 virtual size_t get_size() const;
419
420 // [Robb Matzke 2023-12-05]: deprecated
421 virtual bool isUnknown() const final ROSE_DEPRECATED("use Architecture::Base::isUnknown");
422
456 virtual unsigned get_anyKind() const;
457
461 virtual std::string toString() const;
462
466 virtual std::string toStringNoAddr() const;
467
472 virtual std::set<rose_addr_t> explicitConstants() const;
473
483 size_t semanticFailure() const;
484 void semanticFailure(size_t);
485 void incrementSemanticFailure();
496 bool normalizeOperands();
497
499 // Deprecated 2023-11
501public:
502 const SgUnsignedCharList& get_raw_bytes() const ROSE_DEPRECATED("use get_rawBytes");
503 void set_raw_bytes(const SgUnsignedCharList&) ROSE_DEPRECATED("use set_rawBytes");
504public:
506 virtual ~SgAsmInstruction();
507
508public:
511
512public:
514 SgAsmInstruction(rose_addr_t const& address,
515 uint8_t const& architectureId);
516
517protected:
524 void initializeProperties();
525
526
527// End of memberFunctionString
528// Start of memberFunctionString
529/* #line 1 "/workspace/src/ROSETTA/Grammar/Common.code" */
530
531// *** COMMON CODE SECTION BEGINS HERE ***
532
533 public:
534
535 // DQ (3/25/3006): I put this back in because it had the logic for where the copy function required
536 // and not required which is required to match the other aspects of the copy mechanism code generation.
537 // Specifically it is a problem to declare the copy function everywhere because it is not implemented
538 // for the SgSymbol IR nodes. I'm not clear why it is not implemented for these IR nodes.
539 /* \brief Copies AST (whole subtree, depending on the SgCopyHelp class */
540 // virtual SgNode* copy ( const SgCopyHelp & help) const;
541
543 virtual std::string class_name() const override;
544
546 virtual VariantT variantT() const override; // MS: new variant used in tree traversal
547
549 // King84 (2010.08.16): Moved this to an enum to save space, since it's only used at compiler-time anyway.
550 // static const VariantT static_variant = V_SgAsmInstruction;
551 enum { static_variant = V_SgAsmInstruction };
552
553 /* the generated cast function */
555 ROSE_DLL_API friend SgAsmInstruction* isSgAsmInstruction( SgNode * s );
556
558 ROSE_DLL_API friend const SgAsmInstruction* isSgAsmInstruction( const SgNode * s );
559
560 // ******************************************
561 // * Memory Pool / New / Delete
562 // ******************************************
563
564 public:
566 static const unsigned pool_size; //
568 static std::vector<unsigned char *> pools; //
570 static SgAsmInstruction * next_node; //
571
573 static unsigned long initializeStorageClassArray(SgAsmInstructionStorageClass *); //
574
576 static void clearMemoryPool(); //
577 static void deleteMemoryPool(); //
578
580 static void extendMemoryPoolForFileIO(); //
581
583 static SgAsmInstruction * getPointerFromGlobalIndex(unsigned long); //
585 static SgAsmInstruction * getPointerFromGlobalIndex(AstSpecificDataManagingClass *, unsigned long); //
586
588 static unsigned long getNumberOfValidNodesAndSetGlobalIndexInFreepointer(unsigned long); //
590 static void resetValidFreepointers(); //
592 static unsigned long getNumberOfLastValidPointer(); //
593
594
595#if defined(INLINE_FUNCTIONS)
597 inline void *operator new (size_t size);
598#else
600 void *operator new (size_t size);
601#endif
603 void operator delete (void* pointer, size_t size);
604
605 // DQ (4/5/2007): This is not the correct operator that we want, but appears to be required to compile ROSE with ROSE.
606 void operator delete (void* pointer)
607 {
608 // This is the generated delete operator...
609 SgAsmInstruction::operator delete (pointer,sizeof(SgAsmInstruction));
610 }
611
613 static size_t numberOfNodes();
614
616 static size_t memoryUsage();
617
618 // End of scope which started in IR nodes specific code
619 /* */
620
621 /* name Internal Functions
622 \brief Internal functions ... incomplete-documentation
623
624 These functions have been made public as part of the design, but they are suggested for internal use
625 or by particularly knowledgeable users for specialized tools or applications.
626
627 \internal We could not make these private because they are required by user for special purposes. And
628 it would be unwieldy to have many of the internal classes in ROSE be explicitly defined as friends.
629
630 */
631
632 // MS: 02/12/02 container of pointers to AST successor nodes used in the traversal
633 // overridden in every class by *generated* implementation
635 virtual std::vector<SgNode*> get_traversalSuccessorContainer() override;
636 // MS: 06/28/02 container of names of variables or container indices
637 // used used in the traversal to access AST successor nodes
638 // overridden in every class by *generated* implementation
641 virtual std::vector<std::string> get_traversalSuccessorNamesContainer() override;
642
643 // GB (09/25/2007): Functions for index-based access to traversal successors; these are hopefully a lot faster
644 // than all the vector copies. The implementation for these functions is generated for each class.
646 virtual size_t get_numberOfTraversalSuccessors() override;
648 virtual SgNode *get_traversalSuccessorByIndex(size_t idx) override;
650 virtual size_t get_childIndex(SgNode *child) override;
651
652#ifndef ROSE_USE_INTERNAL_FRONTEND_DEVELOPMENT
653 // MS: 08/16/2002 method for generating RTI information
655 virtual RTIReturnType roseRTI() override;
656#endif
657 /* */
658
659
660
661 /* name Deprecated Functions
662 \brief Deprecated functions ... incomplete-documentation
663
664 These functions have been deprecated from use.
665 */
666 /* */
667
669 virtual const char* sage_class_name() const override ROSE_DEPRECATED_FUNCTION;
670
671 // JJW (10/16/2008): Changed to a single function in Node.code, and put
672 // getVariant() in #if 0 block to prevent confusing Doxygen
673#if 0
675 virtual int variant() const ROSE_DEPRECATED_FUNCTION;
677 // virtual int getVariant() const ROSE_DEPRECATED_FUNCTION;
678#endif
679 /* */
680
681
682
683
684 public:
685 /* name Traversal Support Functions
686 \brief Traversal support functions ... incomplete-documentation
687
688 These functions have been made public as part of the design, but they are suggested for internal use
689 or by particularly knowledgable users for specialized tools or applications.
690 */
691 /* */
692
693 // DQ (11/26/2005): Support for visitor pattern mechanims
694 // (inferior to ROSE traversal mechanism, experimental).
698
699 /* DXN (08/09/2010): support for the classic visitor pattern done in GoF */
701 virtual void accept (ROSE_VisitorPattern & visitor) override;
702
703 // DQ (12/26/2005): Support for traversal based on the memory pool
706 static void traverseMemoryPoolNodes(ROSE_VisitTraversal & visit);
707
711
712 // DQ (2/9/2006): Added to support traversal over single representative of each IR node
713 // This traversal helps support internal tools that call static member functions.
714 // note: this function operates on the memory pools.
717 static void visitRepresentativeNode (ROSE_VisitTraversal & visit);
718 /* */
719
720 public:
721 /* NodeId support functions */
723 static SgNode* getNodeByNodeId(VariantT variantT, size_t poolIdx, size_t itemIdx);
726 static SgAsmInstruction* getNodeByNodeIdInternal(size_t poolIdx, size_t itemIdx);
729 static std::string getNodeIdString(SgAsmInstruction* sgnode);
730 static std::string getNodeIdStringInternal(SgAsmInstruction* sgnode);
731
732 public:
733 /* name Memory Allocation Functions
734 \brief Memory allocations functions ... incomplete-documentation
735
736 These functions have been made public as part of the design, but they are suggested for internal use
737 or by particularly knowledgable users for specialized tools or applications.
738 */
739 /* */
740
751 virtual bool isInMemoryPool() override;
752
763 virtual void checkDataMemberPointersIfInMemoryPool() override;
764
765 // DQ (4/30/2006): Modified to be a const function.
780 virtual std::vector<std::pair<SgNode*,std::string> > returnDataMemberPointers() const override;
781
792
804 virtual long getChildIndex( SgNode* childNode ) const override;
805
806 // DQ (9/2/2015): Since this function is generated by ROSETTA, we can't define the
807 // comment here (changed to be a C style comment and not be a doxygen comment).
808 /* \brief Constructor for use by AST File I/O Mechanism
809
810 This constructor permits the IR node to be rebuilt from the contiguously arranged data in memory
811 which obtained via fast binary file I/O from disk.
812 */
813 // SgAsmInstruction( SgAsmInstructionStorageClass& source );
814
815
816
817
818
819 // JH (10/24/2005): methods added to support the ast file IO
820 private:
821
822 /* name AST Memory Allocation Support Functions
823 \brief Memory allocations support....
824
825 These functions handle the low leve support of the memory allocation scheme which permits IR nodes to be allocated
826 in large contiguous blocks to reduce memory fragmentation, improve performance, support specialized access (AST traversals),
827 and support the AST File I/O Mechanism.
828 */
829 /* */
830
831 /* JH (10/24/2005): Two typedefs. The TestType notes the type every pointer is cast to before
832 we compare them. Since I had several problems with this, I decided to make a typdef to ensure
833 that I use the same type everywhere, if any changes are made. THe second one declares the type
834 (actually unsigned long) where teh pointer address gets converted to. On 64 bit platforms this
835 might got changed, but unfortunatly, the return types are still unsigned longs. There exists
836 a correspinding one in the AST_FILE_IO class!
837 */
838 // DQ (9/2/2015): This typedef is no longer used, we can't define the
839 // comment here (changed to be a C style comment and not be a doxygen comment).
840 /* \brief Typedef used for low level memory access.
841 */
842 // typedef unsigned char* TestType;
843
844 // DQ (9/2/2015): This typedef is no longer used, we can't define the
845 // comment here (changed to be a C style comment and not be a doxygen comment).
846 /* \brief Typedef used to hold memory addresses as values.
847 */
848 // typedef unsigned long AddressType;
849
850
851
852 // necessary, to have direct access to the p_freepointer and the private methods !
854 friend class AST_FILE_IO;
855
857 friend class SgAsmInstructionStorageClass;
858
860 friend class AstSpecificDataManagingClass;
861
863 friend class AstSpecificDataManagingClassStorageClass;
864 public:
866 SgAsmInstruction( const SgAsmInstructionStorageClass& source );
867
868 // private: // JJW hack
869 /*
870 name AST Memory Allocation Support Variables
871 Memory allocations support variables
872
873 These variables handle the low level support of the memory allocation scheme which permits IR nodes to be allocated
874 in large contiguous blocks to reduce memory fragmentation, improve performance, support specialized access (AST traversals),
875 and support the AST File I/O Mechanism.
876 */
877 /* */
878
879 public:
880
881 // DQ (11/21/2009): Added function to add new Regular Expression attributes and return pointer
882 // to current node (so that it will work cleanly with build functions to specify patterns).
883 // virtual SgNode* addRegExpAttribute();
890
891#ifndef _MSC_VER
892// Rasmussen (04/17/2019): Support for ATerms has been deprecated as it is no longer needed
893// and likely never fully implemented nor tested. Files remain in the src tree but are no
894// longer built.
895#define BUILD_ATERM_SUPPORT 0
896 #if BUILD_ATERM_SUPPORT
897 #ifdef ROSE_USE_ROSE_ATERM_SUPPORT
898 // DQ (10/4/2014): Adding ATerm support to ROSE.
908 // Rasmussen (1/7/2019): Added override to kill warning messages of overridden virtual function
909 virtual ATerm generate_ATerm() override;
910
912 virtual void generate_ATerm_Annotation(ATerm & term) override;
913 #endif
914 #endif // BUILD_ATERM_SUPPORT
915#endif
916 // These can't be virtual functions since we don't yet know what IR node to build (until we have read the aterm).
917 // virtual generate_AST(ATerm & term);
918 // virtual void read_ATerm_Annotation(ATerm & term);
919
920// *** COMMON CODE SECTION ENDS HERE ***
921
922
923// End of memberFunctionString
924// Start of memberFunctionString
925/* #line 706 "/workspace/src/ROSETTA/Grammar/Node.code" */
926
927 // the generated cast function
928 // friend ROSE_DLL_API SgAsmInstruction* isSgAsmInstruction ( SgNode* s );
929
930 typedef SgAsmStatement base_node_type;
931
932
933// End of memberFunctionString
934
935
936
937
938
939
940
941 protected:
942// Start of memberFunctionString
943uint8_t p_architectureId;
944
945// End of memberFunctionString
946// Start of memberFunctionString
947SgUnsignedCharList p_rawBytes;
948
949// End of memberFunctionString
950// Start of memberFunctionString
951SgAsmOperandList* p_operandList;
952
953// End of memberFunctionString
954// Start of memberFunctionString
955SgAsmInstruction* p_delaySlot;
956
957// End of memberFunctionString
958// Start of memberFunctionString
959int64_t p_stackDeltaIn;
960
961// End of memberFunctionString
962// Start of memberFunctionString
963SgAsmExprListExp* p_semantics;
964
965// End of memberFunctionString
966
968 friend struct Rose::Traits::generated::describe_field_t<SgAsmInstruction, uint8_t,&SgAsmInstruction::p_architectureId>;
969 friend struct Rose::Traits::generated::describe_field_t<SgAsmInstruction, SgUnsignedCharList,&SgAsmInstruction::p_rawBytes>;
970 friend struct Rose::Traits::generated::describe_field_t<SgAsmInstruction, SgAsmOperandList*,&SgAsmInstruction::p_operandList>;
971 friend struct Rose::Traits::generated::describe_field_t<SgAsmInstruction, SgAsmInstruction*,&SgAsmInstruction::p_delaySlot>;
972 friend struct Rose::Traits::generated::describe_field_t<SgAsmInstruction, int64_t,&SgAsmInstruction::p_stackDeltaIn>;
973 friend struct Rose::Traits::generated::describe_field_t<SgAsmInstruction, SgAsmExprListExp*,&SgAsmInstruction::p_semantics>;
974
975/* #line 21 "/workspace/src/ROSETTA/Grammar/grammarClassDeclarationMacros.macro" */
976
977
978 };
979#endif
980
981// postdeclarations for SgAsmInstruction
982
983/* #line 984 "../../../src/frontend/SageIII//SgAsmInstruction.h" */
984
985/* #line 27 "/workspace/src/ROSETTA/Grammar/grammarClassDeclarationMacros.macro after subst for $POSTDECLARATIONS" */
986
987/* #line 28 "/workspace/src/ROSETTA/Grammar/grammarClassDeclarationMacros.macro" */
988
989
990/* #line 991 "../../../src/frontend/SageIII//SgAsmInstruction.h" */
991
992#endif // ROSE_SgAsmInstruction_H
993
Class holding static data and functions supporting File I/O.
Definition AST_FILE_IO.h:19
Attribute containing a regex expression as a string.
List of expression nodes.
Base class for expressions.
Base class for machine instructions.
List of operands for an instruction.
Base class for statement-like subclasses.
Supporting class from copy mechanism within ROSE.
Definition sageCopy.h:26
This class represents the base class for all IR nodes within Sage III.
virtual size_t get_numberOfTraversalSuccessors()
return number of children in the traversal successor list
virtual RTIReturnType roseRTI()
return C++ Runtime-Time-Information
virtual std::vector< std::string > get_traversalSuccessorNamesContainer()
container of names of variables or container indices used used in the traversal to access AST success...
virtual void debugSerializationEnd(const char *className)
Called by generated serializers.
static std::string getNodeIdString(SgNode *sgnode)
compute the NodeId for a particular SgNode*.
virtual bool isInMemoryPool()
FOR INTERNAL USE This is used in internal tests to verify that all IR nodes are allocated from the he...
int variant() const
Older version function returns enum value "NODE".
virtual void processDataMemberReferenceToPointers(ReferenceToPointerHandler *)
FOR INTERNAL USE Processes pairs of references to SgNode* and strings for use in AST tools
virtual long getChildIndex(SgNode *childNode) const
FOR INTERNAL USE Returns a unique index value for the childNode in the list of children at this IR no...
virtual size_t get_childIndex(SgNode *child)
index-based access to traversal successors by child node
virtual void debugSerializationBegin(const char *className)
Called by generated serializers.
virtual std::vector< SgNode * > get_traversalSuccessorContainer()
container of pointers to AST successor nodes used in the traversal overridden in every class by gener...
static void visitRepresentativeNode(ROSE_VisitTraversal &visit)
FOR INTERNAL USE Support for type-based traversal.
virtual void checkDataMemberPointersIfInMemoryPool()
FOR INTERNAL USE This is used in internal tests to verify that all IR nodes are allocated from the he...
static size_t numberOfNodes()
Returns the total number of IR nodes of this type.
virtual void accept(ROSE_VisitorPattern &visitor)
support for the classic visitor pattern done in GoF
virtual SgNode * get_traversalSuccessorByIndex(size_t idx)
index-based access to traversal successors by index number
static void traverseMemoryPoolVisitorPattern(ROSE_VisitorPattern &visitor)
FOR INTERNAL USE Support for visitor pattern.
void executeVisitorMemberFunction(ROSE_VisitorPattern &visitor)
FOR INTERNAL USE Support for visitor pattern.
static SgNode * getNodeByNodeId(VariantT variantT, size_t poolIdx, size_t itemIdx)
Find a node by its variant type, pool index, and item index.
static size_t memoryUsage()
Returns the size in bytes of the total memory allocated for all IR nodes of this type.
static void traverseMemoryPoolNodes(ROSE_VisitTraversal &visit)
FOR INTERNAL USE Support for visitor pattern over all IR nodes by type of IR node.
virtual const char * sage_class_name() const
generates string representing the class name: (e.g. for SgNode returns "SgNode").
virtual std::vector< std::pair< SgNode *, std::string > > returnDataMemberPointers() const
FOR INTERNAL USE Returns STL vector of pairs of SgNode* and strings for use in AST tools
static SgNode * getNodeByNodeIdInternal(size_t poolIdx, size_t itemIdx)
FOR INTERNAL USE Find an SgNode from its memory pool and location therin.
SgNode * addRegExpAttribute(std::string s, AstRegExAttribute *a)
Support for AST matching using regular expression.
std::shared_ptr< const Base > BaseConstPtr
Reference counted pointer for Architecture::Base.
void serialize(std::ostream &output, Graph &graph)
Serialize a graph into a stream of bytes.
The ROSE library.
void copy(const Word *src, const BitRange &srcRange, Word *dst, const BitRange &dstRange)
Copy some bits.
Sawyer support library.