| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
| |
Fix a FIXME. Disable loop alignment if compiled with -Oz now.
llvm-svn: 268121
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
This change teaches EarlyCSE some basic properties of guard intrinsics:
- Guard intrinsics read all memory, but don't write to any memory
- After a guard has executed, the condition it was guarding on can be
assumed to be true
- Guard intrinsics on a constant `true` are no-ops
Reviewers: reames, hfinkel
Subscribers: mcrosier, llvm-commits
Differential Revision: http://reviews.llvm.org/D19578
llvm-svn: 268120
|
|
|
|
|
|
|
|
|
|
| |
If a block has no successors because it ends in unreachable,
this was accessing an invalid iterator.
Also stop counting instructions that don't emit any
real instructions.
llvm-svn: 268119
|
|
|
|
|
|
|
| |
The linker already allocates common symbols by default.
Discussed with Rafael.
llvm-svn: 268117
|
|
|
|
| |
llvm-svn: 268116
|
|
|
|
|
|
|
|
| |
elements. NFCI.
Make use of Constant::getAggregateElement instead of checking constant types - first step towards adding support for UNDEF mask elements.
llvm-svn: 268115
|
|
|
|
|
|
| |
global var capture it).
llvm-svn: 268114
|
|
|
|
| |
llvm-svn: 268113
|
|
|
|
|
|
|
| |
The ORC compile callbacks and indirect stubs APIs will now work for AArc64,
allowing functions to be lazily compiled and/or updated.
llvm-svn: 268112
|
|
|
|
|
|
| |
the constructor fails, as this would lead to an 'unchecked error' crash.
llvm-svn: 268111
|
|
|
|
|
|
|
|
|
| |
a bitfield member doesn't lie within the bit bounds of the type itself, just leave it out so we don't get clang asserting and killing our IDE when it gets unhappy with the information.
https://llvm.org/bugs/show_bug.cgi?id=27515
<rdar://problem/21082998>
llvm-svn: 268110
|
|
|
|
|
|
| |
The "Building LLVM with CMake" document should have a reference to the CMakePrimer.
llvm-svn: 268109
|
|
|
|
|
|
| |
No functionality change is intended.
llvm-svn: 268108
|
|
|
|
|
|
|
|
| |
The implemented heuristic has a large body of code which better sits
in its own function for better readability. It also allows adding more
heuristics easier in the future.
llvm-svn: 268107
|
|
|
|
| |
llvm-svn: 268106
|
|
|
|
| |
llvm-svn: 268105
|
|
|
|
|
|
| |
Differential Revision: http://reviews.llvm.org/D19550
llvm-svn: 268104
|
|
|
|
|
|
| |
type or not. This change is tested by clang-tidy in r268100.
llvm-svn: 268103
|
|
|
|
| |
llvm-svn: 268102
|
|
|
|
|
|
| |
values showing up as we would find static variables in the Block and also in the compile unit. We now make sure a variable hasn't been added to the list before we add it.
llvm-svn: 268101
|
|
|
|
|
|
|
|
| |
have insufficient error checking, suggesting a better alternative.
This check corresponds to: https://www.securecoding.cert.org/confluence/display/c/ERR34-C.+Detect+errors+when+converting+a+string+to+a+number
llvm-svn: 268100
|
|
|
|
| |
llvm-svn: 268099
|
|
|
|
|
|
|
|
| |
or asserting.
<rdar://problem/23776428>
llvm-svn: 268098
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
This (partially) implements the check mentioned at
http://kristerw.blogspot.co.uk/2016/04/dangling-pointers-and-undefined-behavior.html
(via John Regehr)
Quoting:
"That the behavior is undefined follows from C11 6.2.4 "Storage
durations of objects"
The lifetime of an object is the portion of program execution during
which storage is guaranteed to be reserved for it. An object exists, has
a constant address, and retains its last-stored value throughout its
lifetime. If an object is referred to outside of its lifetime, the
behavior is undefined. The value of a pointer becomes indeterminate when
the object it points to (or just past) reaches the end of its lifetime.
and 7.22.3 "Memory management functions" that says that free ends the
lifetime of objects
The lifetime of an allocated object extends from the allocation until
the deallocation.
"
We can probably implement this for stack variables too, but I think this
is a good start to see if there's interest in this check.
We can also hide this behind a flag, too.
Reviewers: samsonov, kcc, rsmith, regehr
Subscribers: kubabrecka, llvm-commits
Differential Revision: http://reviews.llvm.org/D19691
llvm-svn: 268097
|
|
|
|
|
|
|
|
| |
This document is intended to provide a basic overview of the CMake scripting language for LLVM developers. It was unorthodoxly reviewed for accuracy and content on the CMake developer list:
http://public.kitware.com/pipermail/cmake-developers/2016-April/028300.html
llvm-svn: 268096
|
|
|
|
|
|
|
|
| |
Move to addPreEmitPass. This is so it runs after post-RA
scheduling so we can merge s_nops emitted by the scheduler
and hazard recognizer.
llvm-svn: 268095
|
|
|
|
| |
llvm-svn: 268094
|
|
|
|
|
|
| |
Differential revision: http://reviews.llvm.org/D19735
llvm-svn: 268093
|
|
|
|
| |
llvm-svn: 268092
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
a selector, the entry should be complete, containing everything introduced by
that module and all modules it imports.
Before writing out the method pool of a module, we sync up the out of date
selectors by pulling in methods for the selectors, from all modules it imports.
In ReadMethodPool, after pulling in the method pool entry for module A, this
lets us skip the modules that module A imports.
rdar://problem/25900131
llvm-svn: 268091
|
|
|
|
|
|
| |
Differential Revision: http://reviews.llvm.org/D19612
llvm-svn: 268090
|
|
|
|
|
|
| |
Differential Revision: http://reviews.llvm.org/D19333
llvm-svn: 268089
|
|
|
|
| |
llvm-svn: 268088
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch fixes two somewhat related bugs in MemorySSA's caching
walker. These bugs were found because D19695 brought up the problem
that we'd have defs cached to themselves, which is incorrect.
The bugs this fixes are:
- We would sometimes skip the nearest clobber of a MemoryAccess, because
we would query our cache for a given potential clobber before
checking if the potential clobber is the clobber we're looking for.
The cache entry for the potential clobber would point to the nearest
clobber *of the potential clobber*, so if that was a cache hit, we'd
ignore the potential clobber entirely.
- There are times (sometimes in DFS, sometimes in the getClobbering...
functions) where we would insert cache entries that say a def
clobbers itself.
There's a bit of common code between the fixes for the bugs, so they
aren't split out into multiple commits.
This patch also adds a few unit tests, and refactors existing tests a
bit to reduce the duplication of setup code.
llvm-svn: 268087
|
|
|
|
|
|
|
|
|
|
|
|
| |
matchSelectPattern attempts to see through casts which mask min/max
patterns from being more obvious. Under certain circumstances, it would
misidentify a sequence of instructions as a min/max because it assumed
that folding casts would preserve the result. This is not the case for
floating point <-> integer casts.
This fixes PR27575.
llvm-svn: 268086
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Make implementation of #pragma pack consistent with other "stack" pragmas.
Use PragmaStack<> class instead of old representation of internal stack.
Don't change compiler's behavior.
TODO:
1. Introduce diagnostics on popping named slots from pragma stacks.
Reviewer: rnk
Differential revision: http://reviews.llvm.org/D19727
llvm-svn: 268085
|
|
|
|
|
|
|
|
|
|
| |
There are probably hundreds of crashers we can find by fuzzing
more. For now we do the simplest possible validation of the
block size. Later, more complicated validations can verify that
other fields of the super block such as directory size, number
of blocks, agree with the size of the file etc.
llvm-svn: 268084
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In templated const functions, trying to run an expression would produce the
error
error: out-of-line definition of '$__lldb_expr' does not match any declaration
in 'foo' member declaration does not match because it is const qualified
error: 1 error parsing expression
which is no good. It turned out we don't actually need to worry about "const,"
we just need to be consistent about the declaration of the expression and the
FunctionDecl we inject into the class for "this."
Also added a test case.
<rdar://problem/24985958>
llvm-svn: 268083
|
|
|
|
|
|
|
|
|
|
|
| |
Fix crash in BuildCXXDefaultInitExpr when member of template class has
same name as the class itself.
Based on patch by Raphael "Teemperor" Isemann!
Differential Revision: http://reviews.llvm.org/D19721
llvm-svn: 268082
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Prepare to store requires-clause expression for access via
TemplateParameterList.
Reviewers: aaron.ballman, faisalv, rsmith
Subscribers: cfe-commits, nwilson
Differential Revision: http://reviews.llvm.org/D19220
llvm-svn: 268081
|
|
|
|
| |
llvm-svn: 268080
|
|
|
|
|
|
| |
http://reviews.llvm.org/D18136
llvm-svn: 268079
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: The Darwin armv7k ABI uses Dwarf EH, so we need to set the OS define correctly. Without this the gcc_personality fails to build.
Reviewers: t.p.northover
Subscribers: aemerson, cfe-commits, rengolin
Differential Revision: http://reviews.llvm.org/D19693
llvm-svn: 268078
|
|
|
|
|
|
|
| |
It was getting out of sync if we had undefined symbols at the start of
the symbol table.
llvm-svn: 268077
|
|
|
|
| |
llvm-svn: 268076
|
|
|
|
|
|
|
|
|
|
| |
This patch adds coverage for additional cases where implicit conversion can
occur (assignment and return). It also adds tests for some cases where a
warning should occur but none is produced. These are marked as FIXME.
Differential Revision: http://reviews.llvm.org/D16298
llvm-svn: 268075
|
|
|
|
|
|
| |
Instead of SelectionDAG::getConstant directly to make it more obvious that we're creating target constants.
llvm-svn: 268074
|
|
|
|
|
|
| |
Differential Revision: http://reviews.llvm.org/D19602
llvm-svn: 268073
|
|
|
|
| |
llvm-svn: 268072
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The motivation for this change is that PDB has the notion of
streams and substreams. Substreams often consist of variable
length structures that are convenient to be able to treat as
guaranteed, contiguous byte arrays, whereas the streams they
are contained in are not necessarily so, as a single stream
could be spread across many discontiguous blocks.
So, when processing data from a substream, we want to be able
to assume that we have a contiguous byte array so that we can
cast pointers to variable length arrays and such.
This leads to the question of how to be able to read the same
data structure from either a stream or a substream using the
same interface, which is where this patch comes in.
We separate out the stream's read state from the underlying
representation, and introduce a `StreamReader` class. Then
we change the name of `PDBStream` to `MappedBlockStream`, and
introduce a second kind of stream called a `ByteStream` which is
simply a sequence of contiguous bytes. Finally, we update all
of the std::vectors in `PDBDbiStream` to use `ByteStream` instead
as a proof of concept.
llvm-svn: 268071
|