Revision tags: llvmorg-6.0.0-rc1 |
|
#
3b9843f0 |
| 12-Jan-2018 |
Rafael Espindola <rafael.espindola@gmail.com> |
Allow dso_local on ifunc.
It was never fully disallowed. We were rejecting it in the asm parser, but not in the verifier.
Currently TargetMachine::shouldAssumeDSOLocal returns true for hidden ifunc
Allow dso_local on ifunc.
It was never fully disallowed. We were rejecting it in the asm parser, but not in the verifier.
Currently TargetMachine::shouldAssumeDSOLocal returns true for hidden ifuncs. I considered changing it and moving the check from the asm parser to the verifier.
The reason for deciding to allow it instead is that all linkers handle a direct reference just fine. They use the plt address as the address of the function. In fact doing that means that clang doesn't have the same bug as gcc: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83782.
This patch then removes the check from the asm parser and updates the bitcode reader and writer.
llvm-svn: 322378
show more ...
|
#
a17f2205 |
| 22-Dec-2017 |
Easwaran Raman <eraman@google.com> |
Add hasProfileData() to check if a function has profile data. NFC.
Summary: This replaces calls to getEntryCount().hasValue() with hasProfileData that does the same thing. This refactoring is useful
Add hasProfileData() to check if a function has profile data. NFC.
Summary: This replaces calls to getEntryCount().hasValue() with hasProfileData that does the same thing. This refactoring is useful to do before adding synthetic function entry counts but also a useful cleanup IMO even otherwise. I have used hasProfileData instead of hasRealProfileData as David had earlier suggested since I think profile implies "real" and I use the phrase "synthetic entry count" and not "synthetic profile count" but I am fine calling it hasRealProfileData if you prefer.
Reviewers: davidxl, silvas
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D41461
llvm-svn: 321331
show more ...
|
#
81bbf742 |
| 16-Dec-2017 |
Teresa Johnson <tejohnson@google.com> |
[ThinLTO] Enable importing of aliases as copy of aliasee
Summary: This implements a missing feature to allow importing of aliases, which was previously disabled because alias cannot be available_ext
[ThinLTO] Enable importing of aliases as copy of aliasee
Summary: This implements a missing feature to allow importing of aliases, which was previously disabled because alias cannot be available_externally. We instead import an alias as a copy of its aliasee.
Some additional work was required in the IndexBitcodeWriter for the distributed build case, to ensure that the aliasee has a value id in the distributed index file (i.e. even when it is not being imported directly).
This is a performance win in codes that have many aliases, e.g. C++ applications that have many constructor and destructor aliases.
Reviewers: pcc
Subscribers: mehdi_amini, inglorion, eraman, llvm-commits
Differential Revision: https://reviews.llvm.org/D40747
llvm-svn: 320895
show more ...
|
#
c667c1f4 |
| 09-Dec-2017 |
Evgeniy Stepanov <eugeni.stepanov@gmail.com> |
Hardware-assisted AddressSanitizer (llvm part).
Summary: This is LLVM instrumentation for the new HWASan tool. It is basically a stripped down copy of ASan at this point, w/o stack or global support
Hardware-assisted AddressSanitizer (llvm part).
Summary: This is LLVM instrumentation for the new HWASan tool. It is basically a stripped down copy of ASan at this point, w/o stack or global support. Instrumenation adds a global constructor + runtime callbacks for every load and store.
HWASan comes with its own IR attribute.
A brief design document can be found in clang/docs/HardwareAssistedAddressSanitizerDesign.rst (submitted earlier).
Reviewers: kcc, pcc, alekseyshl
Subscribers: srhines, mehdi_amini, mgorny, javed.absar, eraman, llvm-commits, hiraditya
Differential Revision: https://reviews.llvm.org/D40932
llvm-svn: 320217
show more ...
|
Revision tags: llvmorg-5.0.1, llvmorg-5.0.1-rc3, llvmorg-5.0.1-rc2 |
|
#
629c4115 |
| 06-Nov-2017 |
Sanjay Patel <spatel@rotateright.com> |
[IR] redefine 'UnsafeAlgebra' / 'reassoc' fast-math-flags and add 'trans' fast-math-flag
As discussed on llvm-dev: http://lists.llvm.org/pipermail/llvm-dev/2016-November/107104.html and again more r
[IR] redefine 'UnsafeAlgebra' / 'reassoc' fast-math-flags and add 'trans' fast-math-flag
As discussed on llvm-dev: http://lists.llvm.org/pipermail/llvm-dev/2016-November/107104.html and again more recently: http://lists.llvm.org/pipermail/llvm-dev/2017-October/118118.html
...this is a step in cleaning up our fast-math-flags implementation in IR to better match the capabilities of both clang's user-visible flags and the backend's flags for SDNode.
As proposed in the above threads, we're replacing the 'UnsafeAlgebra' bit (which had the 'umbrella' meaning that all flags are set) with a new bit that only applies to algebraic reassociation - 'AllowReassoc'.
We're also adding a bit to allow approximations for library functions called 'ApproxFunc' (this was initially proposed as 'libm' or similar).
...and we're out of bits. 7 bits ought to be enough for anyone, right? :) FWIW, I did look at getting this out of SubclassOptionalData via SubclassData (spacious 16-bits), but that's apparently already used for other purposes. Also, I don't think we can just add a field to FPMathOperator because Operator is not intended to be instantiated. We'll defer movement of FMF to another day.
We keep the 'fast' keyword. I thought about removing that, but seeing IR like this: %f.fast = fadd reassoc nnan ninf nsz arcp contract afn float %op1, %op2 ...made me think we want to keep the shortcut synonym.
Finally, this change is binary incompatible with existing IR as seen in the compatibility tests. This statement: "Newer releases can ignore features from older releases, but they cannot miscompile them. For example, if nsw is ever replaced with something else, dropping it would be a valid way to upgrade the IR." ( http://llvm.org/docs/DeveloperPolicy.html#ir-backwards-compatibility ) ...provides the flexibility we want to make this change without requiring a new IR version. Ie, we're not loosening the FP strictness of existing IR. At worst, we will fail to optimize some previously 'fast' code because it's no longer recognized as 'fast'. This should get fixed as we audit/squash all of the uses of 'isFast()'.
Note: an inter-dependent clang commit to use the new API name should closely follow commit.
Differential Revision: https://reviews.llvm.org/D39304
llvm-svn: 317488
show more ...
|
#
4595a915 |
| 04-Nov-2017 |
Sean Fertile <sfertile@ca.ibm.com> |
[LTO][ThinLTO] Use the linker resolutions to mark global values as dso_local.
Now that we have a way to mark GlobalValues as local we can use the symbol resolutions that the linker plugin provides a
[LTO][ThinLTO] Use the linker resolutions to mark global values as dso_local.
Now that we have a way to mark GlobalValues as local we can use the symbol resolutions that the linker plugin provides as part of lto/thinlto link step to refine the compilers view on what symbols will end up being local.
Originally commited as r317374, but reverted in r317395 to update some missed tests.
Differential Revision: https://reviews.llvm.org/D35702
llvm-svn: 317408
show more ...
|
#
39770ca0 |
| 04-Nov-2017 |
Sean Fertile <sfertile@ca.ibm.com> |
Revert "[LTO][ThinLTO] Use the linker resolutions to mark global values ..."
Changes more tests then expected on one of the build bots. reverting to investigate.
This reverts https://llvm.org/svn/l
Revert "[LTO][ThinLTO] Use the linker resolutions to mark global values ..."
Changes more tests then expected on one of the build bots. reverting to investigate.
This reverts https://llvm.org/svn/llvm-project/llvm/trunk@317374
llvm-svn: 317395
show more ...
|
#
36528c2a |
| 03-Nov-2017 |
Sean Fertile <sfertile@ca.ibm.com> |
[LTO][ThinLTO] Use the linker resolutions to mark global values as dso_local.
Now that we have a way to mark GlobalValues as local we can use the symbol resolutions that the linker plugin provides a
[LTO][ThinLTO] Use the linker resolutions to mark global values as dso_local.
Now that we have a way to mark GlobalValues as local we can use the symbol resolutions that the linker plugin provides as part of lto/thinlto link step to refine the compilers view on what symbols will end up being local.
Differential Revision: https://reviews.llvm.org/D35702
llvm-svn: 317374
show more ...
|
Revision tags: llvmorg-5.0.1-rc1 |
|
#
c70d28bf |
| 26-Oct-2017 |
Sean Fertile <sfertile@ca.ibm.com> |
Represent runtime preemption in the IR.
Currently we do not represent runtime preemption in the IR, which has several drawbacks:
1) The semantics of GlobalValues differ depending on the object fi
Represent runtime preemption in the IR.
Currently we do not represent runtime preemption in the IR, which has several drawbacks:
1) The semantics of GlobalValues differ depending on the object file format you are targeting (as well as the relocation-model and -fPIE value). 2) We have no way of disabling inlining of run time interposable functions, since in the IR we only know if a function is link-time interposable. Because of this llvm cannot support elf-interposition semantics. 3) In LTO builds of executables we will have extra knowledge that a symbol resolved to a local definition and can't be preemptable, but have no way to propagate that knowledge through the compiler.
This patch adds preemptability specifiers to the IR with the following meaning:
dso_local --> means the compiler may assume the symbol will resolve to a definition within the current linkage unit and the symbol may be accessed directly even if the definition is not within this compilation unit.
dso_preemptable --> means that the compiler must assume the GlobalValue may be replaced with a definition from outside the current linkage unit at runtime.
To ease transitioning dso_preemptable is treated as a 'default' in that low-level codegen will still do the same checks it did previously to see if a symbol should be accessed indirectly. Eventually when IR producers emit the specifiers on all Globalvalues we can change dso_preemptable to mean 'always access indirectly', and remove the current logic.
Differential Revision: https://reviews.llvm.org/D20217
llvm-svn: 316668
show more ...
|
#
1be19e6f |
| 15-Sep-2017 |
Mandeep Singh Grang <mgrang@codeaurora.org> |
[llvm] Fix some typos. NFC.
Reviewers: mcrosier
Reviewed By: mcrosier
Subscribers: mcrosier, llvm-commits
Differential Revision: https://reviews.llvm.org/D37922
llvm-svn: 313388
|
#
b52e2366 |
| 12-Sep-2017 |
Peter Collingbourne <peter@pcc.me.uk> |
IR: Represent -ggnu-pubnames with a flag on the DICompileUnit.
This allows the flag to be persisted through to LTO.
Differential Revision: https://reviews.llvm.org/D37655
llvm-svn: 313078
|
#
975293f0 |
| 07-Sep-2017 |
Eugene Zelenko <eugene.zelenko@gmail.com> |
[Bitcode] Fix some Clang-tidy modernize-use-using and Include What You Use warnings; other minor fixes (NFC).
llvm-svn: 312760
|
Revision tags: llvmorg-5.0.0, llvmorg-5.0.0-rc5, llvmorg-5.0.0-rc4, llvmorg-5.0.0-rc3 |
|
#
49a49fe8 |
| 20-Aug-2017 |
Benjamin Kramer <benny.kra@googlemail.com> |
Move helper classes into anonymous namespaces.
No functionality change intended.
llvm-svn: 311288
|
#
5a57b842 |
| 16-Aug-2017 |
Xinliang David Li <davidxl@google.com> |
Add more comment
llvm-svn: 311025
|
#
71ecaa19 |
| 16-Aug-2017 |
Xinliang David Li <davidxl@google.com> |
[PGO] Fix ThinLTO crash
Differential Revsion: http://reviews.llvm.org/D36640
llvm-svn: 311023
|
#
53a5fbb4 |
| 14-Aug-2017 |
Andrew Kaylor <andrew.kaylor@intel.com> |
Add strictfp attribute to prevent unwanted optimizations of libm calls
Differential Revision: https://reviews.llvm.org/D34163
llvm-svn: 310885
|
Revision tags: llvmorg-5.0.0-rc2 |
|
#
75da10d1 |
| 04-Aug-2017 |
Charles Saternos <charles.saternos@gmail.com> |
[ThinLTO] Add FunctionAttrs to ThinLTO index
Adds function attributes to index: ReadNone, ReadOnly, NoRecurse, NoAlias. This attributes will be used for future ThinLTO optimizations that will propag
[ThinLTO] Add FunctionAttrs to ThinLTO index
Adds function attributes to index: ReadNone, ReadOnly, NoRecurse, NoAlias. This attributes will be used for future ThinLTO optimizations that will propagate function attributes across modules.
llvm-svn: 310061
show more ...
|
Revision tags: llvmorg-5.0.0-rc1 |
|
#
1dec57d5 |
| 21-Jul-2017 |
Haojie Wang <haojie0429@gmail.com> |
ThinLTO Minimized Bitcode File Size Reduction
Summary: Currently the ThinLTO minimized bitcode file only strip the debug info, but there is still a lot of information in the minimized bit code file
ThinLTO Minimized Bitcode File Size Reduction
Summary: Currently the ThinLTO minimized bitcode file only strip the debug info, but there is still a lot of information in the minimized bit code file that will be not used for thin linker. In this patch, most of the extra information is striped to reduce the minimized bitcode file. Now only ModuleVersion, ModuleInfo, ModuleGlobalValueSummary, ModuleHash, Symtab and Strtab are left. Now the minimized bitcode file size is reduced to 15%-30% of the debug info stripped bitcode file size.
Reviewers: danielcdh, tejohnson, pcc
Reviewed By: pcc
Subscribers: mehdi_amini, aprantl, inglorion, eraman, llvm-commits
Differential Revision: https://reviews.llvm.org/D35334
llvm-svn: 308760
show more ...
|
#
d63bfd21 |
| 19-Jul-2017 |
Adrian Prantl <aprantl@apple.com> |
Debug Info: Add a file: field to DIImportedEntity.
DIImportedEntity has a line number, but not a file field. To determine the decl_line/decl_file we combine the line number from the DIImportedEntity
Debug Info: Add a file: field to DIImportedEntity.
DIImportedEntity has a line number, but not a file field. To determine the decl_line/decl_file we combine the line number from the DIImportedEntity with the file from the DIImportedEntity's scope. This does not work correctly when the parent scope is a DINamespace or a DIModule, both of which do not have a source file.
This patch adds a file field to DIImportedEntity to unambiguously identify the source location of the using/import declaration. Most testcase updates are mechanical, the interesting one is the removal of the FIXME in test/DebugInfo/Generic/namespace.ll.
This fixes PR33822. See https://bugs.llvm.org/show_bug.cgi?id=33822 for more context.
<rdar://problem/33357889> https://bugs.llvm.org/show_bug.cgi?id=33822
Differential Revision: https://reviews.llvm.org/D35583
llvm-svn: 308398
show more ...
|
#
bb80d3e1 |
| 11-Jul-2017 |
Konstantin Zhuravlyov <kzhuravl_dev@outlook.com> |
Enhance synchscope representation
OpenCL 2.0 introduces the notion of memory scopes in atomic operations to global and local memory. These scopes restrict how synchronization is achieved, whic
Enhance synchscope representation
OpenCL 2.0 introduces the notion of memory scopes in atomic operations to global and local memory. These scopes restrict how synchronization is achieved, which can result in improved performance.
This change extends existing notion of synchronization scopes in LLVM to support arbitrary scopes expressed as target-specific strings, in addition to the already defined scopes (single thread, system).
The LLVM IR and MIR syntax for expressing synchronization scopes has changed to use *syncscope("<scope>")*, where <scope> can be "singlethread" (this replaces *singlethread* keyword), or a target-specific name. As before, if the scope is not specified, it defaults to CrossThread/System scope.
Implementation details: - Mapping from synchronization scope name/string to synchronization scope id is stored in LLVM context; - CrossThread/System and SingleThread scopes are pre-defined to efficiently check for known scopes without comparing strings; - Synchronization scope names are stored in SYNC_SCOPE_NAMES_BLOCK in the bitcode.
Differential Revision: https://reviews.llvm.org/D21723
llvm-svn: 307722
show more ...
|
#
c8556158 |
| 06-Jul-2017 |
Peter Collingbourne <peter@pcc.me.uk> |
Bitcode: Include any strings added to the string table in the module hash.
Differential Revision: https://reviews.llvm.org/D35037
llvm-svn: 307286
|
#
92648c25 |
| 27-Jun-2017 |
Peter Collingbourne <peter@pcc.me.uk> |
Bitcode: Write the irsymtab to disk.
Differential Revision: https://reviews.llvm.org/D33973
llvm-svn: 306487
|
#
4d4ee93d |
| 16-Jun-2017 |
Evgeniy Stepanov <eugeni.stepanov@gmail.com> |
[cfi] CFI-ICall for ThinLTO.
Implement ControlFlowIntegrity for indirect function calls in ThinLTO. Design follows the RFC in llvm-dev, see https://groups.google.com/d/msg/llvm-dev/MgUlaphu4Qc/kywu0
[cfi] CFI-ICall for ThinLTO.
Implement ControlFlowIntegrity for indirect function calls in ThinLTO. Design follows the RFC in llvm-dev, see https://groups.google.com/d/msg/llvm-dev/MgUlaphu4Qc/kywu0AqjAQAJ
llvm-svn: 305533
show more ...
|
#
ffc498df |
| 14-Jun-2017 |
Florian Hahn <florian.hahn@arm.com> |
Align definition of DW_OP_plus with DWARF spec [3/3]
Summary: This patch is part of 3 patches that together form a single patch, but must be introduced in stages in order not to break things. The
Align definition of DW_OP_plus with DWARF spec [3/3]
Summary: This patch is part of 3 patches that together form a single patch, but must be introduced in stages in order not to break things. The way that LLVM interprets DW_OP_plus in DIExpression nodes is basically that of the DW_OP_plus_uconst operator since LLVM expects an unsigned constant operand. This unnecessarily restricts the DW_OP_plus operator, preventing it from being used to describe the evaluation of runtime values on the expression stack. These patches try to align the semantics of DW_OP_plus and DW_OP_minus with that of the DWARF definition, which pops two elements off the expression stack, performs the operation and pushes the result back on the stack. This is done in three stages: • The first patch (LLVM) adds support for DW_OP_plus_uconst. • The second patch (Clang) contains changes all its uses from DW_OP_plus to DW_OP_plus_uconst. • The third patch (LLVM) changes the semantics of DW_OP_plus and DW_OP_minus to be in line with its DWARF meaning. This patch includes the bitcode upgrade from legacy DIExpressions.
Patch by Sander de Smalen.
Reviewers: echristo, pcc, aprantl
Reviewed By: aprantl
Subscribers: fhahn, javed.absar, aprantl, llvm-commits
Differential Revision: https://reviews.llvm.org/D33894
llvm-svn: 305386
show more ...
|
Revision tags: llvmorg-4.0.1, llvmorg-4.0.1-rc3 |
|
#
e357fbd2 |
| 08-Jun-2017 |
Peter Collingbourne <peter@pcc.me.uk> |
Write summaries for merged modules when splitting modules for ThinLTO.
This is to prepare to allow for dead stripping of globals in the merged modules.
Differential Revision: https://reviews.llvm.o
Write summaries for merged modules when splitting modules for ThinLTO.
This is to prepare to allow for dead stripping of globals in the merged modules.
Differential Revision: https://reviews.llvm.org/D33921
llvm-svn: 305027
show more ...
|