Esi Programmer Manual

0 views
Skip to first unread message

Karoline

unread,
Aug 4, 2024, 2:33:27 PM8/4/24
to preskucyle
Tektronixhereby grants permission and license to owners of Tektronix instruments to download and reproduce the manuals on this website for their own internal or personal use. Manuals for currently supported products may not be reproduced for distribution to others unless specifically authorized in writing by Tektronix, Inc.

A Tektronix manual may have been revised to reflect changes made to the product during its manufacturing life. Thus, different versions of a manual may exist for any given product. Care should be taken to ensure that one obtains the proper manual version for a specific product serial number.


Tektronix cannot provide manuals for measurement products that are no longer eligible for long term support. Tektronix hereby grants permission and license for others to reproduce and distribute copies of any Tektronix measurement product manual, including user manuals, operator's manuals, service manuals, and the like, that (a) have a Tektronix Part Number and (b) are for a measurement product that is no longer supported by Tektronix.


A Tektronix manual may be revised to reflect changes made to the product during its manufacturing life. Thus, different versions of a manual may exist for any given product. Care should be taken to ensure that one obtains the proper manual version for a specific product serial number.


This permission and license does not apply to any manual or other publication that is still available from Tektronix, or to any manual or other publication for a video production product or a color printer product.


Tektronix does not warrant the accuracy or completeness of the information, text, graphics, schematics, parts lists, or other material contained within any measurement product manual or other publication that is not supplied by Tektronix or that is produced or distributed in accordance with the permission and license set forth above.


TEKTRONIX SHALL NOT BE LIABLE FOR ANY DAMAGES WHATSOEVER (INCLUDING, WITHOUT LIMITATION, ANY CONSEQUENTIAL OR INCIDENTAL DAMAGES, DAMAGES FOR LOSS OF PROFITS, BUSINESS INTERRUPTION, OR FOR INFRINGEMENT OF INTELLECTUAL PROPERTY) ARISING OUT OF THE USE OF ANY MEASUREMENT PRODUCT MANUAL OR OTHER PUBLICATION PRODUCED OR DISTRIBUTED IN ACCORDANCE WITH THE PERMISSION AND LICENSE SET FORTH ABOVE.


This document is meant to highlight some of the important classes and interfacesavailable in the LLVM source-base. This manual is not intended to explain whatLLVM is, how it works, and what LLVM code looks like. It assumes that you knowthe basics of LLVM and are interested in writing transformations or otherwiseanalyzing or manipulating the code.


The first section of this document describes general information that is usefulto know when working in the LLVM infrastructure, and the second describes theCore LLVM classes. In the future this manual will be extended with informationdescribing how to use extension libraries, such as dominator information, CFGtraversal routines, and useful utilities like the InstVisitor (doxygen) template.


LLVM makes heavy use of the C++ Standard Template Library (STL), perhaps muchmore than you are used to, or have seen before. Because of this, you might wantto do a little background reading in the techniques used and capabilities of thelibrary. There are many good pages that discuss the STL, and several books onthe subject that you can get, so it will not be discussed in this document.


The isa_and_nonnull operator works just like the isa operator,except that it allows for a null pointer as an argument (which it thenreturns false). This can sometimes be useful, allowing you to combine severalnull checks into one.


The cast_or_null operator works just like the cast operator,except that it allows for a null pointer as an argument (which it thenpropagates). This can sometimes be useful, allowing you to combine severalnull checks into one.


The dyn_cast_or_null operator works just like the dyn_castoperator, except that it allows for a null pointer as an argument (which itthen propagates). This can sometimes be useful, allowing you to combineseveral null checks into one.


These five templates can be used with any classes, whether they have a v-tableor not. If you want to add support for these templates, see the documentHow to set up LLVM-style RTTI for your class hierarchy


These are generic classes, and they need to be able to accept strings which mayhave embedded null characters. Therefore, they cannot simply take a constchar *, and taking a const std::string& requires clients to perform a heapallocation which is usually unnecessary. Instead, many LLVM APIs use aStringRef or a const Twine& for passing strings efficiently.


Similarly, APIs which need to return a string may return a StringRefinstance, which can be used directly or converted to an std::string usingthe str member function. See llvm/ADT/StringRef.h (doxygen) for moreinformation.


You should rarely use the StringRef class directly, because it containspointers to external memory it is not generally safe to store an instance of theclass (unless you know that the external storage will not be freed).StringRef is small and pervasive enough in LLVM that it should always bepassed by value.


The Twine (doxygen)class is an efficient way for APIs to accept concatenated strings. For example,a common LLVM paradigm is to name one instruction based on the name of anotherinstruction with a suffix, for example:


The Twine class is effectively a lightweight rope which points totemporary (stack allocated) objects. Twines can be implicitly constructed asthe result of the plus operator applied to strings (i.e., a C strings, anstd::string, or a StringRef). The twine delays the actual concatenationof strings until it is actually required, at which point it can be efficientlyrendered directly into a character array. This avoids unnecessary heapallocation involved in constructing the temporary results of stringconcatenation. See llvm/ADT/Twine.h (doxygen) and herefor more information.


As with a StringRef, Twine objects point to external memory and shouldalmost never be stored or mentioned directly. They are intended solely for usewhen defining a function which should be able to efficiently accept concatenatedstrings.


The formatv is similar in spirit to printf, but uses a different syntaxwhich borrows heavily from Python and C#. Unlike printf it deduces the typeto be formatted at compile time, so it does not need a format specifier such as%d. This reduces the mental overhead of trying to construct portable formatstrings, especially for platform-specific types like size_t or pointer types.Unlike both printf and Python, it additionally fails to compile if LLVM doesnot know how to format the type. These two properties ensure that the functionis both safer and simpler to use than traditional formatting methods such asthe printf family of functions.


A call to formatv involves a single format string consisting of 0 or morereplacement sequences, followed by a variable length list of replacement values.A replacement sequence is a string of the form N[[,align]:style].


N refers to the 0-based index of the argument from the list of replacementvalues. Note that this means it is possible to reference the same parametermultiple times, possibly with different style and/or alignment options, in any order.


align is an optional string specifying the width of the field to formatthe value into, and the alignment of the value within the field. It is specified asan optional alignment style followed by a positive integral field width. Thealignment style can be one of the characters - (left align), = (center align),or + (right align). The default is right aligned.

3a8082e126
Reply all
Reply to author
Forward
0 new messages