Commit Graph

13352 Commits

Author SHA1 Message Date
Kazu Hirata
1daf2994de [llvm] Use StringRef::contains (NFC) 2023-12-23 22:21:52 -08:00
Maksim Levental
366923810e [lit] add LIT_MAX_WORKERS env variable (#76205) 2023-12-22 11:05:46 -06:00
Nico Weber
650119c737 [gn] port d430c145ba (dladdr check for clang) 2023-12-22 11:34:10 -05:00
Aiden Grossman
fc3eed1bce [Github] Reformat strings for code format action (#75764)
Before this patch, there was a regression in comment formatting due to
some code formatting in bd3e8eb6e3. This
was fixed in 428660cfb9. Github interprets
a tab before a string as starting code formatting. The message that
indicted the code formatting in a PR had been fixed was refactored to a
python multi-line string, but with a tab in front, causing these
messages to be rendered as code blocks in Github, instead of as
intended. This patch builds upon the original fix to reformat the
strings so that they fit within ~80 character lines and are simpler to
modify in the future, hopefully removing traps like the one that caused
the original issue.
2023-12-21 22:49:04 -08:00
Artur Pilipenko
782cf12d11 Fix chunk-print-before-all script
After c718336c the output of print-before/print-after was changed.
A semicolon was added before the banner "*** IR Dump ..." and this
change broke chunk-print-before-all script.

This change makes it more resilient to small output format variations.
2023-12-21 21:48:04 -08:00
LLVM GN Syncbot
e6751c1a12 [gn build] Port 0ea87560cc 2023-12-21 16:46:38 +00:00
Nico Weber
4cdeef510e [gn] port c6f29dbb59 2023-12-21 11:39:24 -05:00
Nico Weber
f97e559539 [gn] port e3627e2690 (TextAPI/BinaryReader) 2023-12-21 11:39:23 -05:00
LLVM GN Syncbot
2c257cf872 [gn build] Port 5ea15fab19 2023-12-20 16:47:21 +00:00
LLVM GN Syncbot
300adbee88 [gn build] Port fdd089b500 2023-12-20 15:23:16 +00:00
LLVM GN Syncbot
d2330058df [gn build] Port 3903438860 2023-12-20 15:23:15 +00:00
Nico Weber
6cd296ed85 [gn] port e86a02ce89 (dladdr -> llvm-config.h)
Also set HAVE_DLADDR to 1 on non-Win instead of just on macOS.
That looked like an oversight.
2023-12-20 09:57:37 -05:00
Nico Weber
f1156eb5a9 [gn] port 2fd4084fca 2023-12-20 09:46:33 -05:00
Lucas Duarte Prates
b652674dd0 [AsmWriter] Ensure getMnemonic doesn't return invalid pointers (#75783)
For instructions that don't map to a mnemonic string, the implementation
of MCInstPrinter::getMnemonic would return an invalid pointer due to the
result of the calculation of the instruction's position in the `AsmStrs`
table. This patch fixes the issue by ensuring those cases return a
`nullptr` value instead.

Fixes #74177.
2023-12-20 10:09:29 +00:00
XinWang10
037c220702 [X86][MC] Support Enc/Dec for EGPR for promoted SHA instruction (#75582)
R16-R31 was added into GPRs in
https://github.com/llvm/llvm-project/pull/70958,
This patch supports the encoding/decoding for promoted SHA instruction
in EVEX space.

RFC:
https://discourse.llvm.org/t/rfc-design-for-apx-feature-egpr-and-ndd-support/73031/4
2023-12-20 13:54:50 +08:00
Arthur Eubanks
358fe49649 [gn build] Manually port 9237cfa6 2023-12-19 16:37:48 -08:00
Wang Pengcheng
9348d437f5 [SelectionDAG] Add space-optimized forms of OPC_EmitRegister (#73291)
The followed byte of `OPC_EmitRegister` is a MVT type, which is
usually i32 or i64.

We add `OPC_EmitRegisterI32` and `OPC_EmitRegisterI64` so that we
can reduce one byte.

Overall this reduces the llc binary size with all in-tree targets by
about 10K.
2023-12-19 17:31:49 +08:00
David Spickett
849c951191 [compiler-rt][asan] Remove reference to asan_lock.h which was removed.
By commit 12ed2c90a1.

Fixes #75736
2023-12-19 09:26:14 +00:00
LLVM GN Syncbot
47db1e2ab9 [gn build] Port c0d5d36dda 2023-12-19 01:24:18 +00:00
Michael Liao
33d5f4314f [TableGen] AsmParser: Keep consistent naming. NFC 2023-12-18 16:08:43 -05:00
Arthur Eubanks
363f708fcb [gn build] Manually port 945c645a and a0a3c793 2023-12-18 10:24:13 -08:00
David Spickett
428660cfb9 [GitHub] Don't indent comment that revision has passed the formatting check
Due to the way the f string was written, the text ended up with 4 spaces
at the start. 4 space indent in Markdown means plain text, which is not
what we intend here.
2023-12-18 10:54:59 +00:00
darkbuck
d14ee76181 [GISel][TableGen] Enhance default ops support (#75689)
- Instead of checking the default ops directly, this change queries DAG
default operands collected during patterns reading. It does not only
simplify the code but also handle few cases where integer values are
converted from convertible types, such as 'bits'.
- A test case is added GlobalISelEmitter.td as the regression test of
default 'bits' values.
2023-12-17 15:02:10 -05:00
LLVM GN Syncbot
b0623fa100 [gn build] Port f7407411a1 2023-12-15 16:24:52 +00:00
XinWang10
295415e720 [X86][MC] Support Enc/Dec for EGPR for promoted MOVDIR instruction (#74713)
R16-R31 was added into GPRs in
https://github.com/llvm/llvm-project/pull/70958,
This patch supports the encoding/decoding for promoted MOVDIR
instruction in EVEX space.

RFC:
https://discourse.llvm.org/t/rfc-design-for-apx-feature-egpr-and-ndd-support/73031/4
2023-12-15 16:03:17 +08:00
LLVM GN Syncbot
66e0159db8 [gn build] Port fd6e19cdc3 2023-12-14 15:39:35 +00:00
Nico Weber
3fe14bf94c [gn] port d7aee33029 (ws2_32.lib in llvm-config test) 2023-12-14 09:25:59 -05:00
Nico Weber
b94a46b5c8 Revert "[gn] port 2e45326b08 (arm streaming attrs)"
This reverts commit c60663d128.
2e45326b08 got reverted in 342384ca05
2023-12-14 06:14:16 -05:00
Simon Pilgrim
bcee4a9363 [X86] Rename VPERMI2/VPERMT2 to VPERMI2*Z/VPERMT2*Z (#75192)
Add missing AVX512 Z prefix to conform to the standard naming convention and simplify matching in X86FoldTablesEmitter::addBroadcastEntry etc.
2023-12-14 09:55:18 +00:00
LLVM GN Syncbot
8abc80eeb0 [gn build] Port ef3f476097 2023-12-14 03:31:46 +00:00
Nico Weber
b07aaf8d3b [gn] port a5ffabce98 (unix sockets -> ws2_32.lib dep everywhere O_o) 2023-12-13 22:30:45 -05:00
Nico Weber
c60663d128 [gn] port 2e45326b08 (arm streaming attrs) 2023-12-13 21:58:10 -05:00
LLVM GN Syncbot
6cad4c91ed [gn build] Port a5ffabce98 2023-12-13 19:11:22 +00:00
LLVM GN Syncbot
12f6d556d2 [gn build] Port 6892c175c5 2023-12-13 17:39:17 +00:00
Arthur Eubanks
5540d81bf3 [gn build] Manually port ed2d497291 2023-12-13 09:28:46 -08:00
Abhina Sree
ab380c287a [SystemZ][z/OS] Complete EBCDIC I/O support (#75212)
This patch completes the support for EBCDIC I/O support on z/OS using the autoconversion functions.
2023-12-13 07:46:02 -05:00
Nico Weber
65d3548f7d [gn] port 9ed20568e7 2023-12-13 06:19:32 -05:00
David Spickett
1e53386690 [llvm][TableGen][Docs] Add tools/resources links
This adds a link from the main docs page back to the README where
I have previously added a list of useful resources.

To that list, I've added a link to my recent llvm blog post.
2023-12-13 09:53:03 +00:00
Pierre van Houtryve
a160536f8d [TableGen][GlobalISel] Add specialized opcodes (#74823)
Most users of AddImm and CheckConstantInt only use 1 byte immediates, so
I added an opcode variants for those. That way all those instructions
save 7 bytes.
Also added an opcode for AddTempRegister for the cases where there are
no register flags.

Space savings:
    - AMDGPUGenGlobalISel: 470180 bytes to 422564 (-10%)
    - AArch64GenGlobalISel.inc: 383893 bytes to 374046
2023-12-13 09:09:32 +01:00
Pierre van Houtryve
a110e991c6 [GlobalISel] Change MatchTable entries to 1 byte each (#74429)
See
https://discourse.llvm.org/t/rfc-make-globalisel-match-table-entries-1-byte-instead-of-8/75411

This helps reduce llc's binary size, at the cost of some added
complexity to the MatchTable machinery.
2023-12-13 08:48:56 +01:00
Nico Weber
53ecd3a2a5 [gn] port 27259f17e9 2023-12-12 22:27:56 -05:00
LLVM GN Syncbot
cc5a3be48b [gn build] Port 6a66467499 2023-12-12 17:15:43 +00:00
Wang Pengcheng
97181bf9a0 [TableGen] Use getSizeInBits (#75157)
We know the type is scalar type.
2023-12-12 20:40:20 +08:00
wangpc
bbc7f09959 [TableGen][NFC] Remove leading spaces 2023-12-12 18:17:13 +08:00
wangpc
0c2a3d6033 [TableGen][NFC] Format parts of DAGISelMatcher.h/DAGISelMatcherGen.cpp
To reduce the diff in #73310
2023-12-12 18:11:38 +08:00
Wang Pengcheng
714417455d [SelectionDAG] Add OPC_MoveSibling (#73643)
There are a lot of operations to move current node to parent and
then move to another child.

So `OPC_MoveSibling` and its space-optimized forms are added to do
this "move to sibling" operations.

These new operations will be generated when optimizing matcher in
`ContractNodes`. Currently `MoveParent+MoveChild` will be optimized
to `MoveSibling` and sequences `MoveParent+RecordChild+MoveChild`
will be transformed into `MoveSibling+RecordNode`.

Overall this reduces the llc binary size with all in-tree targets by
about 30K.
2023-12-12 17:48:45 +08:00
Wang Pengcheng
0d5f1cc4d0 [SelectionDAG] Add space-optimized forms of OPC_EmitNode/OPC_MorphNodeTo (#73502)
If there is only one bit set in EmitNodeInfo, then we can encode it
implicitly to save one byte.

Overall this reduces the llc binary size with all in-tree targets by
about 168K.
2023-12-12 17:45:32 +08:00
Wang Pengcheng
6111f5c592 [SelectionDAG] Add instantiated OPC_CheckChildType (#73297)
The most common type is i32 or i64 so we add `OPC_CheckChildTypeI32`
and `OPC_CheckChildTypeI64` to save one byte.

Overall this reduces the llc binary size with all in-tree targets by
about 70K.
2023-12-12 17:31:12 +08:00
Wang Pengcheng
cbf1d58820 [SelectionDAG] Add space-optimized forms of OPC_EmitCopyToReg (#73293)
These new opcodes implicitly indicate the RecNo.

The old `OPC_EmitCopyToReg2` is renamed to `OPC_EmitCopyToRegTwoByte`.

Overall this reduces the llc binary size with all in-tree targets by
about 33K (most are from RISCV target).
2023-12-12 17:25:33 +08:00
Wang Pengcheng
50c174f99f [SelectionDAG] Add space-optimized forms of OPC_EmitConvertToTarget (#73286)
These new opcodes implicitly indicate the RecNo.

Overall this reduces the llc binary size with all in-tree targets by
about 13K.
2023-12-12 17:13:43 +08:00