mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 22:02:55 +01:00
Directly convert from an initializer to a value where possible. (#3306)
If the initializing representation is the same as the value representation, don't materialize a temporary and perform a value binding. Instead, directly extract the value, using a new `value_of_initializer` node. This removes a lot of redundant `alloca`s from our generated LLVM IR.
This commit is contained in:
@@ -695,6 +695,7 @@ class TypeCompleter {
|
||||
case SemIR::TupleValue::Kind:
|
||||
case SemIR::UnaryOperatorNot::Kind:
|
||||
case SemIR::ValueAsReference::Kind:
|
||||
case SemIR::ValueOfInitializer::Kind:
|
||||
case SemIR::VarStorage::Kind:
|
||||
CARBON_FATAL() << "Type refers to non-type node " << node;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user