| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
These were noticed as missing in a code review. Add them and the boring
unit test to make sure they compile and DTRT.
llvm-svn: 296444
|
|
|
|
| |
llvm-svn: 296443
|
|
|
|
|
|
|
|
|
|
| |
This is also useful in cases when llvm is in a shared library. First we dlopen
the llvm shared library and then we register it as a permanent library in order
to keep the JIT and other services working.
Patch reviewed by Vedant Kumar (D29955)!
llvm-svn: 296442
|
|
|
|
|
|
| |
This is a normal maintenance update.
llvm-svn: 296441
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
With this change ImplicitNullCheck optimization uses alias analysis
and can use load/store memory access for implicit null check if there
are other load/store before but memory accesses do not alias.
Patch by Serguei Katkov!
Reviewers: sanjoy
Reviewed By: sanjoy
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D30331
llvm-svn: 296440
|
|
|
|
|
|
|
|
|
|
|
| |
In other places in LLD, we use write32<E> instead of Elf_Word.
This patch uses the same technique in the hash table classes.
The hash table classes needs improving as they have almost no
comments. We at least need to describe the hash table structure
and why we have to support two different on-disk hash tables
for the same purpose. I'll do that later.
llvm-svn: 296439
|
|
|
|
| |
llvm-svn: 296438
|
|
|
|
| |
llvm-svn: 296437
|
|
|
|
|
|
| |
These assignments seem meaningful, but actually all tests pass without them.
llvm-svn: 296436
|
|
|
|
|
|
|
|
| |
Previously, these two functions put their symbols in different queues.
Now that the queues have been merged. So there's no point to keep two
separate functions.
llvm-svn: 296435
|
|
|
|
| |
llvm-svn: 296434
|
|
|
|
|
|
|
|
|
| |
That function doesn't use any member of SymbolTableSection, so I
couldn't see a reason to make it a member of that class. The function
takes a SymbolBody, so it is more natural to make it a member of
SymbolBody.
llvm-svn: 296433
|
|
|
|
| |
llvm-svn: 296432
|
|
|
|
|
|
|
|
|
| |
Previously, there were three conditions: .symtab, .dynsym or we are
producing a relocatable output. Turned out that the third condition is
the same as the first one. This patch removes that third condition and
simplify code.
llvm-svn: 296431
|
|
|
|
| |
llvm-svn: 296430
|
|
|
|
|
|
|
|
|
|
|
|
| |
We really need to find a way to get this info from a single point of
truth in the LLVM backend, but it seems that the EM_* constants are
buried deep inside the constructors of the MCAsmBackend's.
For now, just fill in entries as we run into cases. AFAIK these mappings
are largely immutable, so we get a 75% discount on the technical debt
(code is duplicated, but little chance of divergence).
llvm-svn: 296429
|
|
|
|
| |
llvm-svn: 296428
|
|
|
|
| |
llvm-svn: 296427
|
|
|
|
|
|
|
|
| |
Revert Machine Outliner for now, as it breaks the asan bot.
This reverts commit r296418.
llvm-svn: 296426
|
|
|
|
| |
llvm-svn: 296425
|
|
|
|
| |
llvm-svn: 296424
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The previous code was a bit hard to understand because it unnecessarily
distinguished local and non-local symbols. It had NumLocals member
variable, but that variable didn't have a number of local symbols but
had some value that I cannot describe easily.
This patch rewrites SynbolTableSection::finalizeContents and
SymbolTableSection::writeTo to make it easy to understand. NumLocals
member variable has been removed, and writeGlobalSymbols and
writeLocalSymbols have been merged into one function.
There's still a piece of code that I think unnecessary. I'm not removing
that code in this patch, but will do in a follow-up patch.
llvm-svn: 296423
|
|
|
|
|
|
|
|
| |
multiple constraint managers"
This reverts commit 1b28d0b10e1c8feccb971abb6ef7a18bee589830.
llvm-svn: 296422
|
|
|
|
| |
llvm-svn: 296421
|
|
|
|
| |
llvm-svn: 296420
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
the case
Summary: Points the user to look at function pointer assignments.
Reviewers: kcc, eugenis, kubamracek
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D30432
llvm-svn: 296419
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is a patch for the outliner described in the RFC at:
http://lists.llvm.org/pipermail/llvm-dev/2016-August/104170.html
The outliner is a code-size reduction pass which works by finding
repeated sequences of instructions in a program, and replacing them with
calls to functions. This is useful to people working in low-memory
environments, where sacrificing performance for space is acceptable.
This adds an interprocedural outliner directly before printing assembly.
For reference on how this would work, this patch also includes X86
target hooks and an X86 test.
The outliner is run like so:
clang -mno-red-zone -mllvm -enable-machine-outliner file.c
Patch by Jessica Paquette<jpaquette@apple.com>!
rdar://29166825
Differential Revision: https://reviews.llvm.org/D26872
llvm-svn: 296418
|
|
|
|
| |
llvm-svn: 296417
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Splitting critical edges when one of the source edges is an indirectbr
is hard in general (because it requires changing the memory the indirectbr
reads). But if a block only has a single indirectbr predecessor (which is
the common case), we can simulate splitting that edge by splitting
the destination block, and retargeting the *direct* branches.
This is motivated by the use of computed gotos in python 2.7: PyEval_EvalFrame()
ends up using an indirect branch with ~100 successors, and passing a constant to
each of those. Since MachineSink can't break indirect critical edges on demand
(and doing this in MIR doesn't look feasible), this causes us to emit about ~100
defs of registers containing constants, which we in the predecessor block, where
only one of those constants is used in each successor. So, at each computed goto,
we needlessly spill about a 100 constants to stack. The end result is that a
clang-compiled python interpreter can be about ~2.5x slower on a simple python
reduction loop than a gcc-compiled interpreter.
Differential Revision: https://reviews.llvm.org/D29916
llvm-svn: 296416
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before the endianness was specified on each call to read
or write of the StreamReader / StreamWriter, but in practice
it's extremely rare for streams to have data encoded in
multiple different endiannesses, so we should optimize for the
99% use case.
This makes the code cleaner and more general, but otherwise
has NFC.
llvm-svn: 296415
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
constraint managers
Summary: Replace calls to %clang/%clang_cc1 with %clang_analyze_cc1 when invoking static analyzer, and perform runtime substitution to select the appropriate constraint manager, per D28952.
Reviewers: xazax.hun, NoQ, zaks.anna, dcoughlin
Subscribers: mgorny, rgov, mikhail.ramalho, a.sidorin, cfe-commits
Differential Revision: https://reviews.llvm.org/D30373
llvm-svn: 296414
|
|
|
|
|
|
| |
other minor fixes (NFC).
llvm-svn: 296413
|
|
|
|
|
|
| |
be checked in.
llvm-svn: 296412
|
|
|
|
|
|
|
| |
We may get a VL where the first element is a load, but the others
aren't. Trying to sort such VLs can only lead to sorrow.
llvm-svn: 296411
|
|
|
|
|
|
| |
This fixes -filetype=null errors introduced in r296403.
llvm-svn: 296410
|
|
|
|
|
|
|
| |
Constant fold, canonicalize constants to RHS,
reduce to minnum/maxnum when inputs are nan/undef.
llvm-svn: 296409
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
reloaded
Second attempt after http://llvm.org/viewvc/llvm-project?rev=296166&view=rev
In the first attempt, Code (the memory buffer backing the input file) was reset
before overwriteChangedFiles() was called, but overwriteChangedFiles() still
reads from it. This time, load the whole input file into memory instead of
using mmap when formatting in-place.
(Since the test is identical to what was in the repo before chapuni's revert,
svn diff doesn't show it – see the above link for the test.)
https://reviews.llvm.org/D30385
llvm-svn: 296408
|
|
|
|
| |
llvm-svn: 296407
|
|
|
|
| |
llvm-svn: 296406
|
|
|
|
|
|
|
|
|
|
| |
The Fuchsia ASan runtime reserves the low part of the address space.
Patch by Roland McGrath
Differential Revision: https://reviews.llvm.org/D30426
llvm-svn: 296405
|
|
|
|
|
|
| |
other minor fixes (NFC).
llvm-svn: 296404
|
|
|
|
|
|
|
|
|
| |
Instead of requiring every non-COFF MCObjectStreamer to implement the
COFF hooks just to do an llvm_unreachable to say that they're not
supported, do the llvm_unreachable in the default implementation, as
suggested by rnk in https://reviews.llvm.org/D26722.
llvm-svn: 296403
|
|
|
|
| |
llvm-svn: 296402
|
|
|
|
| |
llvm-svn: 296401
|
|
|
|
|
|
|
|
| |
This part of code is hard to understand because NumLocals does not
actually mean the number of local symbols but something else (!).
We need to rewrite. But before that we need to clean it up.
llvm-svn: 296400
|
|
|
|
|
|
|
| |
CFG sorting was already an independent algorithm from block/loop insertion;
this change makes it more convenient to debug.
llvm-svn: 296399
|
|
|
|
|
|
|
|
| |
attributes"
It causes miscompiles e.g. during self-host of Clang (PR32082).
llvm-svn: 296398
|
|
|
|
| |
llvm-svn: 296397
|
|
|
|
| |
llvm-svn: 296396
|
|
|
|
|
|
|
|
|
|
| |
createSwiftErrorEntriesInEntryBlock
Otherwise, it will insert instructions before it.
rdar://30536186
llvm-svn: 296395
|