Hardware specialization can improve datacenter efficiency. Unfortunately, identifying computations that justify dedicated hardware is difficult. Existing approaches analyze hot functions, instruction patterns, or overheads such as datacenter tax. They can miss fine-grained computations whose aggregate cost is spread across applications and libraries, especially when different pieces of code obscure the same underlying computation. We observe that seemingly unrelated code regions often perform the same computations, creating specialization opportunities that require semantic reasoning. The rise of agentic AI makes it possible to automate this. However, conventional AI agents cannot efficiently and reliably analyze large scale datacenter software. To unlock this opportunity, we present Lodestone, an agentic framework that automatically discovers hardware specialization opportunities by reasoning about what the executed code computes. First, Lodestone extracts hot control-flow regions from execution traces across workloads and organizes them into compact analysis packages that make large workloads tractable for agents. Second, agents describe what each region computes, merge those that perform the same computation into computational families, and check their semantic correctness in a loop. Third, to verify the discovered family, Lodestone runs every piece of code in a family against a set of reference inputs and outputs on recorded executions. Finally, for selected families, Lodestone proposes hardware, e.g., ISA extensions, near-core units, or detached accelerators, and human experts decide which proposals to develop further. We evaluate Lodestone on 20 workloads across six datacenter workload categories. We simulate 30 discovered families in a cycle-accurate simulator and implement them in RTL. These optimizations speed up the workloads by 12.6% on average and by up to 80.2%.
Figures & tables
Figure 1. Cycles that three encoders (x264, SVT-AV1, and libaom) spend on block scoring.
Figure 2. Thirteen pieces of code in four database engines perform one computation: probing a hash table. Each piece is named by the function that contains it, and its bar shows its number of instructions.
Figure 3. Lodestone overview: control-flow analysis extracts hot code into analysis packages, a pipeline of agents merges code that performs the same computation into families, reference checks test every member on recorded executions, and human experts assess the resulting hardware proposals.
Figure 4. Control-flow graph of a function and the analysis package that keeps its hot control flow.
Category
Workload
Description
Key-Value Stores
Memcached ( Memcached, 2026 )
CloudSuite data-caching load ( Ferdman et al., 2012 ; Palit et al., 2016 ) on a 10 GB Twitter dataset
Redis ( Redis, 2026 )
YCSB workload A ( Cooper et al., 2010 ) over 10M records
RocksDB ( Dong et al., 2021 )
db_bench ( RocksDB contributors, 2026 ) with the benchmark-script options, 50% writes, and 20M keys
TaoBench ( Su et al., 2025 )
Tao-patched Memcached from DCPerf ( Su et al., 2025 ) ; load at a steady 90% hit rate
PostgreSQL ( PostgreSQL Global Development Group, 2026 )
TPC-C ( Transaction Processing Performance Council, 2026a ) : 100 warehouses in BenchBase ( Difallah et al., 2013 )
Table 1. Evaluated workloads and their configurations.
Frequency
3.1 GHz
Width
6-wide decode/rename/dispatch, 8-wide retire
Out-of-order
512-entry ROB, 192/114 load/store queue
Front end
TAGE predictor, 12K-entry BTB, 4K μ op cache
L1I
32 KB, 8-way, 3-cycle round-trip (RT) latency
L1D
48 KB, 12-way, 5-cycle RT latency
L2
2 MB, 16-way, 16-cycle RT latency
Table 2. Configuration of the simulated core.
Category
Family
Description
Form
Members
Workloads
FuncName
DFG-Class
Speedup
Area ( μ m 2 )
Key-Value Stores
Hash Mixing †
Mixes key bits into a hash
Near-core
8
4
6
7
5.50 ×
5,658
Object Allocation
Takes and returns free objects
ISA ext.
29
4
25
29
1.99 ×
2,690
Cursor Advance
Moves a cursor to the next record
ISA ext.
11
4
11
11
1.22 ×
5,203
Keyed Lookup
Finds a key in a hash table
ISA ext.
11
4
9
11
1.22 ×
9,058
Frame Decoding
Decodes a field from a byte stream
ISA ext.
6
4
5
6
3.51 ×
9,587
Databases
Hash Probe †
Probes a hash table for a match
ISA ext.
13
4
10
16
6.23 ×
3,415
Table 3. The five representative families of each category, with the number of workloads, FuncName groups, and DFG-Class groups that their code spans, and the largest speedup of their code. Families marked with † are discussed in Sections 5.1 – 5.6 .
Outside largest
Category
Fam.
Members
Executions
FuncName
DFG-Class
Key-Value Stores
26
207
279,366
47.7 / 49.5
48.9 / 53.0
Databases
97
272
44,535
63.5 / 60.0
68.6 / 59.2
Web Services
30
367
567,337
68.2 / 77.4
72.3 / 81.4
Search
27
242
338,524
37.1 / 45.3
39.1 / 49.5
Video Transcoding
23
1,196
107,659
66.5 / 82.6
73.4 / 81.5
Table 4. Families that merge several hot regions, with their members and checked executions. The last two columns show the average share (%) of the instructions / cycles of a family outside its largest function name and dataflow graph.
Figure 5. Hash Mixing unit for key-value stores.
Figure 6. Hash Probe unit for databases.
Figure 7. Hash Slot Location unit for web services.
Figure 8. Tree Descent unit for search.
Figure 9. SATD Scoring unit for video transcoding.
Figure 10. Escape Length unit (left) and Escape Copy unit (right) for AI agents.
Figure 11. Share of the instructions (top) and cycles (bottom) that the top N targets of each method cover in each category.
Figure 12. End-to-end speedup of each workload with the five units of its category, and the ideal speedup.
Figure 13. Area of the five units of each category. Dashed lines are the area that common core enhancements add.
Figure 14. Objections raised in the agentic AI pipeline.
Figure 15. Instruction coverage on the discovery and held-out windows: (a) of the top 20 targets of Lodestone and Region in each category, and (b) of each family of Lodestone.
Figure 16. Cost of one discovery run of each category.
Category 1 (2 services)
Category 2 (3 services)
Method
N=10
N=20
N=100
N=10
N=20
N=100
Lodestone
35.4
43.6
52.7
19.0
24.7
31.9
FuncName
34.4
43.1
52.8
17.1
22.3
31.9
Func
33.4
41.2
52.5
14.1
19.6
31.4
DFG-Class
29.5
36.9
49.8
11.6
15.6
26.7
DFG-Exact
29.4
36.1
49.6
10.6
14.6
25.8
Table 5. Instruction coverage (%) of the top N targets of each method in two categories of production services.