aboutsummaryrefslogtreecommitdiff
path: root/llvm/docs/tutorial/MyFirstLanguageFrontend
AgeCommit message (Collapse)AuthorFilesLines
9 days[llvm] Proofread *.rst (#151087)Kazu Hirata1-1/+1
This patch hyphenates words that are used as adjecives, such as: - architecture specific - human readable - implementation defined - language independent - language specific - machine readable - machine specific - target independent - target specific
2025-07-21[doc][LLVM] Fix typo in the Kaleidoscope tutorial (#133675)Howard Chu1-1/+1
"to make the add's lexically identical" -> "to make the adds lexically identical"
2025-02-17Fix typo in LangImpl03.rst (#127389)Dinu Blanovschi1-1/+1
2025-02-01[Kaleidoscope] Fix typo (#125366)FantasqueX1-1/+1
Remove duplicate word.
2024-12-12[Kaleidoscope] Add mem2reg pass to function pass manager (#119707)AidinT1-4/+4
Kaleidoscope has switched to new pass manager before (#72324), but both code and tutorial document have some missing parts. This pull request fixes the following problems: 1. Adds `PromotePass` to the function pass manager. This pass was removed during the switch from legacy pass manager to the new pass manager. 2. Syncs the tutorial with the code.
2024-10-07[doc] Fix Kaleidoscope tutorial chapter 3 code snippet and full listing ↵AidinT1-2/+2
discrepancies (#111289) Fix two discrepancies between the cited snippets and the full code.
2024-06-11[RemoveDIs] Update all docs to use debug records (#91768)Stephen Tozer1-1/+1
As we approach the state where support for debug intrinsics is dropping and we print and use debug records by default, the documentation should be updated to refer to debug records as the primary debug info representation, with debug intrinsics being relegated to an optional alternative. This patch performs a few updates: - Replace references to intrinsics with references to records across all the documentation. - Replace intrinsics with records in code examples. - Move debug records prior to debug intrinsics in the SourceLevelDebugging document, and change text to refer to them as the primary representation. - Add release notes describing the change.
2024-01-12[Kaleidoscope] LLVM is not needed for chapter two (#69823)Gonsolo1-5/+2
Since the example (llvm/examples/Kaleidoscope/Chapter2/toy.cpp) is self-contained there is no need to use LLVM.
2024-01-09[Documentation] fix invalid links in documentation (#76502)Hana Dusíková1-1/+1
2023-12-24[Doc] update the usage of opt with mem2reg pass in tutorial (#76282)youkaichao1-1/+1
The current command will raise an error: > The `opt -passname` syntax for the new pass manager is not supported, please use `opt -passes=<pipeline>` (or the `-p` alias for a more concise version). Update the usage now.
2023-12-05Kaleidoscope-Ch8: use Reloc::PIC_Fangrui Song1-4/+3
which has better portability across different OSes. In addition, on many ELF OSes, this output relocatable file can be linked without -no-pie.
2023-11-16[Kaleidoscope] Switch to the new PassManager, revisited. (#72324)Logikable1-26/+54
Rollforward of #69032, which was reverted in [63d19cf](https://github.com/llvm/llvm-project/commit/63d19cfd853b0b4e374f40842ee388b0da5de36f). New: implemented changes in https://github.com/llvm/llvm-project/pull/69032#issuecomment-1809250162. Given the PassBuilder is how we expect users to register passes, the tutorial should reflect that.
2023-11-13Revert "[Kaleidoscope] Switch to the new PassManager. (#69032)"Amara Emerson1-67/+26
This reverts commit 7b94744e77aaf752abc2c6ab38ee3fdfafbeff9d. This breaks the expensive checks bot: https://green.lab.llvm.org/green/job/clang-stage1-cmake-RA-expensive/26026/ We didn't notice because it was broken for other reasons I think.
2023-10-18[Kaleidoscope] Switch to the new PassManager. (#69032)Logikable1-26/+67
Using the new pass manager is more verbose; let me know if the tutorial doesn't flow well with all the additions.
2023-09-14[NFC][CodeGen] Change CodeGenOpt::Level/CodeGenFileType into enum classes ↵Arthur Eubanks1-1/+1
(#66295) This will make it easy for callers to see issues with and fix up calls to createTargetMachine after a future change to the params of TargetMachine. This matches other nearby enums. For downstream users, this should be a fairly straightforward replacement, e.g. s/CodeGenOpt::Aggressive/CodeGenOptLevel::Aggressive or s/CGFT_/CodeGenFileType::
2023-05-31[docs] Use ExecutorAddr::toPtr() in ORC documentation.Mike Rostecki1-1/+1
The partial move from JITTargetAddress to ExecutorAddr in 8b1771bd9f30 did not update the ORC or Kaleidoscope documents. This patch fixes the inconsistency. Reviewed By: lhames Differential Revision: https://reviews.llvm.org/D150458
2023-01-31[Kaleidoscope] Update code snippets in text to match full code listingsDhruv Chawla8-120/+134
There were quite a few places in the tutorial where the snippets were not up to date with the full code listings given. I have updated all of the ones I could find, which mostly involves changing `.` to `->` when accessing through a `std::unique_ptr`, changing `while (1)` to `while (true)`, and other such small changes. There are still however a few places where I am not sure what to do, such as: - Chapter 4: `ParseTopLevelExpr()` in chapter 3 sets the ProtoTypeAST name to "", however it is referred to as "__anon_expr" in chapter 4. Would it be required to mention this change in chapter 4? - Chapter 9: The code snippets refer to the top level expression as "main", however the full code listing refers to it as "__anon_expr". I think given the context of the chapter it makes sense to refer to it as "main", so I have updated the code listing to reflect that. - Chapter 9: In chapter 9 the diff given for `HandleTopLevelExpression()` deletes code that is not mentioned anywhere else, so I am not sure what is to be done there. - Miscellaneous: I don't think this is very important, however the casing used for the first word of error messages tends to vary between upper and lower case between chapters and I do not know if it is worth reconciling these differences. Reviewed By: xgupta Differential Revision: https://reviews.llvm.org/D142323
2022-12-15[docs] Update docs since getBasicBlockList() is now privateVasileios Porpodas1-2/+2
Differential Revision: https://reviews.llvm.org/D140163
2022-08-07Added warning about outdated feature into Kaleidoscope tutorial textShivam Gupta1-0/+5
**Motivation: ** I have been studying LLVM with LLVM Kaleidoscope tutorial. In the 4th part I faced an error which said that I can't redefine a function as shown in the tutorial. After hours of searching, I finally found the reason that produced the error is that the feature of symbols redefinition has been disabled since LLVM-9. There was no information about that in the tutorial's text, so I've decided to add a warning. **Changes**: The only file I fixed is "`llvm/docs/tutorial/MyFirstLanguageFrontend/LangImpl04.rst`", I added text warning which says that described feature is outdated and the described functionality will not work properly on LLVM versions older 8 one. Patch by : DKay7 Differential Revision: https://reviews.llvm.org/D130613
2022-07-25[Kaleidoscope] Fix DWARF function creation exampleJustin Brooks1-2/+3
The full code listing was fixed in fdaeb0c647eb66763721a7fe74e0a36b007dcd75 Reviewed By: dblaikie Differential Revision: https://reviews.llvm.org/D130217
2022-06-30[Kaleidoscope] Remove unused function argumentMarc Auberer1-1/+1
Removes an unused function argument from a code listing in the Kaleidoscope turorial in step 9. Reviewed By: dblaikie, MaskRay Differential Revision: https://reviews.llvm.org/D128628
2022-04-06[docs] Fix Kaleidoscope code exampleRoman Sokolkov1-2/+2
* replace virtual with override * use default like in full code example Differential Revision: https://reviews.llvm.org/D123110
2022-03-23Replace links to archived mailing lists by links to Discourse forumsDanny Mösch1-7/+5
2022-03-16[docs] Fix typo in tutorialBill Wendling1-1/+1
Use "operands" instead of "operators" Closes #54397
2022-02-10[docs] Replace `opt -analyze` with better alternatives.Arthur Eubanks1-1/+1
`opt -analyze` is legacy PM-specific. Show better ways of doing the same thing, generally with some sort of `-passes=print<foo>`. Reviewed By: asbirlea Differential Revision: https://reviews.llvm.org/D119486
2021-11-15[NFC] Trim trailing whitespace in *.rstShao-Ce SUN2-4/+4
2021-06-09[docs] Fix load instructions in chapter 7 of the tutorialJim Lin1-8/+8
Loads in the first half of the chapter are missing the type argument. Patched By: klao (Mihaly Barasz) Reviewed By: Jim Differential Revision: https://reviews.llvm.org/D90326
2021-02-27[llvm] Fix typos in documentation (NFC)Kazu Hirata1-1/+1
2021-01-25[Doc][NFC] Fix Kaleidoscope links, typos and add blog posts for MCJITxgupta5-11/+11
2020-12-15[docs][unittest][Go][StackProtector] Migrate deprecated DebugInfo::get to ↵Fangrui Song1-2/+2
DILocation::get
2020-09-15[doc] Fix broken linkHan Seoul-Oh1-1/+1
2020-07-21Fix typo in tutorialChris Morin1-1/+1
2020-06-12Update Kaleidoscope tutorial inline codeErich Keane1-2/+2
Reported on IRC, the tutorial code at the bottom of the page correctly namespaces the FunctionPassManager, but the as-you-go code does not. This patch adds the namespace to those.
2020-03-22Doc: Links should use httpsSylvestre Ledru6-9/+9
2020-03-09Fix internal links in Kaleidoscope tutorialJonathan Roelofs3-3/+3
2019-11-17[docs] Fix broken links in Kaleidoscope chapter 3Brian Gesiak1-4/+4
Several links in this document referred to `LangImpl4.html` or `LangImpl7.html`. However, now these pages use two digits, so for these links to function they need to be modified to `LangImpl04.html`, and so on -- note the extra `0`.
2019-11-16[Docs] Remove stray :doc: directive.kristina1-1/+1
2019-11-16[Docs] Fix sphinx warning.kristina1-1/+1
Fix sphinx warning over an ambigious reference.
2019-11-16[Docs] Try fixing the tutorial toctreekristina11-22/+17
Unorphan the old tutorial and reference every page in the index explicitly. This should hopefully make Sphinx generate correct hyperlinks now.
2019-11-16[Docs] Fix relative links in tutorial.kristina5-22/+22
Update relative links in Kaleidoscope tutorial.
2019-11-13Move CodeGenFileType enum to Support/CodeGen.hReid Kleckner1-1/+1
Avoids the need to include TargetMachine.h from various places just for an enum. Various other enums live here, such as the optimization level, TLS model, etc. Data suggests that this change probably doesn't matter, but it seems nice to have anyway.
2019-09-13Fix a few spellos in docs.Nico Weber2-2/+2
(Trying to debug an incremental build thing on a bot...) llvm-svn: 371860
2019-08-15[llvm] Migrate llvm::make_unique to std::make_uniqueJonas Devlieghere6-24/+24
Now that we've moved to C++14, we no longer need the llvm::make_unique implementation from STLExtras.h. This patch is a mechanical replacement of (hopefully) all the llvm::make_unique instances across the monorepo. llvm-svn: 369013
2019-08-05Rename F_{None,Text,Append} to OF_{None,Text,Append}. NFCFangrui Song1-1/+1
F_{None,Text,Append} are kept for compatibility since r334221. llvm-svn: 367800
2019-07-19replace the old kaleidoscope tutorial files with orphaned pages that forward ↵Chris Lattner1-2/+0
to the new copy. llvm-svn: 366529
2019-07-19Point to the dusted off version of the kaleidoscope tutorial.Chris Lattner1-1/+1
llvm-svn: 366528
2019-04-11try to fix the sphinx build some moreHans Wennborg11-0/+22
llvm-svn: 358156
2019-04-11Try to fix the shpinx buildHans Wennborg8-8/+8
llvm-svn: 358154
2019-04-07last changes for nowChris Lattner1-2/+2
llvm-svn: 357868
2019-04-07various improvements in wording, also unbreak the botChris Lattner2-41/+43
llvm-svn: 357867