History log of /llvm-project/llvm/lib/Target/TargetMachine.cpp (Results 76 – 100 of 346)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 5ab6fa7b 09-Jan-2020 Daniel Sanders <daniel_l_sanders@apple.com>

Revert "[MIR] Target specific MIR formating and parsing"

Forgot to credit Peng in the commit message.

This reverts commit be841f89d0014b1e0246a4feae941b2f74abd908.


# be841f89 09-Jan-2020 Peng Guo <peng_guo@apple.com>

[MIR] Target specific MIR formating and parsing

Summary:
Added MIRFormatter for target specific MIR formating and parsing with
immediate and custom pseudo source values. Target machine can subclass

[MIR] Target specific MIR formating and parsing

Summary:
Added MIRFormatter for target specific MIR formating and parsing with
immediate and custom pseudo source values. Target machine can subclass
MIRFormatter and implement custom logic for printing and parsing
immediate and custom pseudo source values for better readability.

* Target specific immediate mnemonic need to start with "." follows by
identifier string. When MIR parser sees immediate it will call target
specific parsing function.

* Custom pseudo source value need to start with custom follows by
double-quoted string. MIR parser will pass the quoted string to target
specific PSV parsing function.

* MIRFormatter have 2 helper functions to facilitate LLVM value printing
and parsing for custom PSV if they refers LLVM values.

Reviewers: dsanders, arsenm

Reviewed By: dsanders

Subscribers: wdng, jvesely, nhaehnle, hiraditya, jfb, llvm-commits

Tags: #llvm

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

show more ...


# d2bb8c16 01-Jan-2020 Fangrui Song <maskray@google.com>

[MC][TargetMachine] Delete MCTargetOptions::MCPIECopyRelocations

clang/lib/CodeGen/CodeGenModule performs the -mpie-copy-relocations
check and sets dso_local on applicable global variables. We don't

[MC][TargetMachine] Delete MCTargetOptions::MCPIECopyRelocations

clang/lib/CodeGen/CodeGenModule performs the -mpie-copy-relocations
check and sets dso_local on applicable global variables. We don't need
to duplicate the work in TargetMachine shouldAssumeDSOLocal.

Verified that -mpie-copy-relocations can still emit PC relative
relocations for external variable accesses.

clang -target x86_64 -fpie -mpie-copy-relocations -c => R_X86_64_PC32
clang -target aarch64 -fpie -mpie-copy-relocations -c => R_AARCH64_ADR_PREL_PG_HI21+R_AARCH64_LDST64_ABS_LO12_NC

show more ...


Revision tags: llvmorg-9.0.1-rc1
# 579a56be 02-Nov-2019 Simon Pilgrim <llvm-dev@redking.me.uk>

TargetMachine - fix uninitialized variable warning. NFCI.

TargetPassConfig::addCoreISelPasses() always initializes O0WantsFastISel but it appeases static analyzers that complain that O0WantsFastISel

TargetMachine - fix uninitialized variable warning. NFCI.

TargetPassConfig::addCoreISelPasses() always initializes O0WantsFastISel but it appeases static analyzers that complain that O0WantsFastISel isn't initialized in the constructor.

show more ...


Revision tags: llvmorg-9.0.0, llvmorg-9.0.0-rc6, llvmorg-9.0.0-rc5, llvmorg-9.0.0-rc4, llvmorg-9.0.0-rc3
# 514f3a12 20-Aug-2019 Martin Storsjo <martin@martin.st>

[TargetMachine] Don't try to create COFFSTUB references on windows on non-COFF

This avoids spurious relocation types for windows/elf targets.

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

[TargetMachine] Don't try to create COFFSTUB references on windows on non-COFF

This avoids spurious relocation types for windows/elf targets.

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

llvm-svn: 369426

show more ...


Revision tags: llvmorg-9.0.0-rc2, llvmorg-9.0.0-rc1
# 8780c0dd 19-Jul-2019 Oliver Stannard <oliver.stannard@linaro.org>

Don't update NoTrappingFPMath and FPDenormalMode in resetTargetOptions

We'd like to remove this whole function, because these are properties of
functions, not the target as a whole. These two are ea

Don't update NoTrappingFPMath and FPDenormalMode in resetTargetOptions

We'd like to remove this whole function, because these are properties of
functions, not the target as a whole. These two are easy to remove
because they are only used for emitting ARM build attributes, which
expects them to represent the defaults for the whole module, not just
the last function generated.

This is needed to get correct build attributes when using IPRA on ARM,
because IPRA causes resetTargetOptions to get called before
ARMAsmPrinter::emitAttributes.

Differential revision: https://reviews.llvm.org/D64929

llvm-svn: 366562

show more ...


Revision tags: llvmorg-10-init, llvmorg-8.0.1, llvmorg-8.0.1-rc4, llvmorg-8.0.1-rc3, llvmorg-8.0.1-rc2
# 8e1d921b 24-May-2019 Jason Liu <jasonliu.development@gmail.com>

Implement call lowering without parameters on AIX

Summary:dd
This patch implements call lowering for calls without parameters
on AIX as initial support.

Reviewers: sfertile, hubert.reinterpretcast,

Implement call lowering without parameters on AIX

Summary:dd
This patch implements call lowering for calls without parameters
on AIX as initial support.

Reviewers: sfertile, hubert.reinterpretcast, aheejin, efriedma

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

llvm-svn: 361669

show more ...


Revision tags: llvmorg-8.0.1-rc1
# ea38ac5b 10-May-2019 Sam Clegg <sbc@chromium.org>

[WebAssembly] Don't assume that strongly defined symbols are DSO-local

The current PIC model for WebAssembly is more like ELF in that it
allows symbol interposition.

This means that more functions

[WebAssembly] Don't assume that strongly defined symbols are DSO-local

The current PIC model for WebAssembly is more like ELF in that it
allows symbol interposition.

This means that more functions end up being addressed via the GOT
and fewer directly added to the wasm table.

One effect is a reduction in the number of wasm table entries similar
to the previous attempt in https://reviews.llvm.org/D61539 which was
reverted.

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

llvm-svn: 360402

show more ...


# 6bf108d7 07-May-2019 Reid Kleckner <rnk@google.com>

[COFF] Use COFF stubs for extern_weak functions

Summary:
A COFF stub indirects the reference to a symbol through memory. A
.refptr.$sym global variable pointer is created to refer to $sym.
Typically

[COFF] Use COFF stubs for extern_weak functions

Summary:
A COFF stub indirects the reference to a symbol through memory. A
.refptr.$sym global variable pointer is created to refer to $sym.
Typically mingw uses these for external global variable declarations,
but we can use them for weak function declarations as well.

Updates the dso_local classification to add a special case for
extern_weak symbols on COFF in both clang and LLVM.

Fixes PR37598

Reviewers: smeenai, mstorsjo

Subscribers: hiraditya, cfe-commits, llvm-commits

Tags: #clang, #llvm

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

llvm-svn: 360207

show more ...


# b7708ec8 18-Mar-2019 Sam Clegg <sbc@chromium.org>

[WebAssembly] Don't override default implementation of isOffsetFoldingLegal. NFC.

The default implementation does we want and is going to more compatible
with dynamic linking (-fPIC) support that is

[WebAssembly] Don't override default implementation of isOffsetFoldingLegal. NFC.

The default implementation does we want and is going to more compatible
with dynamic linking (-fPIC) support that is planned.

This is NFC because currently we only build wasm with
`-relocation-model=static` which in turn means that the default
`isOffsetFoldingLegal` always returns true today.

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

llvm-svn: 356410

show more ...


Revision tags: llvmorg-8.0.0, llvmorg-8.0.0-rc5, llvmorg-8.0.0-rc4, llvmorg-8.0.0-rc3, llvmorg-7.1.0, llvmorg-7.1.0-rc1, llvmorg-8.0.0-rc2, llvmorg-8.0.0-rc1
# 2946cd70 19-Jan-2019 Chandler Carruth <chandlerc@gmail.com>

Update the file headers across all of the LLVM projects in the monorepo
to reflect the new license.

We understand that people may be surprised that we're moving the header
entirely to discuss the ne

Update the file headers across all of the LLVM projects in the monorepo
to reflect the new license.

We understand that people may be surprised that we're moving the header
entirely to discuss the new license. We checked this carefully with the
Foundation's lawyer and we believe this is the correct approach.

Essentially, all code in the project is now made available by the LLVM
project under our new license, so you will see that the license headers
include that license only. Some of our contributors have contributed
code under our old license, and accordingly, we have retained a copy of
our old license notice in the top-level files in each project and
repository.

llvm-svn: 351636

show more ...


Revision tags: llvmorg-7.0.1, llvmorg-7.0.1-rc3, llvmorg-7.0.1-rc2, llvmorg-7.0.1-rc1
# 10a21625 25-Sep-2018 Fangrui Song <maskray@google.com>

Use unique_ptr to hold AsmInfo,MRI,MII,STI

Reviewers: pcc, dblaikie

Reviewed By: dblaikie

Subscribers: llvm-commits

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

llvm-svn: 342945


Revision tags: llvmorg-7.0.0, llvmorg-7.0.0-rc3
# 68df812c 04-Sep-2018 Martin Storsjo <martin@martin.st>

[MinGW] Move code for indicating "potentially not DSO local" into shouldAssumeDSOLocal. NFC.

On Windows, if shouldAssumeDSOLocal returns false, it's either a
dllimport reference, or a reference that

[MinGW] Move code for indicating "potentially not DSO local" into shouldAssumeDSOLocal. NFC.

On Windows, if shouldAssumeDSOLocal returns false, it's either a
dllimport reference, or a reference that we should treat as non-local
and create a stub for.

Clean up AArch64Subtarget::ClassifyGlobalReference a little while
touching the flag handling relating to dllimport.

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

llvm-svn: 341402

show more ...


Revision tags: llvmorg-7.0.0-rc2, llvmorg-7.0.0-rc1, llvmorg-6.0.1, llvmorg-6.0.1-rc3, llvmorg-6.0.1-rc2
# 5f8f34e4 01-May-2018 Adrian Prantl <aprantl@apple.com>

Remove \brief commands from doxygen comments.

We've been running doxygen with the autobrief option for a couple of
years now. This makes the \brief markers into our comments
redundant. Since they ar

Remove \brief commands from doxygen comments.

We've been running doxygen with the autobrief option for a couple of
years now. This makes the \brief markers into our comments
redundant. Since they are a visual distraction and we don't want to
encourage more \brief markers in new code either, this patch removes
them all.

Patch produced by

for i in $(git grep -l '\\brief'); do perl -pi -e 's/\\brief //g' $i & done

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

llvm-svn: 331272

show more ...


Revision tags: llvmorg-6.0.1-rc1, llvmorg-5.0.2, llvmorg-5.0.2-rc2
# a1b2bf4c 26-Mar-2018 David Blaikie <dblaikie@gmail.com>

Remove unneeded (& mislayered) include from TargetMachine.cpp on a CodeGen header

llvm-svn: 328548


# 6054e650 23-Mar-2018 David Blaikie <dblaikie@gmail.com>

Move TargetLoweringObjectFile from CodeGen to Target to fix layering

It's implemented in Target & include from other Target headers, so the
header should be in Target.

llvm-svn: 328392


Revision tags: llvmorg-5.0.2-rc1
# 63c378d3 10-Mar-2018 Rafael Espindola <rafael.espindola@gmail.com>

Go back to sometimes assuming intristics are local.

This fixes pr36674.

While it is valid for shouldAssumeDSOLocal to return false anytime,
always returning false for intrinsics is not optimal on i

Go back to sometimes assuming intristics are local.

This fixes pr36674.

While it is valid for shouldAssumeDSOLocal to return false anytime,
always returning false for intrinsics is not optimal on i386 and also
hits a bug in the backend.

To use a plt, the caller must first setup ebx to handle the case of
that file being linked into a PIE executable or shared library. In
those cases the generated PLT uses ebx.

Currently we can produce "calll expf@plt" without setting ebx. We
could fix that by correctly setting ebx, but this would produce worse
code for the case where the runtime library is statically linked. It
would also required other tools to handle R_386_PLT32.

llvm-svn: 327198

show more ...


Revision tags: llvmorg-6.0.0
# 9f9e4681 28-Feb-2018 Chih-Hung Hsieh <chh@google.com>

[TLS] use emulated TLS if the target supports only this mode

Emulated TLS is enabled by llc flag -emulated-tls,
which is passed by clang driver.
When llc is called explicitly or from other drivers l

[TLS] use emulated TLS if the target supports only this mode

Emulated TLS is enabled by llc flag -emulated-tls,
which is passed by clang driver.
When llc is called explicitly or from other drivers like LTO,
missing -emulated-tls flag would generate wrong TLS code for targets
that supports only this mode.
Now use useEmulatedTLS() instead of Options.EmulatedTLS to decide whether
emulated TLS code should be generated.
Unit tests are modified to run with and without the -emulated-tls flag.

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

llvm-svn: 326341

show more ...


Revision tags: llvmorg-6.0.0-rc3
# ba02f3f2 22-Feb-2018 Rafael Espindola <rafael.espindola@gmail.com>

Fix grammar. NFC.

Thank to Eric Christopher for noticing.

llvm-svn: 325842


# c7e51805 19-Feb-2018 Rafael Espindola <rafael.espindola@gmail.com>

Bring back r323297.

It was reverted because it broke the grub build. The reason the grub
build broke is because grub does its own relocation processing and was
not handing R_386_PLT32. Since grub ha

Bring back r323297.

It was reverted because it broke the grub build. The reason the grub
build broke is because grub does its own relocation processing and was
not handing R_386_PLT32. Since grub has no dynamic linker, the fix is
trivial: handle R_386_PLT32 exactly like R_386_PC32.

On the report it was noted that they are using
-fno-integrated-assembler. The upstream GAS (starting with
451875b4f976a527395e9303224c7881b65e12ed) will already be producing a
R_386_PLT32 anyway, so they have to update their code one way or the
other

Original message:

Don't assume a null GV is local for ELF and MachO.

This is already a simplification, and should help with avoiding a plt
reference when calling an intrinsic with -fno-plt.

With this change we return false for null GVs, so the caller only
needs to check the new metadata to decide if it should use foo@plt or
*foo@got.

llvm-svn: 325514

show more ...


Revision tags: llvmorg-6.0.0-rc2
# 697d1bc2 06-Feb-2018 Reid Kleckner <rnk@google.com>

Revert "Don't assume a null GV is local for ELF and MachO."

This reverts r323297.

It breaks building grub.

llvm-svn: 324301


# 432a587c 24-Jan-2018 Rafael Espindola <rafael.espindola@gmail.com>

Don't assume a null GV is local for ELF and MachO.

This is already a simplification, and should help with avoiding a plt
reference when calling an intrinsic with -fno-plt.

With this change we retur

Don't assume a null GV is local for ELF and MachO.

This is already a simplification, and should help with avoiding a plt
reference when calling an intrinsic with -fno-plt.

With this change we return false for null GVs, so the caller only
needs to check the new metadata to decide if it should use foo@plt or
*foo@got.

llvm-svn: 323297

show more ...


# d7008692 17-Jan-2018 Rafael Espindola <rafael.espindola@gmail.com>

Use a got to access a hidden weak undefined on MachO.

Trying to link

__attribute__((weak, visibility("hidden"))) extern int foo;
int *main(void) {
return &foo;
}

on OS X fails with

ld: 32-bit R

Use a got to access a hidden weak undefined on MachO.

Trying to link

__attribute__((weak, visibility("hidden"))) extern int foo;
int *main(void) {
return &foo;
}

on OS X fails with

ld: 32-bit RIP relative reference out of range (-4294971318 max is +/-2GB): from _main (0x100000FAB) to _foo@0x00001000 (0x00000000) in '_main' from test.o for architecture x86_64

The problem being that 0 cannot be computed as a fixed difference from
%rip. Exactly the same issue exists on ELF and we can use the same
solution.

llvm-svn: 322739

show more ...


Revision tags: llvmorg-6.0.0-rc1
# e4b0231c 11-Jan-2018 Rafael Espindola <rafael.espindola@gmail.com>

Make internal/private GVs implicitly dso_local.

While updating clang tests for having clang set dso_local I noticed
that:

- There are *a lot* of tests to update.
- Many of the updates are redundant

Make internal/private GVs implicitly dso_local.

While updating clang tests for having clang set dso_local I noticed
that:

- There are *a lot* of tests to update.
- Many of the updates are redundant.

They are redundant because a GV is "obviously dso_local". This patch
starts formalizing that a bit by requiring that internal and private
GVs be dso_local too. Since they all are, we don't have to print
dso_local to the textual representation, making it a bit more compact
and easier to read.

llvm-svn: 322317

show more ...


# 26d11ca4 22-Dec-2017 Sanjoy Das <sanjoy@playingwithpointers.com>

(Re-landing) Expose a TargetMachine::getTargetTransformInfo function

Re-land r321234. It had to be reverted because it broke the shared
library build. The shared library build broke because there

(Re-landing) Expose a TargetMachine::getTargetTransformInfo function

Re-land r321234. It had to be reverted because it broke the shared
library build. The shared library build broke because there was a
missing LLVMBuild dependency from lib/Passes (which calls
TargetMachine::getTargetIRAnalysis) to lib/Target. As far as I can
tell, this problem was always there but was somehow masked
before (perhaps because TargetMachine::getTargetIRAnalysis was a
virtual function).

Original commit message:

This makes the TargetMachine interface a bit simpler. We still need
the std::function in TargetIRAnalysis to avoid having to add a
dependency from Analysis to Target.

See discussion:
http://lists.llvm.org/pipermail/llvm-dev/2017-December/119749.html

I avoided adding all of the backend owners to this review since the
change is simple, but let me know if you feel differently about this.

Reviewers: echristo, MatzeB, hfinkel

Reviewed By: hfinkel

Subscribers: jholewinski, jfb, arsenm, dschuff, mcrosier, sdardis, nemanjai, nhaehnle, javed.absar, sbc100, jgravelle-google, aheejin, kbarton, llvm-commits

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

llvm-svn: 321375

show more ...


12345678910>>...14