mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-20 16:17:38 +00:00
[AVX] Make Inits Foldable
Manage Inits in a FoldingSet. This provides several benefits: - Memory for Inits is properly managed - Duplicate Inits are folded into Flyweights, saving memory - It enforces const-correctness, protecting against certain classes of bugs The above benefits allow Inits to be used in more contexts, which in turn provides more dynamism to TableGen. This enhanced capability will be used by the AVX code generator to a fold common patterns together. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134907 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -402,7 +402,7 @@ CodeGenIntrinsic::CodeGenIntrinsic(Record *R) {
|
||||
|
||||
// Parse the list of return types.
|
||||
std::vector<MVT::SimpleValueType> OverloadedVTs;
|
||||
ListInit *TypeList = R->getValueAsListInit("RetTypes");
|
||||
const ListInit *TypeList = R->getValueAsListInit("RetTypes");
|
||||
for (unsigned i = 0, e = TypeList->getSize(); i != e; ++i) {
|
||||
Record *TyEl = TypeList->getElementAsRecord(i);
|
||||
assert(TyEl->isSubClassOf("LLVMType") && "Expected a type!");
|
||||
@@ -470,7 +470,7 @@ CodeGenIntrinsic::CodeGenIntrinsic(Record *R) {
|
||||
}
|
||||
|
||||
// Parse the intrinsic properties.
|
||||
ListInit *PropList = R->getValueAsListInit("Properties");
|
||||
const ListInit *PropList = R->getValueAsListInit("Properties");
|
||||
for (unsigned i = 0, e = PropList->getSize(); i != e; ++i) {
|
||||
Record *Property = PropList->getElementAsRecord(i);
|
||||
assert(Property->isSubClassOf("IntrinsicProperty") &&
|
||||
|
||||
Reference in New Issue
Block a user