As a didactic programming language, ABC should be installable on extant distributions without requiring advanced system administration. The latest llvm/clang widely supported is version 19.
Revising this implementation to remove any dependency on cutting-edge llvm/clang features and setting min version to at most 19 would reduce installation difficulty for users and testers (who often have limited motivation and skills to pass the hurdle to install llvm/clang-21.)
The transition from LLVM 19 to LLVM 20 introduced significant architectural support, performance optimizations, and notable ABI changes. LLVM 20 added full assembly and command-line support for the Armv9.6-A architecture and included beta support for SVE2.1 and SME2.1 ACLE extensions, along with new __arm_agnostic attributes to optimize SME ZA state handling.
Key performance and code generation improvements in LLVM 20 included a 3% uplift in SPEC2017 floating-point rate and a 1% gain in integer rate on Graviton 4 processors. Specific optimizations involved canonicalizing getelementptr (GEP) instructions for better constant folding, enhancing the Superword Level Parallelism (SLP) vectorizer, and improving Loop-Invariant Code Motion (LICM) via nuw GEPs, which delivered up to a 22% gain in the 538.imagick_r benchmark.
From a compatibility standpoint, Clang 20.1.0 introduced ABI incompatibilities with code compiled by Clang 19, requiring the use of the -fclang-abi-compat=19 option to maintain binary compatibility. This version also changed the mangling of member-like friend function templates and altered how certain C++ standard library components, such as std::unordered_map with specific empty allocators, handle ABI stability. Additionally, Clang 20 deprecated the __is_nullptr type trait, which was removed in this release, and fixed several critical crashes in static analysis checkers like unix.Stream and core.StackAddressEscape.
Are these features essential?
Setting min llvm to -19 gives following error on my devuan linux system.
gen/gen.cpp: In function ‘void gen::init(const char*, llvm::OptimizationLevel)’:
gen/gen.cpp:144:33: error: cannot convert ‘llvm::Triple’ to ‘llvm::StringRef’
144 | llvmModule->setTargetTriple(TT);
| ^~
| |
| llvm::Triple
In file included from gen/gen.hpp:14,
from gen/gen.cpp:13:
/usr/lib/llvm-19/include/llvm/IR/Module.h:340:34: note: initializing argument 1 of ‘void llvm::Module::setTargetTriple(llvm::StringRef)’
340 | void setTargetTriple(StringRef T) { TargetTriple = std::string(T); }
| ~~~~~~~~~~^
gen/gen.cpp:147:68: error: no matching function for call to ‘llvm::TargetRegistry::lookupTarget(llvm::Triple&, std::string&)’
147 | const llvm::Target *target = llvm::TargetRegistry::lookupTarget(TT, error);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~
In file included from gen/gen.cpp:6:
/usr/lib/llvm-19/include/llvm/MC/TargetRegistry.h:701:24: note: candidate: ‘static const llvm::Target* llvm::TargetRegistry::lookupTarget(llvm::StringRef, std::string&)’
701 | static const Target *lookupTarget(StringRef Triple, std::string &Error);
| ^~~~~~~~~~~~
/usr/lib/llvm-19/include/llvm/MC/TargetRegistry.h:701:47: note: no known conversion for argument 1 from ‘llvm::Triple’ to ‘llvm::StringRef’
701 | static const Target *lookupTarget(StringRef Triple, std::string &Error);
| ~~~~~~~~~~^~~~~~
/usr/lib/llvm-19/include/llvm/MC/TargetRegistry.h:714:24: note: candidate: ‘static const llvm::Target* llvm::TargetRegistry::lookupTarget(llvm::StringRef, llvm::Triple&, std::string&)’
714 | static const Target *lookupTarget(StringRef ArchName, Triple &TheTriple,
| ^~~~~~~~~~~~
/usr/lib/llvm-19/include/llvm/MC/TargetRegistry.h:714:24: note: candidate expects 3 arguments, 2 provided
gen/gen.cpp:159:49: error: cannot convert ‘llvm::Triple’ to ‘llvm::StringRef’
159 | targetMachine = target->createTargetMachine(TT, cpu, getFeatures(), topts,
| ^~
| |
| llvm::Triple
/usr/lib/llvm-19/include/llvm/MC/TargetRegistry.h:456:17: note: initializing argument 1 of ‘llvm::TargetMachine* llvm::Target::createTargetMachine(llvm::StringRef, llvm::StringRef, llvm::StringRef, const llvm::TargetOptions&, std::optional<llvm::Reloc::Model>, std::optional<llvm::CodeModel::Model>, llvm::CodeGenOptLevel, bool) const’
456 | StringRef TT, StringRef CPU, StringRef Features,
| ~~~~~~~~~~^~
make: *** [Makefile:117: build/gen/gen.o] Error 1
Thanks for your consideration.
I remain enthusiastic about the excellent statement of purpose:
"After learning Pascal, students were typically able to pick up other programming languages quickly and confidently, because they had developed a solid understanding of how software is fundamentally executed.
Today, many modern languages (such as Python) abstract away too many of these details, giving learners an incomplete mental model of what is really happening "under the hood."
Thank you for finding better words than I could.
As a didactic programming language, ABC should be installable on extant distributions without requiring advanced system administration. The latest llvm/clang widely supported is version 19.
Revising this implementation to remove any dependency on cutting-edge llvm/clang features and setting min version to at most 19 would reduce installation difficulty for users and testers (who often have limited motivation and skills to pass the hurdle to install llvm/clang-21.)
Are these features essential?
Setting min llvm to -19 gives following error on my devuan linux system.
Thanks for your consideration.
I remain enthusiastic about the excellent statement of purpose:
Thank you for finding better words than I could.