[llvm] Notes (PR #76744)

ashley grevelink via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 2 11:05:12 PST 2024


https://github.com/ashlink11 created https://github.com/llvm/llvm-project/pull/76744

None

>From 05ff792d77cbf9ff4c0a51c2e2d34ef548f6078d Mon Sep 17 00:00:00 2001
From: Ashley Grevelink <ashleyg at web3.foundation>
Date: Wed, 20 Dec 2023 16:38:49 -0500
Subject: [PATCH 1/8] testing fork repo - first push main

---
 README.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/README.md b/README.md
index 4ae7eaf9b083a5..0344f97dd46604 100644
--- a/README.md
+++ b/README.md
@@ -2,7 +2,7 @@
 
 [![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/llvm/llvm-project/badge)](https://securityscorecards.dev/viewer/?uri=github.com/llvm/llvm-project)
 
-Welcome to the LLVM project!
+Welcome to the LLVM project! 
 
 This repository contains the source code for LLVM, a toolkit for the
 construction of highly optimized compilers, optimizers, and run-time

>From de14d0cee1cd34562a55c548465c5cb5ddc765f3 Mon Sep 17 00:00:00 2001
From: Ashley Grevelink <ashleyg at web3.foundation>
Date: Thu, 21 Dec 2023 21:02:49 -0500
Subject: [PATCH 2/8] start personal notes on understanding LLVM project

---
 ash-notes/2023-12-dec.md | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
 create mode 100644 ash-notes/2023-12-dec.md

diff --git a/ash-notes/2023-12-dec.md b/ash-notes/2023-12-dec.md
new file mode 100644
index 00000000000000..1626bc4aa33acd
--- /dev/null
+++ b/ash-notes/2023-12-dec.md
@@ -0,0 +1,17 @@
+LLVM core components:
+1. Clang frontend: generates LLVM bitcode
+2. libc++ C++ standard library: ISO/IE 14882 standard; after object files/IR, references are resolved by linking with libc++ implementations
+3. LLD linker: makes one single .exe/library; static linking: all dependencies included; dynamic linking: dependencies linked at runtime)
+
+https://llvm.org/docs/GettingStarted.html#getting-started-with-llvm 
+Directory Layout
+llvm/cmake
+llvm/examples
+llvm/include
+llvm/lib
+llvm/bindings
+llvm/projects
+llvm/test
+test-suite
+llvm/tools
+llvm/utils
\ No newline at end of file

>From 273823c2d590c8126288c84711f1886fed6362dc Mon Sep 17 00:00:00 2001
From: Ashley Grevelink <ashleyg at web3.foundation>
Date: Thu, 21 Dec 2023 21:14:43 -0500
Subject: [PATCH 3/8] /cmake and /examples

---
 ash-notes/2023-12-dec.md | 35 +++++++++++++++++++++++++++++++++++
 1 file changed, 35 insertions(+)

diff --git a/ash-notes/2023-12-dec.md b/ash-notes/2023-12-dec.md
index 1626bc4aa33acd..365be523040618 100644
--- a/ash-notes/2023-12-dec.md
+++ b/ash-notes/2023-12-dec.md
@@ -7,6 +7,41 @@ https://llvm.org/docs/GettingStarted.html#getting-started-with-llvm
 Directory Layout
 llvm/cmake
 llvm/examples
+llvm/include
+llvm/lib
+llvm/bindings
+llvm/projects
+llvm/test
+test-suite
+llvm/tools
+llvm/utils
+
+useful info of internals of LLVM generated from source-code: https://llvm.org/doxygen/index.html 
+
+
+llvm/cmake
+
+generates system build files
+
+/modules: build config for llvm user-defined options. checks compiler version and linker flags
+
+/platforms: toolchain configuration for Android NDK, iOS systems, and non-Windows hosts to target MSVC (Microsoft Visual C++ Compiler)
+
+
+
+llvm/examples
+
+examples for using LLVM for a custom language (lowering, optimization, and code generation)
+
+Kaleidoscope language tutorial: hand-written lexer, parser, AST, as well as codegen support using LLVM both static (ahead of time) and various approaches to Just in time (JIT) compilation
+
+JIT: program is compiler into machine code during runtime, right before it's executed
+
+BuildingAJIT: shows how LLVM's ORC JIT APIs interact with other parts of LLVM. teaches how to recombine them to build a custom JIT that is suited to your use-case
+
+
+
+
 llvm/include
 llvm/lib
 llvm/bindings

>From bbe1bebb42884a3d97867a8dd44a25afcdec88cf Mon Sep 17 00:00:00 2001
From: Ashley Grevelink <ashleyg at web3.foundation>
Date: Fri, 22 Dec 2023 21:05:27 -0500
Subject: [PATCH 4/8] llvm/include notes

---
 ash-notes/2023-12-dec.md | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/ash-notes/2023-12-dec.md b/ash-notes/2023-12-dec.md
index 365be523040618..a92f129a875a9a 100644
--- a/ash-notes/2023-12-dec.md
+++ b/ash-notes/2023-12-dec.md
@@ -43,6 +43,16 @@ BuildingAJIT: shows how LLVM's ORC JIT APIs interact with other parts of LLVM. t
 
 
 llvm/include
+
+public header files exported from the LLVM library. three main directories:
+
+- llvm/include/llvm : all LLVM-specific header files, and subdirectories for different portions of LLVM: Analysis, CodeGen, Target, Transforms, etc., ...
+- llvm/include/llvm/support: generic support libraries provided with LLVM but not necessarily specific to LLVM. For example, some C++ STL utilities and a Command Line option processing library store header files here
+- llvm/include/llvm/Config: Header files configured by cmake. They wrap 'standard' UNIX and C header files. Source code can include these header files which automatically take care of the conditional #includes that cmake generates.
+
+
+
+
 llvm/lib
 llvm/bindings
 llvm/projects

>From 8d0b13908e493f65ee69899d42a6562ff586d9d0 Mon Sep 17 00:00:00 2001
From: Ashley Grevelink <ashleyg at web3.foundation>
Date: Sat, 23 Dec 2023 19:26:20 -0500
Subject: [PATCH 5/8] add llvm/lib and LLVM tools notes

---
 ash-notes/2023-12-dec.md | 75 +++++++++++++++++++++++++++++++++++++++-
 1 file changed, 74 insertions(+), 1 deletion(-)

diff --git a/ash-notes/2023-12-dec.md b/ash-notes/2023-12-dec.md
index a92f129a875a9a..f276f27e9a6840 100644
--- a/ash-notes/2023-12-dec.md
+++ b/ash-notes/2023-12-dec.md
@@ -54,9 +54,82 @@ public header files exported from the LLVM library. three main directories:
 
 
 llvm/lib
+
+most source files are here. by putting code in libraries, LLVM makes it easy to share code among the tools.
+
+llvm/lib/IR - core LLVM source files that implement core classes like Instruction and BasicBlock
+
+llvm/lib/AsmParser - source code for the LLVM assembly language parser library
+
+llvm/lib/Bitcode - code for reading and writing bitcode
+
+llvm/lib/Analysis - a variety of program analyses, such as Call Graphs, Induction Variable, Natural Loop Identification, etc.
+
+llvm/lib/Transforms - IR-to-IR program transformations, such as Aggressive Dead Code Elimination, Sparse Conditional Constant Propagation, Inlining, Loop Invariant Code Motion, Dead Global Elimination, and many others
+
+llvm/lib/Target - files describing target architectures for code generation. for example, llvm/lib/Target/X86 holds the X86 machine description.
+
+llvm/lib/CodeGen - the major parts of the code generator: Instruction Selector, Instruction Scheduling, and Register Allocation.
+
+llvm/lib/MC/ - the libraries represent and process code at machine code level. handles assembly and object-file emission.
+
+llvm/lib/ExecutionEngine - libraries for directly executing bitcode at runtime in interpreted and JIT-compiled scenarios.
+
+llvm/lib/Support - source code that corresponds to the header files in llvm/include/ADT and llvm/include/Support.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
 llvm/bindings
 llvm/projects
 llvm/test
 test-suite
 llvm/tools
-llvm/utils
\ No newline at end of file
+llvm/utils
+
+
+
+
+
+
+
+
+
+
+LLVM tools include:
+
+Clang: A C, C++, and Objective-C compiler front end. Clang is known for its fast compilation, expressive diagnostics, and adherence to standards. It's often used as an alternative to GCC.
+
+LLVM-AS / LLVM-Dis: Tools for assembling and disassembling LLVM assembly language. llvm-as assembles LLVM assembly into LLVM bitcode, while llvm-dis disassembles LLVM bitcode into human-readable LLVM assembly.
+
+LLVM-Link / LLVM-Archive: llvm-link links LLVM bitcode files together into a single output file. llvm-ar is an archiver that creates and maintains archives of LLVM bitcode files.
+
+LLVM-Opt: This tool provides various optimization options to manipulate LLVM bitcode, allowing developers to run specific optimization passes or transformations on the code.
+
+LLVM-Dump: Used to print the contents of LLVM bitcode files in human-readable form. It's helpful for examining the structure and contents of LLVM bitcode.
+
+LLVM-NM / LLVM-Symbolizer: llvm-nm lists symbols from object files. llvm-symbolizer translates addresses into source code locations for better error reporting and debugging.
+
+LLVM-MC: A machine code generation utility that assembles and disassembles machine code. It's a low-level tool that directly deals with machine instructions and object file formats.
+
+LLVM-ObjDump: Similar to llvm-dis, but specific for object files. It displays information about object files, including their headers, sections, and assembly code.
+
+LLVM-Profdata / LLVM-Cov: These tools deal with code coverage. llvm-profdata manages profile data files, while llvm-cov displays coverage information based on profile data.
+
+LLVM-Size: Displays the size of sections in an LLVM object file or an archive.
+

>From 724d8722d10762012cadcc2eee46fa0dc1087509 Mon Sep 17 00:00:00 2001
From: Ashley Grevelink <ashleyg at web3.foundation>
Date: Tue, 2 Jan 2024 13:43:24 -0500
Subject: [PATCH 6/8] add meta notes file

---
 ash-notes/meta-2024-jan-02.md                 |  2 ++
 .../{2023-12-dec.md => notes-2023-dec-12.md}  | 24 ++++++++++++++++++-
 2 files changed, 25 insertions(+), 1 deletion(-)
 create mode 100644 ash-notes/meta-2024-jan-02.md
 rename ash-notes/{2023-12-dec.md => notes-2023-dec-12.md} (98%)

diff --git a/ash-notes/meta-2024-jan-02.md b/ash-notes/meta-2024-jan-02.md
new file mode 100644
index 00000000000000..d4f7cdd5ffdb98
--- /dev/null
+++ b/ash-notes/meta-2024-jan-02.md
@@ -0,0 +1,2 @@
+notes on notes
+
diff --git a/ash-notes/2023-12-dec.md b/ash-notes/notes-2023-dec-12.md
similarity index 98%
rename from ash-notes/2023-12-dec.md
rename to ash-notes/notes-2023-dec-12.md
index f276f27e9a6840..feaa5cbe0dce38 100644
--- a/ash-notes/2023-12-dec.md
+++ b/ash-notes/notes-2023-dec-12.md
@@ -3,7 +3,7 @@ LLVM core components:
 2. libc++ C++ standard library: ISO/IE 14882 standard; after object files/IR, references are resolved by linking with libc++ implementations
 3. LLD linker: makes one single .exe/library; static linking: all dependencies included; dynamic linking: dependencies linked at runtime)
 
-https://llvm.org/docs/GettingStarted.html#getting-started-with-llvm 
+https://llvm.org/docs/GettingStarted.html#getting-started-with-the-llvm-system
 Directory Layout
 llvm/cmake
 llvm/examples
@@ -96,6 +96,28 @@ llvm/lib/Support - source code that corresponds to the header files in llvm/incl
 
 
 llvm/bindings
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
 llvm/projects
 llvm/test
 test-suite

>From 07e389fb1506753b74e774f2e98e2988d70e850e Mon Sep 17 00:00:00 2001
From: Ashley Grevelink <ashleyg at web3.foundation>
Date: Tue, 2 Jan 2024 13:53:19 -0500
Subject: [PATCH 7/8] git terminal config test

---
 ash-notes/meta-2024-jan-02.md | 1 +
 1 file changed, 1 insertion(+)

diff --git a/ash-notes/meta-2024-jan-02.md b/ash-notes/meta-2024-jan-02.md
index d4f7cdd5ffdb98..f13fdc2c1e0eb8 100644
--- a/ash-notes/meta-2024-jan-02.md
+++ b/ash-notes/meta-2024-jan-02.md
@@ -1,2 +1,3 @@
 notes on notes
 
+testing
\ No newline at end of file

>From 01a55fbdd21a4315e183e29c664e8d8b5d8fbaac Mon Sep 17 00:00:00 2001
From: Ashley Grevelink <ashleyg at web3.foundation>
Date: Tue, 2 Jan 2024 14:00:12 -0500
Subject: [PATCH 8/8] terminal test 2

---
 ash-notes/meta-2024-jan-02.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ash-notes/meta-2024-jan-02.md b/ash-notes/meta-2024-jan-02.md
index f13fdc2c1e0eb8..d0c04cb097a763 100644
--- a/ash-notes/meta-2024-jan-02.md
+++ b/ash-notes/meta-2024-jan-02.md
@@ -1,3 +1,3 @@
 notes on notes
 
-testing
\ No newline at end of file
+testingasdasd
\ No newline at end of file



More information about the llvm-commits mailing list