1 //===-- LegalizeTypes.cpp - Common code for DAG type legalizer ------------===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // This file implements the SelectionDAG::LegalizeTypes method. It transforms
11 // an arbitrary well-formed SelectionDAG to only consist of legal types. This
12 // is common code shared among the LegalizeTypes*.cpp files.
14 //===----------------------------------------------------------------------===//
16 #include "LegalizeTypes.h"
17 #include "llvm/CallingConv.h"
18 #include "llvm/Support/CommandLine.h"
23 ViewLegalizeTypesDAGs("view-legalize-types-dags", cl::Hidden,
24 cl::desc("Pop up a window to show dags before legalize types"));
26 static const bool ViewLegalizeTypesDAGs = 0;
31 /// run - This is the main entry point for the type legalizer. This does a
32 /// top-down traversal of the dag, legalizing types as it goes.
33 void DAGTypeLegalizer::run() {
34 // Create a dummy node (which is not added to allnodes), that adds a reference
35 // to the root node, preventing it from being deleted, and tracking any
36 // changes of the root.
37 HandleSDNode Dummy(DAG.getRoot());
39 // The root of the dag may dangle to deleted nodes until the type legalizer is
40 // done. Set it to null to avoid confusion.
41 DAG.setRoot(SDOperand());
43 // Walk all nodes in the graph, assigning them a NodeID of 'ReadyToProcess'
44 // (and remembering them) if they are leaves and assigning 'NewNode' if
46 for (SelectionDAG::allnodes_iterator I = DAG.allnodes_begin(),
47 E = DAG.allnodes_end(); I != E; ++I) {
48 if (I->getNumOperands() == 0) {
49 I->setNodeId(ReadyToProcess);
50 Worklist.push_back(I);
52 I->setNodeId(NewNode);
56 // Now that we have a set of nodes to process, handle them all.
57 while (!Worklist.empty()) {
58 SDNode *N = Worklist.back();
60 assert(N->getNodeId() == ReadyToProcess &&
61 "Node should be ready if on worklist!");
63 // Scan the values produced by the node, checking to see if any result
66 unsigned NumResults = N->getNumValues();
68 MVT ResultVT = N->getValueType(i);
69 switch (getTypeAction(ResultVT)) {
71 assert(false && "Unknown action!");
75 PromoteIntegerResult(N, i);
78 ExpandIntegerResult(N, i);
81 SoftenFloatResult(N, i);
84 ExpandFloatResult(N, i);
87 ScalarizeResult(N, i);
93 } while (++i < NumResults);
95 // Scan the operand list for the node, handling any nodes with operands that
98 unsigned NumOperands = N->getNumOperands();
99 bool NeedsRevisit = false;
100 for (i = 0; i != NumOperands; ++i) {
101 MVT OpVT = N->getOperand(i).getValueType();
102 switch (getTypeAction(OpVT)) {
104 assert(false && "Unknown action!");
108 NeedsRevisit = PromoteIntegerOperand(N, i);
111 NeedsRevisit = ExpandIntegerOperand(N, i);
114 NeedsRevisit = SoftenFloatOperand(N, i);
117 NeedsRevisit = ExpandFloatOperand(N, i);
120 NeedsRevisit = ScalarizeOperand(N, i);
123 NeedsRevisit = SplitOperand(N, i);
129 // If the node needs revisiting, don't add all users to the worklist etc.
133 if (i == NumOperands)
134 DEBUG(cerr << "Legally typed node: "; N->dump(&DAG); cerr << "\n");
138 // If we reach here, the node was processed, potentially creating new nodes.
139 // Mark it as processed and add its users to the worklist as appropriate.
140 N->setNodeId(Processed);
142 for (SDNode::use_iterator UI = N->use_begin(), E = N->use_end();
144 SDNode *User = UI->getUser();
145 int NodeID = User->getNodeId();
146 assert(NodeID != ReadyToProcess && NodeID != Processed &&
147 "Invalid node id for user of unprocessed node!");
149 // This node has two options: it can either be a new node or its Node ID
150 // may be a count of the number of operands it has that are not ready.
152 User->setNodeId(NodeID-1);
154 // If this was the last use it was waiting on, add it to the ready list.
155 if (NodeID-1 == ReadyToProcess)
156 Worklist.push_back(User);
160 // Otherwise, this node is new: this is the first operand of it that
161 // became ready. Its new NodeID is the number of operands it has minus 1
162 // (as this node is now processed).
163 assert(NodeID == NewNode && "Unknown node ID!");
164 User->setNodeId(User->getNumOperands()-1);
166 // If the node only has a single operand, it is now ready.
167 if (User->getNumOperands() == 1)
168 Worklist.push_back(User);
172 // If the root changed (e.g. it was a dead load, update the root).
173 DAG.setRoot(Dummy.getValue());
177 // Remove dead nodes. This is important to do for cleanliness but also before
178 // the checking loop below. Implicit folding by the DAG.getNode operators can
179 // cause unreachable nodes to be around with their flags set to new.
180 DAG.RemoveDeadNodes();
182 // In a debug build, scan all the nodes to make sure we found them all. This
183 // ensures that there are no cycles and that everything got processed.
185 for (SelectionDAG::allnodes_iterator I = DAG.allnodes_begin(),
186 E = DAG.allnodes_end(); I != E; ++I) {
189 // Check that all result types are legal.
190 for (unsigned i = 0, NumVals = I->getNumValues(); i < NumVals; ++i)
191 if (!isTypeLegal(I->getValueType(i))) {
192 cerr << "Result type " << i << " illegal!\n";
196 // Check that all operand types are legal.
197 for (unsigned i = 0, NumOps = I->getNumOperands(); i < NumOps; ++i)
198 if (!isTypeLegal(I->getOperand(i).getValueType())) {
199 cerr << "Operand type " << i << " illegal!\n";
203 if (I->getNodeId() != Processed) {
204 if (I->getNodeId() == NewNode)
205 cerr << "New node not 'noticed'?\n";
206 else if (I->getNodeId() > 0)
207 cerr << "Operand not processed?\n";
208 else if (I->getNodeId() == ReadyToProcess)
209 cerr << "Not added to worklist?\n";
214 I->dump(&DAG); cerr << "\n";
221 /// AnalyzeNewNode - The specified node is the root of a subtree of potentially
222 /// new nodes. Correct any processed operands (this may change the node) and
223 /// calculate the NodeId.
224 void DAGTypeLegalizer::AnalyzeNewNode(SDNode *&N) {
225 // If this was an existing node that is already done, we're done.
226 if (N->getNodeId() != NewNode)
229 // Remove any stale map entries.
232 // Okay, we know that this node is new. Recursively walk all of its operands
233 // to see if they are new also. The depth of this walk is bounded by the size
234 // of the new tree that was constructed (usually 2-3 nodes), so we don't worry
235 // about revisiting of nodes.
237 // As we walk the operands, keep track of the number of nodes that are
238 // processed. If non-zero, this will become the new nodeid of this node.
239 // Already processed operands may need to be remapped to the node that
240 // replaced them, which can result in our node changing. Since remapping
241 // is rare, the code tries to minimize overhead in the non-remapping case.
243 SmallVector<SDOperand, 8> NewOps;
244 unsigned NumProcessed = 0;
245 for (unsigned i = 0, e = N->getNumOperands(); i != e; ++i) {
246 SDOperand OrigOp = N->getOperand(i);
247 SDOperand Op = OrigOp;
249 if (Op.Val->getNodeId() == Processed)
252 if (Op.Val->getNodeId() == NewNode)
253 AnalyzeNewNode(Op.Val);
254 else if (Op.Val->getNodeId() == Processed)
257 if (!NewOps.empty()) {
258 // Some previous operand changed. Add this one to the list.
259 NewOps.push_back(Op);
260 } else if (Op != OrigOp) {
261 // This is the first operand to change - add all operands so far.
262 for (unsigned j = 0; j < i; ++j)
263 NewOps.push_back(N->getOperand(j));
264 NewOps.push_back(Op);
268 // Some operands changed - update the node.
270 N = DAG.UpdateNodeOperands(SDOperand(N, 0), &NewOps[0], NewOps.size()).Val;
272 N->setNodeId(N->getNumOperands()-NumProcessed);
273 if (N->getNodeId() == ReadyToProcess)
274 Worklist.push_back(N);
278 /// NodeUpdateListener - This class is a DAGUpdateListener that listens for
279 /// updates to nodes and recomputes their ready state.
280 class VISIBILITY_HIDDEN NodeUpdateListener :
281 public SelectionDAG::DAGUpdateListener {
282 DAGTypeLegalizer &DTL;
284 explicit NodeUpdateListener(DAGTypeLegalizer &dtl) : DTL(dtl) {}
286 virtual void NodeDeleted(SDNode *N, SDNode *E) {
287 assert(N->getNodeId() != DAGTypeLegalizer::Processed &&
288 N->getNodeId() != DAGTypeLegalizer::ReadyToProcess &&
289 "RAUW deleted processed node!");
290 // It is possible, though rare, for the deleted node N to occur as a
291 // target in a map, so note the replacement N -> E in ReplacedNodes.
292 assert(E && "Node not replaced?");
293 DTL.NoteDeletion(N, E);
296 virtual void NodeUpdated(SDNode *N) {
297 // Node updates can mean pretty much anything. It is possible that an
298 // operand was set to something already processed (f.e.) in which case
299 // this node could become ready. Recompute its flags.
300 assert(N->getNodeId() != DAGTypeLegalizer::Processed &&
301 N->getNodeId() != DAGTypeLegalizer::ReadyToProcess &&
302 "RAUW updated processed node!");
303 DTL.ReanalyzeNode(N);
309 /// ReplaceValueWith - The specified value was legalized to the specified other
310 /// value. If they are different, update the DAG and NodeIDs replacing any uses
311 /// of From to use To instead.
312 void DAGTypeLegalizer::ReplaceValueWith(SDOperand From, SDOperand To) {
313 if (From == To) return;
315 // If expansion produced new nodes, make sure they are properly marked.
316 ExpungeNode(From.Val);
317 AnalyzeNewNode(To.Val); // Expunges To.
319 // Anything that used the old node should now use the new one. Note that this
320 // can potentially cause recursive merging.
321 NodeUpdateListener NUL(*this);
322 DAG.ReplaceAllUsesOfValueWith(From, To, &NUL);
324 // The old node may still be present in a map like ExpandedIntegers or
325 // PromotedIntegers. Inform maps about the replacement.
326 ReplacedNodes[From] = To;
329 /// ReplaceNodeWith - Replace uses of the 'from' node's results with the 'to'
330 /// node's results. The from and to node must define identical result types.
331 void DAGTypeLegalizer::ReplaceNodeWith(SDNode *From, SDNode *To) {
332 if (From == To) return;
334 // If expansion produced new nodes, make sure they are properly marked.
336 AnalyzeNewNode(To); // Expunges To.
338 assert(From->getNumValues() == To->getNumValues() &&
339 "Node results don't match");
341 // Anything that used the old node should now use the new one. Note that this
342 // can potentially cause recursive merging.
343 NodeUpdateListener NUL(*this);
344 DAG.ReplaceAllUsesWith(From, To, &NUL);
346 // The old node may still be present in a map like ExpandedIntegers or
347 // PromotedIntegers. Inform maps about the replacement.
348 for (unsigned i = 0, e = From->getNumValues(); i != e; ++i) {
349 assert(From->getValueType(i) == To->getValueType(i) &&
350 "Node results don't match");
351 ReplacedNodes[SDOperand(From, i)] = SDOperand(To, i);
356 /// RemapNode - If the specified value was already legalized to another value,
357 /// replace it by that value.
358 void DAGTypeLegalizer::RemapNode(SDOperand &N) {
359 DenseMap<SDOperand, SDOperand>::iterator I = ReplacedNodes.find(N);
360 if (I != ReplacedNodes.end()) {
361 // Use path compression to speed up future lookups if values get multiply
362 // replaced with other values.
363 RemapNode(I->second);
368 /// ExpungeNode - If N has a bogus mapping in ReplacedNodes, eliminate it.
369 /// This can occur when a node is deleted then reallocated as a new node -
370 /// the mapping in ReplacedNodes applies to the deleted node, not the new
372 /// The only map that can have a deleted node as a source is ReplacedNodes.
373 /// Other maps can have deleted nodes as targets, but since their looked-up
374 /// values are always immediately remapped using RemapNode, resulting in a
375 /// not-deleted node, this is harmless as long as ReplacedNodes/RemapNode
376 /// always performs correct mappings. In order to keep the mapping correct,
377 /// ExpungeNode should be called on any new nodes *before* adding them as
378 /// either source or target to ReplacedNodes (which typically means calling
379 /// Expunge when a new node is first seen, since it may no longer be marked
380 /// NewNode by the time it is added to ReplacedNodes).
381 void DAGTypeLegalizer::ExpungeNode(SDNode *N) {
382 if (N->getNodeId() != NewNode)
385 // If N is not remapped by ReplacedNodes then there is nothing to do.
387 for (i = 0, e = N->getNumValues(); i != e; ++i)
388 if (ReplacedNodes.find(SDOperand(N, i)) != ReplacedNodes.end())
394 // Remove N from all maps - this is expensive but rare.
396 for (DenseMap<SDOperand, SDOperand>::iterator I = PromotedIntegers.begin(),
397 E = PromotedIntegers.end(); I != E; ++I) {
398 assert(I->first.Val != N);
399 RemapNode(I->second);
402 for (DenseMap<SDOperand, SDOperand>::iterator I = SoftenedFloats.begin(),
403 E = SoftenedFloats.end(); I != E; ++I) {
404 assert(I->first.Val != N);
405 RemapNode(I->second);
408 for (DenseMap<SDOperand, SDOperand>::iterator I = ScalarizedVectors.begin(),
409 E = ScalarizedVectors.end(); I != E; ++I) {
410 assert(I->first.Val != N);
411 RemapNode(I->second);
414 for (DenseMap<SDOperand, std::pair<SDOperand, SDOperand> >::iterator
415 I = ExpandedIntegers.begin(), E = ExpandedIntegers.end(); I != E; ++I){
416 assert(I->first.Val != N);
417 RemapNode(I->second.first);
418 RemapNode(I->second.second);
421 for (DenseMap<SDOperand, std::pair<SDOperand, SDOperand> >::iterator
422 I = ExpandedFloats.begin(), E = ExpandedFloats.end(); I != E; ++I) {
423 assert(I->first.Val != N);
424 RemapNode(I->second.first);
425 RemapNode(I->second.second);
428 for (DenseMap<SDOperand, std::pair<SDOperand, SDOperand> >::iterator
429 I = SplitVectors.begin(), E = SplitVectors.end(); I != E; ++I) {
430 assert(I->first.Val != N);
431 RemapNode(I->second.first);
432 RemapNode(I->second.second);
435 for (DenseMap<SDOperand, SDOperand>::iterator I = ReplacedNodes.begin(),
436 E = ReplacedNodes.end(); I != E; ++I)
437 RemapNode(I->second);
439 for (unsigned i = 0, e = N->getNumValues(); i != e; ++i)
440 ReplacedNodes.erase(SDOperand(N, i));
444 void DAGTypeLegalizer::SetPromotedInteger(SDOperand Op, SDOperand Result) {
445 AnalyzeNewNode(Result.Val);
447 SDOperand &OpEntry = PromotedIntegers[Op];
448 assert(OpEntry.Val == 0 && "Node is already promoted!");
452 void DAGTypeLegalizer::SetSoftenedFloat(SDOperand Op, SDOperand Result) {
453 AnalyzeNewNode(Result.Val);
455 SDOperand &OpEntry = SoftenedFloats[Op];
456 assert(OpEntry.Val == 0 && "Node is already converted to integer!");
460 void DAGTypeLegalizer::SetScalarizedVector(SDOperand Op, SDOperand Result) {
461 AnalyzeNewNode(Result.Val);
463 SDOperand &OpEntry = ScalarizedVectors[Op];
464 assert(OpEntry.Val == 0 && "Node is already scalarized!");
468 void DAGTypeLegalizer::GetExpandedInteger(SDOperand Op, SDOperand &Lo,
470 std::pair<SDOperand, SDOperand> &Entry = ExpandedIntegers[Op];
471 RemapNode(Entry.first);
472 RemapNode(Entry.second);
473 assert(Entry.first.Val && "Operand isn't expanded");
478 void DAGTypeLegalizer::SetExpandedInteger(SDOperand Op, SDOperand Lo,
480 // Lo/Hi may have been newly allocated, if so, add nodeid's as relevant.
481 AnalyzeNewNode(Lo.Val);
482 AnalyzeNewNode(Hi.Val);
484 // Remember that this is the result of the node.
485 std::pair<SDOperand, SDOperand> &Entry = ExpandedIntegers[Op];
486 assert(Entry.first.Val == 0 && "Node already expanded");
491 void DAGTypeLegalizer::GetExpandedFloat(SDOperand Op, SDOperand &Lo,
493 std::pair<SDOperand, SDOperand> &Entry = ExpandedFloats[Op];
494 RemapNode(Entry.first);
495 RemapNode(Entry.second);
496 assert(Entry.first.Val && "Operand isn't expanded");
501 void DAGTypeLegalizer::SetExpandedFloat(SDOperand Op, SDOperand Lo,
503 // Lo/Hi may have been newly allocated, if so, add nodeid's as relevant.
504 AnalyzeNewNode(Lo.Val);
505 AnalyzeNewNode(Hi.Val);
507 // Remember that this is the result of the node.
508 std::pair<SDOperand, SDOperand> &Entry = ExpandedFloats[Op];
509 assert(Entry.first.Val == 0 && "Node already expanded");
514 void DAGTypeLegalizer::GetSplitVector(SDOperand Op, SDOperand &Lo,
516 std::pair<SDOperand, SDOperand> &Entry = SplitVectors[Op];
517 RemapNode(Entry.first);
518 RemapNode(Entry.second);
519 assert(Entry.first.Val && "Operand isn't split");
524 void DAGTypeLegalizer::SetSplitVector(SDOperand Op, SDOperand Lo,
526 // Lo/Hi may have been newly allocated, if so, add nodeid's as relevant.
527 AnalyzeNewNode(Lo.Val);
528 AnalyzeNewNode(Hi.Val);
530 // Remember that this is the result of the node.
531 std::pair<SDOperand, SDOperand> &Entry = SplitVectors[Op];
532 assert(Entry.first.Val == 0 && "Node already split");
538 //===----------------------------------------------------------------------===//
540 //===----------------------------------------------------------------------===//
542 /// BitConvertToInteger - Convert to an integer of the same size.
543 SDOperand DAGTypeLegalizer::BitConvertToInteger(SDOperand Op) {
544 unsigned BitWidth = Op.getValueType().getSizeInBits();
545 return DAG.getNode(ISD::BIT_CONVERT, MVT::getIntegerVT(BitWidth), Op);
548 SDOperand DAGTypeLegalizer::CreateStackStoreLoad(SDOperand Op,
550 // Create the stack frame object.
551 SDOperand FIPtr = DAG.CreateStackTemporary(DestVT);
553 // Emit a store to the stack slot.
554 SDOperand Store = DAG.getStore(DAG.getEntryNode(), Op, FIPtr, NULL, 0);
555 // Result is a load from the stack slot.
556 return DAG.getLoad(DestVT, Store, FIPtr, NULL, 0);
559 /// JoinIntegers - Build an integer with low bits Lo and high bits Hi.
560 SDOperand DAGTypeLegalizer::JoinIntegers(SDOperand Lo, SDOperand Hi) {
561 MVT LVT = Lo.getValueType();
562 MVT HVT = Hi.getValueType();
563 MVT NVT = MVT::getIntegerVT(LVT.getSizeInBits() + HVT.getSizeInBits());
565 Lo = DAG.getNode(ISD::ZERO_EXTEND, NVT, Lo);
566 Hi = DAG.getNode(ISD::ANY_EXTEND, NVT, Hi);
567 Hi = DAG.getNode(ISD::SHL, NVT, Hi, DAG.getConstant(LVT.getSizeInBits(),
568 TLI.getShiftAmountTy()));
569 return DAG.getNode(ISD::OR, NVT, Lo, Hi);
572 /// SplitInteger - Return the lower LoVT bits of Op in Lo and the upper HiVT
574 void DAGTypeLegalizer::SplitInteger(SDOperand Op,
576 SDOperand &Lo, SDOperand &Hi) {
577 assert(LoVT.getSizeInBits() + HiVT.getSizeInBits() ==
578 Op.getValueType().getSizeInBits() && "Invalid integer splitting!");
579 Lo = DAG.getNode(ISD::TRUNCATE, LoVT, Op);
580 Hi = DAG.getNode(ISD::SRL, Op.getValueType(), Op,
581 DAG.getConstant(LoVT.getSizeInBits(),
582 TLI.getShiftAmountTy()));
583 Hi = DAG.getNode(ISD::TRUNCATE, HiVT, Hi);
586 /// SplitInteger - Return the lower and upper halves of Op's bits in a value type
587 /// half the size of Op's.
588 void DAGTypeLegalizer::SplitInteger(SDOperand Op,
589 SDOperand &Lo, SDOperand &Hi) {
590 MVT HalfVT = MVT::getIntegerVT(Op.getValueType().getSizeInBits()/2);
591 SplitInteger(Op, HalfVT, HalfVT, Lo, Hi);
594 /// MakeLibCall - Generate a libcall taking the given operands as arguments and
595 /// returning a result of type RetVT.
596 SDOperand DAGTypeLegalizer::MakeLibCall(RTLIB::Libcall LC, MVT RetVT,
597 const SDOperand *Ops, unsigned NumOps,
599 TargetLowering::ArgListTy Args;
600 Args.reserve(NumOps);
602 TargetLowering::ArgListEntry Entry;
603 for (unsigned i = 0; i != NumOps; ++i) {
605 Entry.Ty = Entry.Node.getValueType().getTypeForMVT();
606 Entry.isSExt = isSigned;
607 Entry.isZExt = !isSigned;
608 Args.push_back(Entry);
610 SDOperand Callee = DAG.getExternalSymbol(TLI.getLibcallName(LC),
613 const Type *RetTy = RetVT.getTypeForMVT();
614 std::pair<SDOperand,SDOperand> CallInfo =
615 TLI.LowerCallTo(DAG.getEntryNode(), RetTy, isSigned, !isSigned, false,
616 CallingConv::C, false, Callee, Args, DAG);
617 return CallInfo.first;
620 SDOperand DAGTypeLegalizer::GetVectorElementPointer(SDOperand VecPtr, MVT EltVT,
622 // Make sure the index type is big enough to compute in.
623 if (Index.getValueType().bitsGT(TLI.getPointerTy()))
624 Index = DAG.getNode(ISD::TRUNCATE, TLI.getPointerTy(), Index);
626 Index = DAG.getNode(ISD::ZERO_EXTEND, TLI.getPointerTy(), Index);
628 // Calculate the element offset and add it to the pointer.
629 unsigned EltSize = EltVT.getSizeInBits() / 8; // FIXME: should be ABI size.
631 Index = DAG.getNode(ISD::MUL, Index.getValueType(), Index,
632 DAG.getConstant(EltSize, Index.getValueType()));
633 return DAG.getNode(ISD::ADD, Index.getValueType(), Index, VecPtr);
636 /// GetSplitDestVTs - Compute the VTs needed for the low/hi parts of a type
637 /// which is split into two not necessarily identical pieces.
638 void DAGTypeLegalizer::GetSplitDestVTs(MVT InVT, MVT &LoVT, MVT &HiVT) {
639 if (!InVT.isVector()) {
640 LoVT = HiVT = TLI.getTypeToTransformTo(InVT);
642 MVT NewEltVT = InVT.getVectorElementType();
643 unsigned NumElements = InVT.getVectorNumElements();
644 if ((NumElements & (NumElements-1)) == 0) { // Simple power of two vector.
646 LoVT = HiVT = MVT::getVectorVT(NewEltVT, NumElements);
647 } else { // Non-power-of-two vectors.
648 unsigned NewNumElts_Lo = 1 << Log2_32(NumElements);
649 unsigned NewNumElts_Hi = NumElements - NewNumElts_Lo;
650 LoVT = MVT::getVectorVT(NewEltVT, NewNumElts_Lo);
651 HiVT = MVT::getVectorVT(NewEltVT, NewNumElts_Hi);
657 //===----------------------------------------------------------------------===//
659 //===----------------------------------------------------------------------===//
661 /// LegalizeTypes - This transforms the SelectionDAG into a SelectionDAG that
662 /// only uses types natively supported by the target.
664 /// Note that this is an involved process that may invalidate pointers into
666 void SelectionDAG::LegalizeTypes() {
667 if (ViewLegalizeTypesDAGs) viewGraph();
669 DAGTypeLegalizer(*this).run();