[all-commits] [llvm/llvm-project] 1d3f9f: [SelectionDAG] Stop storing EVTs in a function sco...
Craig Topper via All-commits
all-commits at lists.llvm.org
Thu Dec 5 12:56:58 PST 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 1d3f9f886288d9be08772ed348c382a479cf857f
https://github.com/llvm/llvm-project/commit/1d3f9f886288d9be08772ed348c382a479cf857f
Author: Craig Topper <craig.topper at sifive.com>
Date: 2024-12-05 (Thu, 05 Dec 2024)
Changed paths:
M llvm/include/llvm/CodeGen/SelectionDAG.h
M llvm/include/llvm/CodeGen/SelectionDAGNodes.h
M llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
Log Message:
-----------
[SelectionDAG] Stop storing EVTs in a function scoped static std::set. (#118715)
EVTs potentially contain a Type * that points into memory owned by an
LLVMContext. Storing them in a function scoped static means they may
outlive the LLVMContext they point to.
This std::set is used to unique single element VT lists containing a
single extended EVT. Single element VT list with a simple EVT are
uniqued by a separate cache indexed by the MVT::SimpleValueType enum. VT
lists with more than one element are uniqued by a FoldingSet owned by
the SelectionDAG object.
This patch moves the single element cache into SelectionDAG so that it
will be destroyed when SelectionDAG is destroyed.
Fixes #88233
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list