Page MenuHomePhabricator

asavonic (Andrew Savonichev)
User

Projects

User does not belong to any projects.

User Details

User Since
Jun 2 2016, 11:01 PM (317 w, 12 h)

Recent Activity

Mon, Jun 27

asavonic added inline comments to D124787: [NVPTX] Implement NVPTX AliasAnalysis.
Mon, Jun 27, 11:33 AM · Restricted Project, Restricted Project
asavonic updated the diff for D124787: [NVPTX] Implement NVPTX AliasAnalysis.
Mon, Jun 27, 11:33 AM · Restricted Project, Restricted Project

Wed, Jun 15

asavonic added inline comments to D127668: [NVPTX] Fix pointer type for short 32-bit pointers.
Wed, Jun 15, 3:21 PM · Restricted Project, Restricted Project
asavonic requested review of D127878: [NVPTX] Fix constant expression initializers for global variables.
Wed, Jun 15, 10:07 AM · Restricted Project, Restricted Project
asavonic requested review of D127866: [NVPTX] Fix issues in ptxas integration to LIT tests.
Wed, Jun 15, 8:19 AM · Restricted Project, Restricted Project

Mon, Jun 13

asavonic updated the diff for D127668: [NVPTX] Fix pointer type for short 32-bit pointers.
  • Added ptxas RUN lines.
  • Removed test case with .local global variable because ptxas does not support them.
Mon, Jun 13, 10:14 AM · Restricted Project, Restricted Project
asavonic added inline comments to D127668: [NVPTX] Fix pointer type for short 32-bit pointers.
Mon, Jun 13, 10:05 AM · Restricted Project, Restricted Project
asavonic requested review of D127668: [NVPTX] Fix pointer type for short 32-bit pointers.
Mon, Jun 13, 9:46 AM · Restricted Project, Restricted Project

May 30 2022

asavonic accepted D126632: [AArch64] Look through copy in MachineCombiner FMUL patterns..

LGTM, thanks!

May 30 2022, 1:29 AM · Restricted Project, Restricted Project

May 18 2022

asavonic added a comment to D125693: [DebugInfo] Support types, imports and static locals declared in a lexical block (3/5).

Thanks a lot for the patch! It would be great to get this issue finally fixed. I assume that this is the main patch, other patches in the stack seem like just preparation/adjustments needed for this one to work.

May 18 2022, 12:21 PM · debug-info, Restricted Project, Restricted Project, Restricted Project

May 3 2022

asavonic added a comment to D119669: [NVPTX] Prefix "$L__" for branch label names.

So, prefixing with $ does not solve the problem completely.

Indeed it's still possible to break compilation for both clang and nvcc: https://godbolt.org/z/9h649eMMn

May 3 2022, 12:58 PM · Restricted Project, Restricted Project

May 2 2022

Herald added a project to D112466: [NVPTX] Drop memory references of LDG/LDU: Restricted Project.

Sorry, this got pushed back by other things, but I'd like to return to this conversation. I've uploaded a patch to add a simple AA that takes NVPTX address spaces into account and implements pointsToConstantMemory (D124787). This patch should be useful on its own, but I'm no longer sure that it is enough to safely (performace-wise) add mayLoad to LDU/LDG instructions.

May 2 2022, 10:58 AM · Restricted Project, Restricted Project
asavonic requested review of D124787: [NVPTX] Implement NVPTX AliasAnalysis.
May 2 2022, 10:55 AM · Restricted Project, Restricted Project

Apr 28 2022

asavonic added a comment to D121727: [NVPTX] Integrate ptxas to LIT tests.

It looks very weird to me to have LLVM's test suite support calling some proprietary tool. I can see how this is useful, but imho it doesn't belong into LLVM itself.

This is both for practical and other reasons.

From a practical point of view, if we rely on this tool for testing in LLVM, it means we can't run LLVM's tests on platforms that that tool doesn't run on.

Apr 28 2022, 7:11 AM · Restricted Project, Restricted Project
asavonic committed rG0f1b5f115a7f: [NVPTX] Integrate ptxas to LIT tests (authored by asavonic).
[NVPTX] Integrate ptxas to LIT tests
Apr 28 2022, 5:03 AM · Restricted Project, Restricted Project
asavonic closed D121727: [NVPTX] Integrate ptxas to LIT tests.
Apr 28 2022, 5:02 AM · Restricted Project, Restricted Project

Apr 27 2022

asavonic committed rG1041a9642ba0: [lit] Support %if ... %else syntax for RUN lines (authored by asavonic).
[lit] Support %if ... %else syntax for RUN lines
Apr 27 2022, 10:30 AM · Restricted Project, Restricted Project
asavonic closed D122569: [lit] Support %if ... %else syntax for RUN lines.
Apr 27 2022, 10:30 AM · Restricted Project, Restricted Project
asavonic closed D124473: [NVPTX] Fix NVPTX DebugInfo tests on Windows.

Merged 99333026607f.

Apr 27 2022, 7:34 AM · Restricted Project, Restricted Project
asavonic committed rG99333026607f: [NVPTX] Fix NVPTX DebugInfo tests on Windows (authored by asavonic).
[NVPTX] Fix NVPTX DebugInfo tests on Windows
Apr 27 2022, 7:33 AM · Restricted Project, Restricted Project
asavonic updated the diff for D124473: [NVPTX] Fix NVPTX DebugInfo tests on Windows.
Apr 27 2022, 3:09 AM · Restricted Project, Restricted Project
asavonic updated the diff for D124473: [NVPTX] Fix NVPTX DebugInfo tests on Windows.

I missed two other tests that failed because of the same issue: debug-file-loc.ll and debug-file-loc-only.ll.
@thakis tried to fix them in a1bb5719eca6 (thanks a lot!), but I'm not sure if it helped - we need two backslash characters in the regex.

Apr 27 2022, 2:30 AM · Restricted Project, Restricted Project

Apr 26 2022

asavonic requested review of D124473: [NVPTX] Fix NVPTX DebugInfo tests on Windows.
Apr 26 2022, 12:54 PM · Restricted Project, Restricted Project
asavonic committed rG8628b54038e9: [NVPTX] Temporary disable dwarf-file-dir.ll on Windows (authored by asavonic).
[NVPTX] Temporary disable dwarf-file-dir.ll on Windows
Apr 26 2022, 12:34 PM · Restricted Project, Restricted Project
asavonic committed rGe44795048373: [NFC] Fix order of initialization in MCTargetOptions (authored by asavonic).
[NFC] Fix order of initialization in MCTargetOptions
Apr 26 2022, 12:34 PM · Restricted Project, Restricted Project
asavonic committed rG0a27622a1d62: [NVPTX] Disable DWARF .file directory for PTX (authored by asavonic).
[NVPTX] Disable DWARF .file directory for PTX
Apr 26 2022, 11:44 AM · Restricted Project, Restricted Project, Restricted Project
asavonic closed D121299: [NVPTX] Disable DWARF .file directory for PTX.
Apr 26 2022, 11:43 AM · Restricted Project, Restricted Project, Restricted Project
asavonic committed rG541cbeeddbe9: [NVPTX][tests] add "XFAIL: nvptx" for some tests (authored by i-chebykin).
[NVPTX][tests] add "XFAIL: nvptx" for some tests
Apr 26 2022, 7:28 AM · Restricted Project, Restricted Project
asavonic committed rG84cf290c8480: [NVPTX][tests] Do not run the tests which are not supported by nvptx (authored by i-chebykin).
[NVPTX][tests] Do not run the tests which are not supported by nvptx
Apr 26 2022, 7:28 AM · Restricted Project, Restricted Project
asavonic closed D124125: [NVPTX][tests] add "XFAIL: nvptx" for some tests.
Apr 26 2022, 7:27 AM · Restricted Project, Restricted Project
asavonic closed D123928: [NVPTX][tests] Do not run the tests which are not supported by nvptx.
Apr 26 2022, 7:27 AM · Restricted Project, Restricted Project

Apr 25 2022

asavonic added a comment to D121299: [NVPTX] Disable DWARF .file directory for PTX.

I'm going to merge the patch in a couple of days, unless anyone has a strong opinion against it.
Alternative options:

  • revert this default back to false (not great for other targets)
  • add a check for Triple == NVPTX directly to llc (tools other than llc will have to replicate the same logic)
Apr 25 2022, 8:37 AM · Restricted Project, Restricted Project, Restricted Project
asavonic updated the diff for D121727: [NVPTX] Integrate ptxas to LIT tests.
  • Reimplemented ptxas RUN lines to use pipes instead of temporary files
Apr 25 2022, 7:56 AM · Restricted Project, Restricted Project

Apr 21 2022

asavonic committed rG96e748701377: [NVPTX] Fix LIT tests with default nameTableKind (authored by asavonic).
[NVPTX] Fix LIT tests with default nameTableKind
Apr 21 2022, 6:14 AM · Restricted Project, Restricted Project
asavonic closed D124108: [NVPTX] Fix LIT tests with default nameTableKind.
Apr 21 2022, 6:14 AM · Restricted Project, Restricted Project
asavonic added a comment to D122569: [lit] Support %if ... %else syntax for RUN lines.

I've made a few requests for minor test and doc extensions, but otherwise this LGTM.

Given the recent syntax changes, please give other reviewers a couple more days to comment before landing this.

Thanks for all your work.

Apr 21 2022, 4:45 AM · Restricted Project, Restricted Project
asavonic updated the diff for D122569: [lit] Support %if ... %else syntax for RUN lines.
  • Added negative tests for parsing errors.
  • Added tests for spaces in an %else block, tests with %{sub} substitution.
Apr 21 2022, 4:19 AM · Restricted Project, Restricted Project

Apr 20 2022

asavonic added a comment to D121299: [NVPTX] Disable DWARF .file directory for PTX.

ping

Apr 20 2022, 2:40 PM · Restricted Project, Restricted Project, Restricted Project
asavonic added a comment to D121727: [NVPTX] Integrate ptxas to LIT tests.

Right, but then we can't pipe it to file check. Something like this should work, but it is not portable:

llc ... | tee %t.ptx | FileCheck
ptxas %.ptx

What stops us doing it the same way we do for all the test cases? E.g.

RUN: llc ... %s |  FileCheck
RUN: %if ptxas %{ llc... %s | ptxas - %}
Apr 20 2022, 1:07 PM · Restricted Project, Restricted Project
asavonic added a comment to D121727: [NVPTX] Integrate ptxas to LIT tests.

One disadvantage of this patch is that we can no longer pipe llc output to FileCheck: we have to use -o option with a temporary file. This may break update_llc_checks.py, but I haven't confirmed this yet.

We don't have to use a temporary file, I think. ptxas can get its own input from its own llc invocation
echo -e '.version 3.2\n.target sm_20\n.address_size 64' | $HOME/local/cuda-11.2/bin/ptxas - works for me.

Apr 20 2022, 12:49 PM · Restricted Project, Restricted Project
asavonic added a comment to D121727: [NVPTX] Integrate ptxas to LIT tests.

I've tested the patch against every ptxas release from 9.0 to the latest 11.6. Version 9.0 is the earliest version that I was able to install on my Debian oldstable machine, so it seems like a good minimal version that we can support. Also, it is worth noting that ptxas is not completely backwards compatible: newer version can drop old SM versions, so we sometimes need to account for this. For example:

; sm_30 is dropped by ptxas 11.0
; RUN: %if ptxas %{ %ptxas-verify %if !ptxas-11.0 %{-arch=sm_30%} %t.ptx %}

One disadvantage of this patch is that we can no longer pipe llc output to FileCheck: we have to use -o option with a temporary file. This may break update_llc_checks.py, but I haven't confirmed this yet.
We can use tee to avoid this, but it is not portable. Perhaps we can write a simple version of tee and add it to LLVM tools.

Apr 20 2022, 12:32 PM · Restricted Project, Restricted Project
asavonic updated the diff for D121727: [NVPTX] Integrate ptxas to LIT tests.
  • Added LLVM_PTXAS_EXECUTABLE environment variable to simplify testing against different ptxas versions.
  • Rebased on top of D122569.
  • Integrated ptxas to all tests in CodeGen/NVPTX and DebugInfo/NVPTX.
Apr 20 2022, 12:18 PM · Restricted Project, Restricted Project
asavonic requested review of D124108: [NVPTX] Fix LIT tests with default nameTableKind.
Apr 20 2022, 10:28 AM · Restricted Project, Restricted Project

Apr 19 2022

asavonic added a comment to D122569: [lit] Support %if ... %else syntax for RUN lines.

While this is not a huge amount of code to be added to lit, I do wonder if we really need it. Wouldn't something like %feature{foo} that expands to 0 or 1 be sufficient? You could then use shell conditionals/test to avoid running lines.
Looking at the examples from D121727, you could do the following:

RUN: if [ %feature{ptxas} -ne 0 ]; then ptxas -c %t-nvptx.ptx -o /dev/null; fi
RUN: test %feature{ptxas} -ne 0 && ptxas -c %t-nvptx.ptx -o /dev/null
Apr 19 2022, 6:13 AM · Restricted Project, Restricted Project

Apr 18 2022

asavonic added a comment to D122569: [lit] Support %if ... %else syntax for RUN lines.

Please don't forget to also update the llvm/utils/update_*_checks.py.

It seems that update_*_checks.py scripts are completely independent of lit.py, so there is no way to easily reuse code between them. Parsing of RUN lines and standard substitutions is duplicated there. We have to either integrate these scripts, or copy paste the code.

I had some code in the downstream CHERI LLVM to expand substitutions using lit. The downside is that the update scripts need to know the path to the build dir to get all the lit config files, but if there is interest I'd be happy to upstream that change.

Apr 18 2022, 7:13 AM · Restricted Project, Restricted Project
asavonic updated the diff for D122569: [lit] Support %if ... %else syntax for RUN lines.
  • Reimplemented the parser as a recursive function
  • Changed syntax: %if cond { branch_if } %else { branch_else } to %if cond %{ branch_if %} %else %{ branch_else %}
Apr 18 2022, 7:10 AM · Restricted Project, Restricted Project

Apr 17 2022

asavonic committed rG52053aa94fe9: [NVPTX] Disable parens for identifiers starting with '$' (authored by asavonic).
[NVPTX] Disable parens for identifiers starting with '$'
Apr 17 2022, 8:03 AM · Restricted Project, Restricted Project
asavonic closed D123702: [NVPTX] Disable parens for identifiers starting with '$'.
Apr 17 2022, 8:03 AM · Restricted Project, Restricted Project

Apr 15 2022

asavonic added inline comments to D123702: [NVPTX] Disable parens for identifiers starting with '$'.
Apr 15 2022, 1:22 PM · Restricted Project, Restricted Project
asavonic reopened D123702: [NVPTX] Disable parens for identifiers starting with '$'.
Apr 15 2022, 6:39 AM · Restricted Project, Restricted Project
asavonic updated the diff for D123702: [NVPTX] Disable parens for identifiers starting with '$'.
  • Fixed issues found in Mips LIT tests: MCAsmStreamer had one call to 'operator<<' function which doesn't pass MAI to MCExpr::print.
Apr 15 2022, 6:39 AM · Restricted Project, Restricted Project

Apr 14 2022

asavonic added a comment to D123702: [NVPTX] Disable parens for identifiers starting with '$'.

What happened this time? AFAICT CUDA bots were fine with the change.

Apr 14 2022, 1:04 PM · Restricted Project, Restricted Project
asavonic added a reverting change for rG78d70a1c9769: [NVPTX] Disable parens for identifiers starting with '$': rG5193f2a55816: Revert "[NVPTX] Disable parens for identifiers starting with '$'".
Apr 14 2022, 11:27 AM · Restricted Project, Restricted Project
asavonic committed rG5193f2a55816: Revert "[NVPTX] Disable parens for identifiers starting with '$'" (authored by asavonic).
Revert "[NVPTX] Disable parens for identifiers starting with '$'"
Apr 14 2022, 11:27 AM · Restricted Project, Restricted Project
asavonic added a reverting change for D123702: [NVPTX] Disable parens for identifiers starting with '$': rG5193f2a55816: Revert "[NVPTX] Disable parens for identifiers starting with '$'".
Apr 14 2022, 11:26 AM · Restricted Project, Restricted Project
asavonic committed rG78d70a1c9769: [NVPTX] Disable parens for identifiers starting with '$' (authored by asavonic).
[NVPTX] Disable parens for identifiers starting with '$'
Apr 14 2022, 11:08 AM · Restricted Project, Restricted Project
asavonic closed D123702: [NVPTX] Disable parens for identifiers starting with '$'.
Apr 14 2022, 11:08 AM · Restricted Project, Restricted Project
asavonic added a comment to D121299: [NVPTX] Disable DWARF .file directory for PTX.

@MaskRay, should we merge this patch or rework it?

Apr 14 2022, 8:43 AM · Restricted Project, Restricted Project, Restricted Project
asavonic committed rGb6183a57a10b: [NVPTX] Fix barrier.ll LIT test (authored by asavonic).
[NVPTX] Fix barrier.ll LIT test
Apr 14 2022, 7:08 AM · Restricted Project, Restricted Project
asavonic committed rG32949401a86a: [NVPTX] Avoid dots in global names (authored by asavonic).
[NVPTX] Avoid dots in global names
Apr 14 2022, 7:08 AM · Restricted Project, Restricted Project
asavonic committed rG4cef5c397d5f: [NVPTX] .attribute(.managed) is only supported for sm_30 and PTX 4.0 (authored by asavonic).
[NVPTX] .attribute(.managed) is only supported for sm_30 and PTX 4.0
Apr 14 2022, 7:08 AM · Restricted Project, Restricted Project
asavonic committed rG230f32696497: [NVPTX] shfl.sync is introduced in PTX 6.0 (authored by asavonic).
[NVPTX] shfl.sync is introduced in PTX 6.0
Apr 14 2022, 7:08 AM · Restricted Project, Restricted Project
asavonic closed D123470: [NVPTX] Fix barrier.ll LIT test.
Apr 14 2022, 7:08 AM · Restricted Project, Restricted Project
asavonic committed rG369adba0435e: [NVPTX] 64-bit atom.{and,or,xor,min,max} require sm_32 or higher (authored by asavonic).
[NVPTX] 64-bit atom.{and,or,xor,min,max} require sm_32 or higher
Apr 14 2022, 7:08 AM · Restricted Project, Restricted Project
asavonic closed D123041: [NVPTX] Avoid dots in global names.
Apr 14 2022, 7:08 AM · Restricted Project, Restricted Project
asavonic closed D123040: [NVPTX] .attribute(.managed) is only supported for sm_30 and PTX 4.0.
Apr 14 2022, 7:08 AM · Restricted Project, Restricted Project
asavonic closed D123039: [NVPTX] shfl.sync is introduced in PTX 6.0.
Apr 14 2022, 7:08 AM · Restricted Project, Restricted Project
asavonic closed D123038: [NVPTX] 64-bit atom.{and,or,xor,min,max} require sm_32 or higher.
Apr 14 2022, 7:08 AM · Restricted Project, Restricted Project

Apr 13 2022

asavonic updated the diff for D123702: [NVPTX] Disable parens for identifiers starting with '$'.
  • Rebased and added patch context.
Apr 13 2022, 12:27 PM · Restricted Project, Restricted Project
asavonic added a comment to D123702: [NVPTX] Disable parens for identifiers starting with '$'.

This is the same issue as in D119669:

Looks like it broke CUDA:
https://lab.llvm.org/buildbot/#/builders/46/builds/23372/steps/3/logs/stdio

ptxas /tmp/complex-78abf1/complex-sm_75.s, line 250; fatal   : Parsing error near '$L__BB6_2': syntax error
Apr 13 2022, 12:18 PM · Restricted Project, Restricted Project
asavonic requested review of D123702: [NVPTX] Disable parens for identifiers starting with '$'.
Apr 13 2022, 12:15 PM · Restricted Project, Restricted Project

Apr 11 2022

asavonic added a comment to D122569: [lit] Support %if ... %else syntax for RUN lines.

Please don't forget to also update the llvm/utils/update_*_checks.py.

Apr 11 2022, 8:38 AM · Restricted Project, Restricted Project

Apr 10 2022

asavonic added inline comments to D122569: [lit] Support %if ... %else syntax for RUN lines.
Apr 10 2022, 2:49 PM · Restricted Project, Restricted Project
asavonic added a comment to D123041: [NVPTX] Avoid dots in global names.

Normally such replacement is done with nvptx-assign-valid-global-names pass, so we could pipe the tests through opt -nvptx-assign-valid-global-names which will ensure that tests don't have to know that dot is special for NVPTX. The downside is that it would have to be done for all llc tests. Perhaps we should consider moving the nvptx-assign-valid-global-names pass to the back-end.

Not using dots only fixes the issues we have now and would still leave us open to test breaks if a new NVPTX-invalid name is added by accident. I think running nvptx-assign-valid-global-names in llc may be a better solution.

Apr 10 2022, 2:10 PM · Restricted Project, Restricted Project
asavonic requested review of D123470: [NVPTX] Fix barrier.ll LIT test.
Apr 10 2022, 1:09 PM · Restricted Project, Restricted Project
asavonic added inline comments to D122569: [lit] Support %if ... %else syntax for RUN lines.
Apr 10 2022, 11:54 AM · Restricted Project, Restricted Project
asavonic updated the diff for D122569: [lit] Support %if ... %else syntax for RUN lines.
  • Reimplemented %if..%else parser to support nested expressions.
  • Added --match-full-lines to the LIT test; added more test cases.
Apr 10 2022, 11:54 AM · Restricted Project, Restricted Project

Apr 4 2022

asavonic added a comment to D121727: [NVPTX] Integrate ptxas to LIT tests.

While D122569 is waiting for feedback or approval, I've submitted these patches to fix minor issues that were found during ptxas integration:

  • D123038 [NVPTX] 64-bit atom.{and,or,xor,min,max} require sm_32 or higher
  • D123039 [NVPTX] shfl.sync is introduced in PTX 6.0
  • D123040 [NVPTX] .attribute(.managed) is only supported for sm_30 and PTX 4.0
  • D123041 [NVPTX] Avoid dots in global names
Apr 4 2022, 8:36 AM · Restricted Project, Restricted Project
asavonic requested review of D123041: [NVPTX] Avoid dots in global names.
Apr 4 2022, 8:35 AM · Restricted Project, Restricted Project
asavonic requested review of D123040: [NVPTX] .attribute(.managed) is only supported for sm_30 and PTX 4.0.
Apr 4 2022, 8:35 AM · Restricted Project, Restricted Project
asavonic requested review of D123039: [NVPTX] shfl.sync is introduced in PTX 6.0.
Apr 4 2022, 8:35 AM · Restricted Project, Restricted Project
asavonic requested review of D123038: [NVPTX] 64-bit atom.{and,or,xor,min,max} require sm_32 or higher.
Apr 4 2022, 8:34 AM · Restricted Project, Restricted Project

Mar 30 2022

asavonic updated the diff for D122569: [lit] Support %if ... %else syntax for RUN lines.
  • Combined RUN and CHECK lines into a single file.
Mar 30 2022, 12:34 PM · Restricted Project, Restricted Project
asavonic added inline comments to D122569: [lit] Support %if ... %else syntax for RUN lines.
Mar 30 2022, 12:33 PM · Restricted Project, Restricted Project

Mar 29 2022

asavonic added inline comments to D122569: [lit] Support %if ... %else syntax for RUN lines.
Mar 29 2022, 1:23 PM · Restricted Project, Restricted Project
asavonic updated the diff for D122569: [lit] Support %if ... %else syntax for RUN lines.
  • Removed extra line breaks at EOF.
Mar 29 2022, 1:15 PM · Restricted Project, Restricted Project
asavonic added a comment to D122569: [lit] Support %if ... %else syntax for RUN lines.

Have you considered the different approach of having conditional RUN lines instead? E.g.

RUN: echo this always runs
RUN(feature): echo this only runs when feature is true
RUN(!feature): echo this only runs when feature is false

RUN(feature || feature2): echo this only runs where feature or feature2 is true.
RUN(!(feature || feature2)): echo this only runs where feature and feature2 are both false

I think this would make RUN lines easier to read. It doesn't support the "else" case quite as cleanly (you have to duplicate the condition and then negate it on separate line) but I think that's pretty minor because the condition can easily be made a "feature" that is computed from other features (in a test suite's lit.cfg.py)

Mar 29 2022, 12:34 PM · Restricted Project, Restricted Project
asavonic updated the diff for D122569: [lit] Support %if ... %else syntax for RUN lines.
  • Added support for binary expressions.
  • Added handling for empty commands in RUN lines.
  • Added new tests.
Mar 29 2022, 12:34 PM · Restricted Project, Restricted Project

Mar 28 2022

asavonic added a comment to D122569: [lit] Support %if ... %else syntax for RUN lines.

Is

FileCheck %s --check-prefix={%if windows {W} else {NON-W}}

the main motivating example? You can already solve that by introducing a %check_prefix substitution in your lit.cfg.py file and expanding it to the correct thing depending on your platform. Would that suffice?

Mar 28 2022, 12:47 PM · Restricted Project, Restricted Project
asavonic updated the summary of D122569: [lit] Support %if ... %else syntax for RUN lines.
Mar 28 2022, 12:13 PM · Restricted Project, Restricted Project
asavonic added inline comments to D122569: [lit] Support %if ... %else syntax for RUN lines.
Mar 28 2022, 12:08 PM · Restricted Project, Restricted Project
asavonic added a comment to D121727: [NVPTX] Integrate ptxas to LIT tests.

Published the LIT patch to: https://reviews.llvm.org/D122569 [lit] Support %if ... %else syntax for RUN lines

Mar 28 2022, 4:16 AM · Restricted Project, Restricted Project
asavonic requested review of D122569: [lit] Support %if ... %else syntax for RUN lines.
Mar 28 2022, 4:08 AM · Restricted Project, Restricted Project

Mar 24 2022

asavonic updated the diff for D121299: [NVPTX] Disable DWARF .file directory for PTX.
  • Fixed Clang build.
Mar 24 2022, 12:10 PM · Restricted Project, Restricted Project, Restricted Project
asavonic added a comment to D121299: [NVPTX] Disable DWARF .file directory for PTX.

I just worry whether this patch may be busywork. It seems like a "UI" thing of llc anyway, not really affecting Clang.

Mar 24 2022, 11:50 AM · Restricted Project, Restricted Project, Restricted Project
asavonic updated the diff for D121299: [NVPTX] Disable DWARF .file directory for PTX.
  • Added a new field to MCAsmInfo to control default value of UseDwarfDirectory. This value is used if -dwarf-directory command line option is not specified.
Mar 24 2022, 7:43 AM · Restricted Project, Restricted Project, Restricted Project
asavonic added a comment to D121299: [NVPTX] Disable DWARF .file directory for PTX.

I traced it back to 2011 (commit 40f8f2ff "Add support for a new extension to the .file directive") , where it it was added as an extension and (I assume) later included into DWARFv5. Do we still want to support it as an extension for DWARF < 5, or it is only needed for integrated assembler?

The DWARF line table has had separate directory and file lists going back to DWARF v2; this .file directive syntax is unrelated to DWARF version.
If some external assemblers don't support the split .file syntax, the flags/conditions should reflect that based on target or whatever. Certainly not on DWARF version.

Mar 24 2022, 7:42 AM · Restricted Project, Restricted Project, Restricted Project

Mar 20 2022

asavonic added a comment to D121299: [NVPTX] Disable DWARF .file directory for PTX.

The question is whether this is the right place to do it, or would it better to do it wherever UseDwarfDirectory is set.

Mar 20 2022, 3:34 AM · Restricted Project, Restricted Project, Restricted Project

Mar 17 2022

asavonic updated the diff for D121727: [NVPTX] Integrate ptxas to LIT tests.
  • Added a draft for %(when cond command) LIT syntax.
Mar 17 2022, 1:39 PM · Restricted Project, Restricted Project
asavonic added a comment to D121727: [NVPTX] Integrate ptxas to LIT tests.

Ideally we'd want lit to provide a way to make some RUN lines conditional on available features, so we could run more tests when we can, without having to rewrite the file.
And we don't have anything like that.

That said, I'm still not quite happy about substituting it with 'true'.
Perhaps we can do it slightly differently:

  • do not run RUN lines with ptxas in them unless the feature is available, and
  • document this auto-disabled behavior of ptxas in LLVM's lit docs.

This should give us more consistent behavior. E.g. if someone writes a test checking ptxas output with FileCheck, it would still work consistently. Replacing ptxas with true would cause the test to fail in this scenario, because the RUN line would still be executed and FileCheck would expect to see the output.
It's not quite like predicating RUN lines based on available features, but it would be close enough to be usable in this case. Combined with documentation that may do.

Mar 17 2022, 1:39 PM · Restricted Project, Restricted Project