From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lj1-x22a.google.com (mail-lj1-x22a.google.com [IPv6:2a00:1450:4864:20::22a]) by sourceware.org (Postfix) with ESMTPS id 565123858408 for ; Wed, 28 Feb 2024 08:33:49 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 565123858408 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 565123858408 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::22a ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1709109243; cv=none; b=jkjqCojUvly9Ic52nheyzmfI7ffXLZlCRi36Hp7NQA7MCnZuhkU4/ahUQY0L4SQrTM/dY5HoMzRvD/eDIuINt6jD/ZdSrNBl5GYHYKQoKR8W1H8plVfvzivUrF2bmwOGDJALnTxRBYhJwDvPcqHNnaQwUEjPi5byoVb/j6utfdA= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1709109243; c=relaxed/simple; bh=0CwgK60UrxS0TBiQYX/h0sE449pjqEDthytXhLBcDiU=; h=DKIM-Signature:MIME-Version:From:Date:Message-ID:Subject:To; b=PRKJ7lum9BE98QNA/qz+pLBnbUqaDH+GNtbMT82R065tzBLKCrAwvh2T08p0+eVTeDADM1q2AnjMpinG6N/9lUl7UH6PNMnUyqUuCqk0ARgH7ofxA2ahvMIiYCrJGzrncBiuCc6cjEQQ35uNli4vBR+8KN3uMbxLYdjP7YQb9HE= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-lj1-x22a.google.com with SMTP id 38308e7fff4ca-2d2ab9c5e83so12899761fa.2 for ; Wed, 28 Feb 2024 00:33:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1709109228; x=1709714028; darn=gcc.gnu.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=7ajeRe/n352jsJ9QnVs9HIt3z5VbRJdvuIAwTK7xT+g=; b=jUfV/OgZWePs3JQGcDCcgZTLXVLDgtl6uYAQ4sBnKpLcpJZMvOVR9lInfeKjzafyZq 83QI4JDS7dCzQEbs6etAtxwM7K7S817s3NMt/gs6DA5NufcPt52MnB18B6Sw8p6eZRpr b7JpmHQpBLFVqrQRg59lNO6P+HrS/rC4syy79IZABbE3ELclqKestDRNT0QuGFMNmILT E3aG1aGHbbrR+Djaf7ZtlxzavX2lCPSwvDbNVn4qa1XeqZWhswAcsx5o7J7cEEoxCCYI YfPen/HLYaABmGymN1Ik7nkgOJX03WJO/qWFe4v1AEvjiciBp7SVTKerr5YqmIDCZmkn LhUQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709109228; x=1709714028; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=7ajeRe/n352jsJ9QnVs9HIt3z5VbRJdvuIAwTK7xT+g=; b=K04cULqfpOktrKXGAa4Tf4T8aBCM2LYSPbimMyy1LvYmzfj7V6TO0c5mBORENjpCka 07O2bbgCaEGxcq9GH7FqtkW4fRTfpeYbtcN5nIY6SllHu5WE1120sdpXMTscba4yEujn 3HSHO7u0Yv7dgHgte6GBU4RyqKyfaJRvRq7ZqqU3/XFS3//eBumZbjtHF982Uqrh0gSh p2u5dbRCFDDPlsSKlIPY1EAcAo6M/rsnd5C2Bf0F8r9re33CNjEhtPbi+P/8IlfCtCGC sRfw5QmBPnk35QWM9PwTWfVn9cOcVAqKNfK2ySBs5hi6JNnC/27hHKBuyhNhYl+q3Y7B PMsA== X-Forwarded-Encrypted: i=1; AJvYcCWf5Pmby+yHiJyLhUVtIGYJ3EWPwdL8lrVd2BYPO+KvR+z68slbrMnzsMYHF3StOJ6wd9j1fJd3bqaL0ypdM4sZEiow/KmEyw== X-Gm-Message-State: AOJu0YzSw2U4oiafVwy+nKYAPDAY1G4l3nff33NZh11kGSAC6gJyb0Pj Fd6ltu7b83x+tQwgjaCehn79oj/OOsuuYSJ6+LhtSxAf7u96pqbtply7PV59JM0LMxPBDHBVuaM tq45qKsdWArmGUCBrlrYBOevZUiM= X-Google-Smtp-Source: AGHT+IFLOmtfI4t7Nmu6YQN9sqLpBvOgt7NLyhu0sF2RmorscOMiRydz2nuzX7H4efrHgP+vwuhoALWekpmB5dVs7Y0= X-Received: by 2002:a2e:a586:0:b0:2d2:7e19:f6 with SMTP id m6-20020a2ea586000000b002d27e1900f6mr8325964ljp.23.1709109227478; Wed, 28 Feb 2024 00:33:47 -0800 (PST) MIME-Version: 1.0 References: <009401da65ae$8790a750$96b1f5f0$@symas.com> <09de01da69c2$c5f57260$51e05720$@symas.com> In-Reply-To: From: Richard Biener Date: Wed, 28 Feb 2024 09:33:36 +0100 Message-ID: Subject: Re: [PATCH] developer option: -fdump-generic-nodes; initial incorporation To: Jakub Jelinek Cc: Robert Dubner , gcc-patches@gcc.gnu.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On Wed, Feb 28, 2024 at 9:25=E2=80=AFAM Jakub Jelinek wr= ote: > > On Wed, Feb 28, 2024 at 08:58:08AM +0100, Richard Biener wrote: > > Incidentially this looks like something fit for a google summer of code= project. > > Ideally it would hook into print-tree.cc providing an alternate > > structured output. > > It currently prints in the style > > > > > type > type > size > > unit-size > > align:16 warn_if_not_align:0 symtab:0 alias-set -1 > > canonical-type 0x7ffff702b540 precision:16 min > 0x7ffff702d138 0> max > > > QI > > size > > unit-size > > ... > > > > where you can see it follows tree -> tree edges up to some depth > > (and avoids repeated expansion). When debugging that's all I have > > and I have to follow edges by matching up the raw addresses printed, > > re-dumping those that didn't get expanded. HTML would be indeed > > so much nicer here (and a more complete output). > > I think keeping the current format of what is printed but optionally just > turn all those addresses in there into hyperlinks which would expand the > other trees would be nice. Maybe also allow just hovering on the link an= d > show the other tree printed might be nice too. > Folding it all into just ...> > would mean one can't quickly access just the min/max or fn return type > etc. We might need some parameter how deep to go (and/or how many trees = to > dump at most) so that we don't dump into HTML gigabytes of data when aski= ng > to print say a large BIND_EXPR into HTML. Btw, when in a debugging session I'd be fine with something like (gdb) html-tree $3 creating a temporary file and spawning a window using the default .html file handler with this being implemented in the python bindings similar to how we handle dot-fn. I realize that some terminals might support parts of that "inline" (I bet my xterm doesn't ;)). I think HTML might be machine-readable enough for this purpose so indirecting via JSON or XML or whatnot isn't necessary (we don't aim for this to be a way to extract GENERIC and feed it to another compiler= ). Richard. > > Jakub >