- Notifications
You must be signed in to change notification settings - Fork24
Fork of LLVM to support AMD AIEngine processors
License
Xilinx/llvm-aie
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
This repository extends the LLVM framework to generate code for use with AMD/Xilinx AI Engine processors.
Architecture | clang/LLVM target | High-Level Intrinsic API (AIE_API) |
---|---|---|
XDNA (Phoenix, Hawk Point) | --target=aie2-none-unknown-elf | Link |
XDNA2 (Strix Point) | --target=aie2p-none-unknown-elf |
Generally speaking, AI Engine processors are in-order, exposed-pipeline VLIW processors. These processors are implemented as part of an array of processors focused on application acceleration targetting AI, Machine Learning, and DSP applications. They have been integrated in a number of commercial devices including theVersal AI Core Series andRyzen-AI SOCs.
Each VLIW instruction bundle specifies the behavior of one or more functional units, which begin executing a new instruction at the same time. The processor pipeline does not include stall logic, and instructions will continue executing in order regardless of other instructions in the pipeline. As a result, the compiler is able to schedule machine instructions which access the same register in ways that potentially overlap. e.g.
1: lda r12, [p0] // writes r12 after cycle 8.2: nop3: nop4: mul r12, r12, r12 // reads r12 initial value and writes r12 after cycle 6.5: mov r14, r12 // reads r12 initial value6: nop7: add r13, r12, r6 // reads r12 from instruction 4.8: nop9: mul r14, r12, r7 // reads r12 from instruction 1.
Other key architectural characteristics include varying width instruction slots between different instruction encodings and relatively small address spaces (20-bit pointer registers). The presence of varying-width instruction slots implies some code alignment restrictions for instructions which are branch or return targets.
In order to support the unusual architecture features of AI Engine, this repository adds LLVM support for several specific features:
- support for non-power of 2 pointers;
- improved TableGen support for specifying operand latencies and resource conflicts of exposed pipeline instructions;
- scheduler support for negative operand latencies (i.e. an instruction writing to a register may be scheduledafter a corresponding use);
- scheduler support for slot assignment for instructions that can be issued in multiple VLIW slots;
- support for selecting relocations for instructions with multiple encodings;
- support for architectures with code alignment restrictions;
- improved register allocation support for complex register hierarchies, specifically related to spills of sub-registers of large compound-registers;
Support for Clang, LLD, binutils (e.g. 'llvm-objdump'), Compiler-RT, and LLVM-LIBC is also included.
Note that this repository does not implement a generic compiler and may not completely support other technologies. If you require a generic compiler or need to compile code for use with different technologies, you will need to select a different compiler. The implementation maturity is generally similar to other 'Experimental' LLVM architectures. For critical designs, please use the production compiler.
Modifications (c) Copyright 2022-2024 Advanced Micro Devices, Inc. or its affiliates
Welcome to the LLVM project!
This repository contains the source code for LLVM, a toolkit for theconstruction of highly optimized compilers, optimizers, and run-timeenvironments.
The LLVM project has multiple components. The core of the project isitself called "LLVM". This contains all of the tools, libraries, and headerfiles needed to process intermediate representations and convert them intoobject files. Tools include an assembler, disassembler, bitcode analyzer, andbitcode optimizer.
C-like languages use theClang frontend. Thiscomponent compiles C, C++, Objective-C, and Objective-C++ code into LLVM bitcode-- and from there into object files, using LLVM.
Other components include:thelibc++ C++ standard library,theLLD linker, and more.
Consult theGetting Started with LLVMpage for information on building and running LLVM.
For information on how to contribute to the LLVM project, please take a look attheContributing to LLVM guide.
Join theLLVM Discourse forums,Discordchat,LLVM Office Hours orRegular sync-ups.
The LLVM project has adopted acode of conduct forparticipants to all modes of communication within the project.
About
Fork of LLVM to support AMD AIEngine processors
Resources
License
Code of conduct
Security policy
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
Uh oh!
There was an error while loading.Please reload this page.