message: perf(ivy): remove firstTemplatePass check from directive instantiation
  PR Close
diff: @@ -1030,7 +1030,7 @@ export function resolveDirectives(
  localRefs: string[] | null): void {
  // Please make sure to have explicit type for `exportsMap`. Inferred type triggers bug in
  // tsickle.
  - ngDevMode && assertEqual(tView.firstTemplatePass, true, 'should run on first template pass only');
  + ngDevMode && assertFirstTemplatePass(tView);
  if (!getBindingsEnabled()) return;
  @@ -1062,6 +1062,10 @@ export function resolveDirectives(
  saveNameToExportMap(tView.data !.length - 1, def, exportsMap);
  + if (def.contentQueries) {
  + tNode.flags |= TNodeFlags.hasContentQuery;
  + }
  +
  // Init hooks are queued now so ngOnInit is called in host components before
  // any projected components.
  registerPreOrderHooks(
  @@ -1171,10 +1175,6 @@ function postProcessDirective<T>(
  setInputsFromAttrs(directiveDefIdx, directive, def, previousOrParentTNode);
  }
  - if (viewData[TVIEW].firstTemplatePass && def.contentQueries) {
  - previousOrParentTNode.flags |= TNodeFlags.hasContentQuery;
  - }
  -
  if (isComponentDef(def)) {
  const componentView = getComponentViewByIndex(previousOrParentTNode.index, viewData);
  componentView[CONTEXT] = directive;
  