History log of /llvm-project-15.0.7/llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp (Results 1 – 25 of 482)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: llvmorg-20.1.0, llvmorg-20.1.0-rc3, llvmorg-20.1.0-rc2, llvmorg-20.1.0-rc1, llvmorg-21-init, llvmorg-19.1.7, llvmorg-19.1.6, llvmorg-19.1.5, llvmorg-19.1.4, llvmorg-19.1.3, llvmorg-19.1.2, llvmorg-19.1.1, llvmorg-19.1.0, llvmorg-19.1.0-rc4, llvmorg-19.1.0-rc3, llvmorg-19.1.0-rc2, llvmorg-19.1.0-rc1, llvmorg-20-init, llvmorg-18.1.8, llvmorg-18.1.7, llvmorg-18.1.6, llvmorg-18.1.5, llvmorg-18.1.4, llvmorg-18.1.3, llvmorg-18.1.2, llvmorg-18.1.1, llvmorg-18.1.0, llvmorg-18.1.0-rc4, llvmorg-18.1.0-rc3, llvmorg-18.1.0-rc2, llvmorg-18.1.0-rc1, llvmorg-19-init, llvmorg-17.0.6, llvmorg-17.0.5, llvmorg-17.0.4, llvmorg-17.0.3, llvmorg-17.0.2, llvmorg-17.0.1, llvmorg-17.0.0, llvmorg-17.0.0-rc4, llvmorg-17.0.0-rc3, llvmorg-17.0.0-rc2, llvmorg-17.0.0-rc1, llvmorg-18-init, llvmorg-16.0.6, llvmorg-16.0.5, llvmorg-16.0.4, llvmorg-16.0.3, llvmorg-16.0.2, llvmorg-16.0.1, llvmorg-16.0.0, llvmorg-16.0.0-rc4, llvmorg-16.0.0-rc3, llvmorg-16.0.0-rc2, llvmorg-16.0.0-rc1, llvmorg-17-init, llvmorg-15.0.7, llvmorg-15.0.6, llvmorg-15.0.5, llvmorg-15.0.4, llvmorg-15.0.3, llvmorg-15.0.2, llvmorg-15.0.1, llvmorg-15.0.0, llvmorg-15.0.0-rc3, llvmorg-15.0.0-rc2, llvmorg-15.0.0-rc1, llvmorg-16-init
# fc93ba06 25-Jul-2022 Vladislav Dzhidzhoev <[email protected]>

[GlobalISel][DebugInfo] Remove debug info with zero line from constants inserted at entry block

Emission of constants having DebugLoc with line 0 causes significant increase of debug_line section si

[GlobalISel][DebugInfo] Remove debug info with zero line from constants inserted at entry block

Emission of constants having DebugLoc with line 0 causes significant increase of debug_line section size for some source files.

To illustrate, we can compare section sizes of several files from llvm test-suite, built with SelectionDAG vs GlobalISel, on Aarch64 (macOS), using -O0 optimization level:

| Source path | SDAG text sz | GISel text sz | SDAG debug_line sz | GISel debug_line sz
| -------------------------------------------------------------- | ------------ | ------------- | ------------------ | --------------------
| `SingleSource/Regression/C/gcc-c-torture/execute/strlen-2.c` | 15320 | 660 | 14872 | 6340
| `SingleSource/Regression/C/gcc-c-torture/execute/20040629-1.c` | 33640 | 26300 | 2812 | 6693
| `SingleSource/Benchmarks/Misc/flops-4.c` | 1428 | 1196 | 594 | 1008
| `MultiSource/Benchmarks/MiBench/consumer-typeset/z31.c` | 2716 | 964 | 809 | 903
| `MultiSource/Benchmarks/Prolangs-C/gnugo/showinst.c` | 2534 | 2502 | 189 | 573

For instance, here is a fragment of `flops-4.c.o` debug line section dump

```
Address Line Column File ISA Discriminator Flags
------------------ ------ ------ ------ --- ------------- -------------
0x0000000000000000 174 0 1 0 0 is_stmt
0x0000000000000010 0 0 1 0 0
0x0000000000000018 185 4 1 0 0 is_stmt prologue_end
0x000000000000001c 0 0 1 0 0
0x0000000000000024 186 4 1 0 0 is_stmt
0x000000000000002c 189 10 1 0 0 is_stmt
0x0000000000000030 0 0 1 0 0
0x0000000000000038 207 11 1 0 0 is_stmt
0x0000000000000044 208 11 1 0 0 is_stmt
0x0000000000000048 0 0 1 0 0
0x0000000000000058 210 10 1 0 0 is_stmt
0x000000000000005c 0 0 1 0 0
0x0000000000000060 211 10 1 0 0 is_stmt
0x0000000000000064 0 0 1 0 0
0x000000000000006c 212 10 1 0 0 is_stmt
0x0000000000000070 0 0 1 0 0
0x000000000000007c 213 10 1 0 0 is_stmt
0x0000000000000080 0 0 1 0 0
0x0000000000000088 214 10 1 0 0 is_stmt
0x000000000000008c 0 0 1 0 0
0x0000000000000094 215 10 1 0 0 is_stmt
```

Lot of zero lines are produced by constants (global values) having DebugLoc with line 0.
It seems that they're not significant for debugging experience.

With the commit applied, total size of debug_line sections of llvm shared libraries has reduced by 2.5%.
Change of debug line section size of files listed above:

| Source path | GISel debug_line sz | Patch debug_line sz
| -------------------------------------------------------------- | ------------------- | --------------------
| `SingleSource/Regression/C/gcc-c-torture/execute/strlen-2.c` | 6340 | 1465
| `SingleSource/Regression/C/gcc-c-torture/execute/20040629-1.c` | 6693 | 3782
| `SingleSource/Benchmarks/Misc/flops-4.c` | 1008 | 609
| `MultiSource/Benchmarks/MiBench/consumer-typeset/z31.c` | 903 | 841
| `MultiSource/Benchmarks/Prolangs-C/gnugo/showinst.c` | 573 | 190

Reviewed By: dblaikie

Differential Revision: https://reviews.llvm.org/D127488

show more ...


# 8d0383eb 24-Jun-2022 Matt Arsenault <[email protected]>

CodeGen: Remove AliasAnalysis from regalloc

This was stored in LiveIntervals, but not actually used for anything
related to LiveIntervals. It was only used in one check for if a load
instruction is

CodeGen: Remove AliasAnalysis from regalloc

This was stored in LiveIntervals, but not actually used for anything
related to LiveIntervals. It was only used in one check for if a load
instruction is rematerializable. I also don't think this was entirely
correct, since it was implicitly assuming constant loads are also
dereferenceable.

Remove this and rely only on the invariant+dereferenceable flags in
the memory operand. Set the flag based on the AA query upfront. This
should have the same net benefit, but has the possible disadvantage of
making this AA query nonlazy.

Preserve the behavior of assuming pointsToConstantMemory implying
dereferenceable for now, but maybe this should be changed.

show more ...


# 9e6d1f4b 17-Jul-2022 Kazu Hirata <[email protected]>

[CodeGen] Qualify auto variables in for loops (NFC)


# 4ae254e4 12-Jul-2022 Kai Nacke <[email protected]>

Revert "[GISel] Unify use of getStackGuard"

This reverts commit e60b4fb2b777118c0ff664a6347851df14fcf75b.


# e60b4fb2 12-Jul-2022 Kai Nacke <[email protected]>

[GISel] Unify use of getStackGuard

Some rework of getStackGuard() based on comments in
https://reviews.llvm.org/D129505.

- getStackGuard() now creates and returns the destination
register, simpli

[GISel] Unify use of getStackGuard

Some rework of getStackGuard() based on comments in
https://reviews.llvm.org/D129505.

- getStackGuard() now creates and returns the destination
register, simplifying calls
- the pointer type is passed to getStackGuard() to avoid
recomputation
- removed PtrMemTy in emitSPDescriptorParent(), because
this type is only used here when loading the value but
not when storing the value

Reviewed By: arsenm

Differential Revision: https://reviews.llvm.org/D129576

show more ...


# 42f7364f 11-Jul-2022 Kai Nacke <[email protected]>

[GISel] Check useLoadStackGuardNode() before generating LOAD_STACK_GUARD

When lowering llvm::stackprotect intrinsic, the SDAG implementation
checks useLoadStackGuardNode() to either create a LOAD_ST

[GISel] Check useLoadStackGuardNode() before generating LOAD_STACK_GUARD

When lowering llvm::stackprotect intrinsic, the SDAG implementation
checks useLoadStackGuardNode() to either create a LOAD_STACK_GUARD or use
the first argument of the intrinsic. This check is not present in the
IRTranslator, which results in always generating a LOAD_STACK_GUARD even
if the target does not support it.

Reviewed By: arsenm

Differential Revision: https://reviews.llvm.org/D129505

show more ...


# 1023ddaf 06-Jul-2022 Shilei Tian <[email protected]>

[LLVM] Add the support for fmax and fmin in atomicrmw instruction

This patch adds the support for `fmax` and `fmin` operations in `atomicrmw`
instruction. For now (at least in this patch), the instr

[LLVM] Add the support for fmax and fmin in atomicrmw instruction

This patch adds the support for `fmax` and `fmin` operations in `atomicrmw`
instruction. For now (at least in this patch), the instruction will be expanded
to CAS loop. There are already a couple of targets supporting the feature. I'll
create another patch(es) to enable them accordingly.

Reviewed By: arsenm

Differential Revision: https://reviews.llvm.org/D127041

show more ...


Revision tags: llvmorg-14.0.6
# 7a47ee51 21-Jun-2022 Kazu Hirata <[email protected]>

[llvm] Don't use Optional::getValue (NFC)


# 129b531c 19-Jun-2022 Kazu Hirata <[email protected]>

[llvm] Use value_or instead of getValueOr (NFC)


# 654a835c 15-Jun-2022 Paul Robinson <[email protected]>

[PS5] Trap after noreturn calls, with special case for stack-check-fail


Revision tags: llvmorg-14.0.5
# 61abcb0b 06-Jun-2022 Kazu Hirata <[email protected]>

[GlobalISel] Remove valueIsSplit (NFC)

The last use was removed on Jun 27, 2019 in commit
8138996128cd17d78d9d3e6ef7b49987565cb310.


Revision tags: llvmorg-14.0.4
# 96c2a0c9 13-May-2022 Eli Friedman <[email protected]>

[GlobalIsel] Fix fallback if stack protector isn't supported.

When GlobalISel fails, we need to report the error, and we need to set
the FailedISel property. We skipped those steps if stack protect

[GlobalIsel] Fix fallback if stack protector isn't supported.

When GlobalISel fails, we need to report the error, and we need to set
the FailedISel property. We skipped those steps if stack protector
insertion failed, which led to a very strange miscompile.

Differential Revision: https://reviews.llvm.org/D125584

show more ...


Revision tags: llvmorg-14.0.3, llvmorg-14.0.2, llvmorg-14.0.1
# 1eada2ad 21-Mar-2022 Kazu Hirata <[email protected]>

[CodeGen] Apply clang-tidy fixes for readability-redundant-smartptr-get (NFC)


Revision tags: llvmorg-14.0.0, llvmorg-14.0.0-rc4, llvmorg-14.0.0-rc3
# ed98c1b3 09-Mar-2022 serge-sans-paille <[email protected]>

Cleanup includes: DebugInfo & CodeGen

Discourse thread: https://discourse.llvm.org/t/include-what-you-use-include-cleanup
Differential Revision: https://reviews.llvm.org/D121332


# 7b85f0f3 02-Mar-2022 Paul Robinson <[email protected]>

[PS4] isPS4 and isPS4CPU are not meaningfully different


Revision tags: llvmorg-14.0.0-rc2
# dcb2da13 11-Feb-2022 Julien Pages <[email protected]>

[AMDGPU] Add a new intrinsic to control fp_trunc rounding mode

Add a new llvm.fptrunc.round intrinsic to precisely control
the rounding mode when converting from f32 to f16.

Differential Revision:

[AMDGPU] Add a new intrinsic to control fp_trunc rounding mode

Add a new llvm.fptrunc.round intrinsic to precisely control
the rounding mode when converting from f32 to f16.

Differential Revision: https://reviews.llvm.org/D110579

show more ...


Revision tags: llvmorg-14.0.0-rc1, llvmorg-15-init, llvmorg-13.0.1, llvmorg-13.0.1-rc3, llvmorg-13.0.1-rc2
# a3446537 09-Dec-2021 Konstantin Schwarz <[email protected]>

[GlobalISel] Fix IRTranslator for constexpr fcmp

The existing code assumed fcmp to always be an Instruction, but it can also be a ConstExpr.

Reviewed By: arsenm

Differential Revision: https://revi

[GlobalISel] Fix IRTranslator for constexpr fcmp

The existing code assumed fcmp to always be an Instruction, but it can also be a ConstExpr.

Reviewed By: arsenm

Differential Revision: https://reviews.llvm.org/D115450

show more ...


# 91a0da01 09-Dec-2021 Mircea Trofin <[email protected]>

[NFC] Rename MachineFunction::DeleteMachineBasicBlock

Renamed to conform to coding style


Revision tags: llvmorg-13.0.1-rc1
# 3eabcda8 08-Nov-2021 Jessica Paquette <[email protected]>

[GlobalISel] Ensure that translateInvoke adds all successors for inlineasm

The existing code didn't add all necessary successors, which resulted in
disjoint basic blocks. These would end up not bein

[GlobalISel] Ensure that translateInvoke adds all successors for inlineasm

The existing code didn't add all necessary successors, which resulted in
disjoint basic blocks. These would end up not being legalized which, in the
best case, caused a fallback only in assert builds.

Here's an example:

https://godbolt.org/z/ndx15Enfj

We also end up getting weird codegen here as well.

Refactoring the code here allows us to correctly attach all successors. With
this patch, the above example gives correct codegen at -O0 with and without
asserts.

Also autogen the testcase to show that we add all the successors now.

Differential Revision: https://reviews.llvm.org/D113437

show more ...


# 4bd46501 25-Oct-2021 Kazu Hirata <[email protected]>

Use llvm::any_of and llvm::none_of (NFC)


# 72ce310b 08-Oct-2021 Amara Emerson <[email protected]>

[GlobalISel][IRTranslator] Fix a use-after-free bug when translating trap-func-name traps.

This was using MachineFunction::createExternalSymbolName() before, which seems
reasonable, but in fact this

[GlobalISel][IRTranslator] Fix a use-after-free bug when translating trap-func-name traps.

This was using MachineFunction::createExternalSymbolName() before, which seems
reasonable, but in fact this is freed before the asm emitter which tries to access
the function name string. Switching it to use the string returned by the attribute
seems to fix the problem.

show more ...


# 9bf5d913 07-Oct-2021 Mikael Holmen <[email protected]>

[GlobalISel] Silence gcc warning about unused variable


# 79d13bf2 06-Oct-2021 Amara Emerson <[email protected]>

Revert "Revert "[GlobalISel][IRTranslator] Emit trap intrinsic for "unreachable"""

This reverts commit d95cd81141a4e398e0d3337cb2e6617281d06278.

Re-land the original patch now that the bug this exp

Revert "Revert "[GlobalISel][IRTranslator] Emit trap intrinsic for "unreachable"""

This reverts commit d95cd81141a4e398e0d3337cb2e6617281d06278.

Re-land the original patch now that the bug this exposed in selection has been
fixed by 6bc64e24c38a

show more ...


# 21661607 06-Oct-2021 Simon Pilgrim <[email protected]>

[llvm] Replace report_fatal_error(std::string) uses with report_fatal_error(Twine)

As described on D111049, we're trying to remove the <string> dependency from error handling and replace uses of rep

[llvm] Replace report_fatal_error(std::string) uses with report_fatal_error(Twine)

As described on D111049, we're trying to remove the <string> dependency from error handling and replace uses of report_fatal_error(const std::string&) with the Twine() variant which can be forward declared.

show more ...


# de5b16d8 05-Oct-2021 Amara Emerson <[email protected]>

Revert "Revert "Revert "[GlobalISel][IRTranslator] Emit trap intrinsic for "unreachable""""

This reverts commit c93bc508ee446d17f9d5d59b48d98aef15f22d52.

Seems to break a different thing now.


12345678910>>...20