<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/amd-proposes-new-llvm-ithp-option-for-squeezing-more-performance-u5vsicyny" -->

---
title: AMD Proposes New LLVM iTHP Option For Squeezing More...
description: AMD's compiler technologies team has proposed a new opt-in Clang feature, -fenable-readonly-thp, that implements instruction Transparent Huge Pages (iTHP) at...
canonical: https://daily.dev/posts/amd-proposes-new-llvm-ithp-option-for-squeezing-more-performance-u5vsicyny
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: AMD Proposes New LLVM iTHP Option For Squeezing More Performance | daily.dev
og:description: AMD's compiler technologies team has proposed a new opt-in Clang feature, -fenable-readonly-thp, that implements instruction Transparent Huge Pages (iTHP) at...
og:url: https://daily.dev/posts/amd-proposes-new-llvm-ithp-option-for-squeezing-more-performance-u5vsicyny
og:image: https://api.daily.dev/og/posts/u5vsiCyNY.png
og:image:alt: AMD Proposes New LLVM iTHP Option For Squeezing More Performance
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# AMD Proposes New LLVM iTHP Option For Squeezing More Performance

**[Phoronix](https://daily.dev/sources/phoronix)** · 3 min read · 1 upvotes · 0 comments

## Summary

AMD's compiler technologies team has proposed a new opt-in Clang feature, -fenable-readonly-thp, that implements instruction Transparent Huge Pages (iTHP) at compile and link time. The compiler driver arranges 2 MiB segment alignment at link time, links a small startup object, and calls madvise(MADV_COLLAPSE) at process start so the kernel can promote 4 KiB text page mappings to huge pages, reducing iTLB pressure. Testing with SPEC CPU 2026, Geekbench, CPython, and database/server workloads showed workload-dependent gains, strongest on large .text binaries like interpreters and compilers, with no broad regressions observed but some cost in larger binaries and startup overhead. The feature requires Linux 7.2 or newer since older kernels only support iTHP from TMPFS-based storage. Unlike the BOLT binary layout optimizer, this approach requires no workload profiling. A Google engineer noted they built a similar library, and AMD hopes to upstream this into LLVM and potentially GNU toolchains instead.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://www.phoronix.com/news/LLVM-fenable-readonly-thp>

## Questions this post answers

### What does the proposed -fenable-readonly-thp Clang flag do?

It implements instruction Transparent Huge Pages (iTHP) at compile and link time by arranging 2 MiB segment alignment during linking, adding a small startup object, and calling madvise(MADV_COLLAPSE) on the executable text range at process start so the kernel can promote 4 KiB text mappings to huge pages, reducing iTLB pressure in large binaries.

_Compiler engineers tracking LLVM proposals like this one can follow the RFC's progress on daily.dev._

### What kernel version is required for the AMD iTHP compiler flag to fully work?

Linux 7.2 or newer is needed for full support, since older kernels only support instruction Transparent Huge Pages from TMPFS-based storage rather than arbitrary executable mappings, limiting where the -fenable-readonly-thp optimization can apply.

_Engineers planning kernel and toolchain upgrades can watch how this compatibility requirement evolves via daily.dev._

### How does AMD's iTHP compiler flag compare to BOLT for improving iTLB performance?

Unlike the BOLT binary layout optimizer, which also improves iTLB performance but requires workload profiling to guide its layout decisions, the -fenable-readonly-thp approach needs no profiling data, instead relying on link-time segment alignment and a runtime madvise call to promote text pages to 2 MiB huge pages.

_Anyone weighing profiling-based versus profile-free binary layout tools can compare options through daily.dev._

## Similar posts on daily.dev

- [Reserved THP Feature Proposed For Linux To Combine The Best Of HugeTLB & THP](https://daily.dev/posts/reserved-thp-feature-proposed-for-linux-to-combine-the-best-of-hugetlb-thp-cvgfdlm2n) · Phoronix · 0 upvotes · 0 comments
- [Intel Xe Driver Preps THP Support For "Significant" SVM Performance Gains](https://daily.dev/posts/intel-xe-driver-preps-thp-support-for-significant-svm-performance-gains-0vfxktpzh) · Phoronix · 0 upvotes · 0 comments
- [Glibc Now Enabling 2MB THP On AArch64 By Default For Better Performance](https://daily.dev/posts/glibc-now-enabling-2mb-thp-on-aarch64-by-default-for-better-performance-tnheepl8o) · Phoronix · 0 upvotes · 0 comments
- [Experimental Linux Code For 1GB PUD-Level THPs Shows 34% Faster Memory Access Times](https://daily.dev/posts/experimental-linux-code-for-1gb-pud-level-thps-shows-34-faster-memory-access-times-tpbz1g571) · Phoronix · 0 upvotes · 0 comments
- [Transparent Hugepage Performance On Linux 6.18 LTS: Madvise vs. Always Review](https://daily.dev/posts/transparent-hugepage-performance-on-linux-6-18-lts-madvise-vs-always-review-t4t2jnn4r) · Phoronix · 0 upvotes · 0 comments

---

Tags: [#general-programming](https://daily.dev/tags/general-programming), [#linux](https://daily.dev/tags/linux), [#amd](https://daily.dev/tags/amd), [#compiler-optimization](https://daily.dev/tags/compiler-optimization)

[View this post on daily.dev](https://daily.dev/posts/amd-proposes-new-llvm-ithp-option-for-squeezing-more-performance-u5vsicyny)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"AMD Proposes New LLVM iTHP Option For Squeezing More Performance","url":"https://daily.dev/posts/amd-proposes-new-llvm-ithp-option-for-squeezing-more-performance-u5vsicyny","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/amd-proposes-new-llvm-ithp-option-for-squeezing-more-performance-u5vsicyny"},"datePublished":"2026-08-26T14:58:47.739Z","dateModified":"2026-09-13T20:47:31.717Z","description":"AMD's compiler technologies team has proposed a new opt-in Clang feature, -fenable-readonly-thp, that implements instruction Transparent Huge Pages (iTHP) at...","image":"https://www.phoronix.com/assets/categories/llvm.webp","thumbnailUrl":"https://www.phoronix.com/assets/categories/llvm.webp","isAccessibleForFree":true,"articleSection":"Phoronix","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Phoronix","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/6a26ba379dd64932830aa0c9803dd7ee","url":"https://daily.dev/sources/phoronix"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/amd-proposes-new-llvm-ithp-option-for-squeezing-more-performance-u5vsicyny","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":1},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"general-programming,linux,amd,compiler-optimization","timeRequired":"PT3M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Phoronix","item":"https://daily.dev/sources/phoronix"},{"@type":"ListItem","position":3,"name":"AMD Proposes New LLVM iTHP Option For Squeezing More Performance"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/amd-proposes-new-llvm-ithp-option-for-squeezing-more-performance-u5vsicyny#faq","mainEntity":[{"@type":"Question","name":"What does the proposed -fenable-readonly-thp Clang flag do?","acceptedAnswer":{"@type":"Answer","text":"It implements instruction Transparent Huge Pages (iTHP) at compile and link time by arranging 2 MiB segment alignment during linking, adding a small startup object, and calling madvise(MADV_COLLAPSE) on the executable text range at process start so the kernel can promote 4 KiB text mappings to huge pages, reducing iTLB pressure in large binaries. Compiler engineers tracking LLVM proposals like this one can follow the RFC's progress on daily.dev."}},{"@type":"Question","name":"What kernel version is required for the AMD iTHP compiler flag to fully work?","acceptedAnswer":{"@type":"Answer","text":"Linux 7.2 or newer is needed for full support, since older kernels only support instruction Transparent Huge Pages from TMPFS-based storage rather than arbitrary executable mappings, limiting where the -fenable-readonly-thp optimization can apply. Engineers planning kernel and toolchain upgrades can watch how this compatibility requirement evolves via daily.dev."}},{"@type":"Question","name":"How does AMD's iTHP compiler flag compare to BOLT for improving iTLB performance?","acceptedAnswer":{"@type":"Answer","text":"Unlike the BOLT binary layout optimizer, which also improves iTLB performance but requires workload profiling to guide its layout decisions, the -fenable-readonly-thp approach needs no profiling data, instead relying on link-time segment alignment and a runtime madvise call to promote text pages to 2 MiB huge pages. Anyone weighing profiling-based versus profile-free binary layout tools can compare options through daily.dev."}}]}
```

