| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
We used to create SampleProfileLoader pass in clang. This makes LTO/ThinLTO unable to add this pass in the linker plugin. This patch moves the SampleProfileLoader pass creation from
clang to llvm pass manager builder.
Reviewers: tejohnson, davidxl, dnovillo
Subscribers: mehdi_amini, cfe-commits
Differential Revision: https://reviews.llvm.org/D27744
llvm-svn: 289715
|
|
|
|
| |
llvm-svn: 289675
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
We used to create SampleProfileLoader pass in clang. This makes LTO/ThinLTO unable to add this pass in the linker plugin. This patch moves the SampleProfileLoader pass creation from
clang to llvm pass manager builder.
Reviewers: tejohnson, davidxl, dnovillo
Subscribers: mehdi_amini, cfe-commits
Differential Revision: https://reviews.llvm.org/D27744
llvm-svn: 289670
|
|
|
|
|
|
| |
Differential Revision: https://reviews.llvm.org/D27313
llvm-svn: 289621
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently, TargetLibraryInfoWrapperPass is inserted by PMBuilder.
However, some passes are inserted manually before the PMBuilder
ones - if any of them happens to use TargetLibraryInfoWrapperPass,
it'll get a default-constructed one, with an unknown target triple.
This happens to InstrProfiling in D21736, breaking it.
Differential Revision: http://reviews.llvm.org/D21737
llvm-svn: 287688
|
|
|
|
|
|
| |
We have to specify a name and description for the timers and groups now.
llvm-svn: 287371
|
|
|
|
|
|
| |
Differential Revision: https://reviews.llvm.org/D26539
llvm-svn: 286624
|
|
|
|
|
|
|
|
|
|
| |
The change in D26502 splits ReaderWriter.h, which contains the APIs
into both the BitReader and BitWriter libraries, into BitcodeReader.h
and BitcodeWriter.h.
Change clang uses to the appropriate split header(s).
llvm-svn: 286567
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: Use -fsanitize-recover instead of -mllvm -msan-keep-going: pass -fsanitize-recover value to msan.
Reviewers: eugenis
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D26354
Patch by Aleksey Shlyapnikov.
llvm-svn: 286148
|
|
|
|
|
|
| |
Differential Revision: https://reviews.llvm.org/D19996
llvm-svn: 284638
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The motivation for the change is that we can't have pseudo-global settings
for codegen living in TargetOptions because that doesn't work with LTO.
Ideally, these reciprocal attributes will be moved to the instruction-level
via FMF, metadata, or something else. But making them function attributes is
at least an improvement over the current state.
I'm committing this patch ahead of the related LLVM patch to avoid bot failures,
but if that patch needs to be reverted, then this should be reverted too.
Differential Revision: https://reviews.llvm.org/D24815
llvm-svn: 283251
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
With this commit simple coroutines can be created in plain C using coroutine builtins.
Reviewers: rnk, EricWF, rsmith
Subscribers: modocache, mgorny, mehdi_amini, beanz, cfe-commits
Differential Revision: https://reviews.llvm.org/D24373
llvm-svn: 283155
|
|
|
|
| |
llvm-svn: 282301
|
|
|
|
|
|
| |
failures.
llvm-svn: 282257
|
|
|
|
|
|
| |
These options were forgotten to be copied in setCommandLineOpts.
llvm-svn: 282255
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
we can handle "invoke" correctly.
Summary: We previously relies on InstructionCombining pass to remove invoke instructions. Now that we can inline invoke instructions correctly, we do not need these passes any more.
Reviewers: dnovillo
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D24730
llvm-svn: 281910
|
|
|
|
|
|
| |
trace-pc-guard. The intent is to eventually replace all of {bool coverage, 8bit-counters, trace-pc} with just this one. Clang part
llvm-svn: 281432
|
|
|
|
|
|
| |
trace-gep, mostly usaful for value-profile-based fuzzing; clang part
llvm-svn: 280044
|
|
|
|
|
|
|
|
|
|
| |
Reviewers: tejohnson
Subscribers: mehdi_amini, llvm-commits
Differential Revision: https://reviews.llvm.org/D23579
llvm-svn: 278906
|
|
|
|
|
|
| |
(sorry this didn't get landed closer in time...)
llvm-svn: 278897
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
This changes clang to use the llvm::lto::thinBackend function instead of
its own less comprehensive ThinLTO backend implementation.
Patch by Peter Collingbourne
Reviewers: tejohnson, mehdi_amini
Subscribers: cfe-commits, mehdi_amini
Differential Revision: https://reviews.llvm.org/D21545
llvm-svn: 278541
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch (with the corresponding ARM backend patch) adds support for
some new relocation models:
* Read-only position independence (ROPI): Code and read-only data is accessed
PC-relative. The offsets between all code and RO data sections are known at
static link time.
* Read-write position independence (RWPI): Read-write data is accessed relative
to a static base register. The offsets between all writeable data sections
are known at static link time.
These two modes are independent (they specify how different objects
should be addressed), so they can be used individually or together.
These modes are intended for bare-metal systems or systems with small
real-time operating systems. They are designed to avoid the need for a
dynamic linker, the only initialisation required is setting the static
base register to an appropriate value for RWPI code.
There is one C construct not currently supported by these modes: global
variables initialised to the address of another global variable or
function, where that address is not known at static-link time. There are
a few possible ways to solve this:
* Disallow this, and require the user to write their own initialisation
function if they need variables like this.
* Emit dynamic initialisers for these variables in the compiler, called from
the .init_array section (as is currently done for C++ dynamic initialisers).
We have a patch to do this, described in my original RFC email
(http://lists.llvm.org/pipermail/llvm-dev/2015-December/093022.html), but the
feedback from that RFC thread was that this is not something that belongs in
clang.
* Use a small dynamic loader to fix up these variables, by adding the
difference between the load and execution address of the relevant section.
This would require linker co-operation to generate a table of addresses that
need fixing up.
Differential Revision: https://reviews.llvm.org/D23196
llvm-svn: 278016
|
|
|
|
|
|
| |
Differential Revision: https://reviews.llvm.org/D19544
llvm-svn: 277167
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: Add -fpreserve-as-comments and -fno-preserve-as-comments.
Reviewers: echristo, rnk
Subscribers: mehdi_amini, llvm-commits
Differential Revision: https://reviews.llvm.org/D22883
llvm-svn: 276907
|
|
|
|
|
|
|
|
| |
Patch by Jake VanAdrighem
Differential Revision: http://reviews.llvm.org/D22608
llvm-svn: 276517
|
|
|
|
|
|
|
| |
This patch enables raw profile merging for this option which is the
new intended behavior.
llvm-svn: 276484
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This changes the CompilerInstance::createOutputFile function to return
a std::unique_ptr<llvm::raw_ostream>, rather than an llvm::raw_ostream
implicitly owned by the CompilerInstance. This in most cases required that
I move ownership of the output stream to the relevant ASTConsumer.
The motivation for this change is to allow BackendConsumer to be a client
of interfaces such as D20268 which take ownership of the output stream.
Differential Revision: http://reviews.llvm.org/D21537
llvm-svn: 275507
|
|
|
|
|
|
| |
We were just setting DisableUnitAtATime to its default value.
llvm-svn: 275005
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: InstCombine needs to be performed after simplifycfg and sroa, otherwise it may make bad optimization decisions.
Reviewers: davidxl, wmi, dnovillo
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D21568
llvm-svn: 273606
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add support for /Ob1 (and equivalent -finline-hint-functions), which enable
inlining only for functions marked inline, either explicitly (via inline
keyword, for example), or implicitly (function definition in class body,
for example).
This works by enabling inlining pass, and adding noinline attribute to
every function not marked inline.
Patch by Rudy Pons <rudy.pons@ilod.org>!
Differential Revision: http://reviews.llvm.org/D20647
llvm-svn: 273440
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: We need to call PruneEH pass before AutoFDO pass so that some EH-related calls can get inlined in Sample Profile pass.
Reviewers: davidxl, dnovillo
Subscribers: junbuml, llvm-commits
Differential Revision: http://reviews.llvm.org/D21197
llvm-svn: 273298
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Also emit lifetime markers for -fsanitize-address-use-after-scope.
Asan uses life-time markers for use-after-scope check.
PR27453
Reviewers: kcc, eugenis, aizatsky
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D20759
llvm-svn: 271451
|
|
|
|
| |
llvm-svn: 271162
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: Sample profile pass need to have instcombine pass. A related change is http://reviews.llvm.org/D17742. But we should not explicitly add dependency between to non-analysis passes. So we add the dependency here.
Reviewers: davidxl, dnovillo
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D20502
llvm-svn: 271010
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Adds a new -fsanitize=efficiency-working-set flag to enable esan's working
set tool. Adds appropriate tests for the new flag.
Reviewers: aizatsky
Subscribers: vitalybuka, zhaoqin, kcc, eugenis, llvm-commits
Differential Revision: http://reviews.llvm.org/D20484
llvm-svn: 270641
|
|
|
|
|
|
|
| |
Thread through -fsjlj-exceptions to the backend via the TargetOptions. This is
in preparation for supporting SjLj exceptions on x86 (e.g. for MinGW).
llvm-svn: 270528
|
|
|
|
|
|
| |
Add a const_cast rather than the C-style cast. NFC.
llvm-svn: 270180
|
|
|
|
| |
llvm-svn: 269989
|
|
|
|
|
|
|
|
|
|
|
| |
Embedded bitcode should have private linkage instead of appending or external.
Otherwise, it will cause link failure due to duplicated symbols.
Also add llvm.embedded.module and llvm.cmdline to llvm.compiler.used so they
don't get optimized out.
rdar://problem/21555860
llvm-svn: 269679
|
|
|
|
| |
llvm-svn: 269242
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Teach clang to embed bitcode inside bitcode. When -fembed-bitcode cc1
option is used, clang will embed both the input bitcode and cc1
commandline into the bitcode in special sections before compiling to
the object file. Using -fembed-bitcode-marker will only introduce a
marker in both sections.
Depends on D17390
Reviewers: rsmith
Subscribers: yaron.keren, vsk, cfe-commits
Differential Revision: http://reviews.llvm.org/D17392
llvm-svn: 269202
|
|
|
|
|
|
|
|
| |
set in module flags.
Differential Revision: http://reviews.llvm.org/D19749
llvm-svn: 268137
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
As of D18614, TargetMachine exposes a hook to add a set of passes that should
be run as early as possible. Invoke this hook from clang when setting up the
pass manager.
Reviewers: chandlerc
Subscribers: rnk, cfe-commits, tra
Differential Revision: http://reviews.llvm.org/D18617
llvm-svn: 267764
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Adds a framework to enable the instrumentation pass for the new
EfficiencySanitizer ("esan") family of tools. Adds a flag for esan's
cache fragmentation tool via -fsanitize=efficiency-cache-frag.
Adds appropriate tests for the new flag.
Reviewers: eugenis, vitalybuka, aizatsky, filcab
Subscribers: filcab, kubabrecka, llvm-commits, zhaoqin, kcc
Differential Revision: http://reviews.llvm.org/D19169
llvm-svn: 267059
|
|
|
|
| |
llvm-svn: 266638
|
|
|
|
|
|
|
|
| |
Clang should pass -backend-option to LLVM even though there is no target machine, since LLVM passes are used when emitting LLVM IR.
Differential Revision: http://reviews.llvm.org/D17552
llvm-svn: 266117
|
|
|
|
|
|
|
|
|
|
|
| |
Reviewers: tejohnson
Subscribers: joker.eph, cfe-commits
Differential Revision: http://reviews.llvm.org/D18947
From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 265977
|
|
|
|
|
|
|
|
|
| |
It is possible to argue that the EABIVersion field is similar in spirit to the
ABI field in TargetOptions. It represents the embedded ABI that the target
follows. This will allow us to thread this information into the target
information construction.
llvm-svn: 265807
|
|
|
|
|
|
|
|
|
|
|
| |
Revert the two changes to thread CodeGenOptions into the TargetInfo allocation
and to fix the layering violation by moving CodeGenOptions into Basic.
Code Generation is arguably not particularly "basic". This addresses Richard's
post-commit review comments. This change purely does the mechanical revert and
will be followed up with an alternate approach to thread the desired information
into TargetInfo.
llvm-svn: 265806
|
|
|
|
|
|
|
|
| |
This is a mechanical move of CodeGenOptions from libFrontend to libBasic. This
fixes the layering violation introduced earlier by threading CodeGenOptions into
TargetInfo. It should also fix the modules based self-hosting builds. NFC.
llvm-svn: 265702
|