| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
| |
Use __clear_cache builtin instead of cacheflush() in
Unix Memory::InvalidateInstructionCache().
Differential Revision: http://reviews.llvm.org/D7198
llvm-svn: 227269
|
|
|
|
|
|
|
|
|
| |
COMDATs must be identically named to the symbol. When support for COMDATs was
introduced, the symbol rewriter was not updated, resulting in rewriting failing
for symbols which were placed into COMDATs. This corrects the behaviour and
adds test cases for this.
llvm-svn: 227261
|
|
|
|
|
|
|
| |
The rewrite for the pattern based rewrite is unnecessary if the existing name
matches the pattern.
llvm-svn: 227260
|
|
|
|
| |
llvm-svn: 227256
|
|
|
|
|
|
| |
This contains the changes from r227148 & r227154, and also fixes to the test case to properly clean up the stack options.
llvm-svn: 227255
|
|
|
|
| |
llvm-svn: 227254
|
|
|
|
| |
llvm-svn: 227253
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
A simple genetic in-process coverage-guided fuzz testing library.
I've used this fuzzer to test clang-format
(it found 12+ bugs, thanks djasper@ for the fixes!)
and it may also help us test other parts of LLVM.
So why not keep it in the LLVM repository?
I plan to add the cmake build rules later (in a separate patch, if that's ok)
and also add a clang-format-fuzzer target.
See README.txt for details.
Test Plan: Tests will follow separately.
Reviewers: djasper, chandlerc, rnk
Reviewed By: rnk
Subscribers: majnemer, ygribov, dblaikie, llvm-commits
Differential Revision: http://reviews.llvm.org/D7184
llvm-svn: 227252
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This was introduced in a faulty refactoring (r225640, mea culpa):
the tests weren't testing the return values, so, for both
__strcpy_chk and __stpcpy_chk, we would return the end of the
buffer (matching stpcpy) instead of the beginning (for strcpy).
The root cause was the prefix "__" being ignored when comparing,
which made us always pick LibFunc::stpcpy_chk.
Pass the LibFunc::Func directly to avoid this kind of error.
Also, make the testcases as explicit as possible to prevent this.
The now-useful testcases expose another, entangled, stpcpy problem,
with the further simplification. This was introduced in a
refactoring (r225640) to match the original behavior.
However, this leads to problems when successive simplifications
generate several similar instructions, none of which are removed
by the custom replaceAllUsesWith.
For instance, InstCombine (the main user) doesn't erase the
instruction in its custom RAUW. When trying to simplify say
__stpcpy_chk:
- first, an stpcpy is created (fortified simplifier),
- second, a memcpy is created (normal simplifier), but the
stpcpy call isn't removed.
- third, InstCombine later revisits the instructions,
and simplifies the first stpcpy to a memcpy. We now have
two memcpys.
llvm-svn: 227250
|
|
|
|
|
|
|
|
|
|
|
| |
Splitting a loop to make range checks redundant is profitable only if
the range check "never" fails. Make this fact a part of recognizing a
range check -- a branch is a range check only if it is expected to
pass (via branch_weights metadata).
Differential Revision: http://reviews.llvm.org/D7192
llvm-svn: 227249
|
|
|
|
|
|
| |
This reverts commits r226953 and r226974.
llvm-svn: 227248
|
|
|
|
|
|
| |
Mach-O AArch64 linker optimization hints for ADRP code optimization.
llvm-svn: 227246
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch resolves part of PR21711 ( http://llvm.org/bugs/show_bug.cgi?id=21711 ).
The 'f3' test case in that report presents a situation where we have two 128-bit
stores extracted from a 256-bit source vector.
Instead of producing this:
vmovaps %xmm0, (%rdi)
vextractf128 $1, %ymm0, 16(%rdi)
This patch merges the 128-bit stores into a single 256-bit store:
vmovups %ymm0, (%rdi)
Differential Revision: http://reviews.llvm.org/D7208
llvm-svn: 227242
|
|
|
|
|
|
|
|
|
|
|
| |
If a memory access is unaligned, emit __tsan_unaligned_read/write
callbacks instead of __tsan_read/write.
Required to change semantics of __tsan_unaligned_read/write to not do the user memory.
But since they were unused (other than through __sanitizer_unaligned_load/store) this is fine.
Fixes long standing issue 17:
https://code.google.com/p/thread-sanitizer/issues/detail?id=17
llvm-svn: 227231
|
|
|
|
|
|
|
|
|
|
|
| |
Support weak symbols by first looking up if there is an externally visible symbol we can find,
and only if that fails using the one in the object file we're loading.
Reviewed By: lhames
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D6950
llvm-svn: 227228
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Basically all other methods that look up functions by name skip them if they are mere declarations.
Do the same in FindFunctionNamed.
Reviewers: lhames
Reviewed By: lhames
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D7068
llvm-svn: 227227
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch adds range checks to the immediate operands of octeon
instructions in the AsmParser. Like gas, it applies the following
transformations if the immediate is to large:
bbit0 $8, 42, foo => bbit032 $8, 10, foo
bbit1 $8, 46, foo => bbit132 $8, 14, foo
cins $8, $31, 32, 31 => cins32 $8, $31, 0, 31
exts $7, $4, 54, 9 => exts32 $7, $4, 22, 9
Reviewed By: dsanders
Differential Revision: http://reviews.llvm.org/D7080
llvm-svn: 227225
|
|
|
|
| |
llvm-svn: 227213
|
|
|
|
|
|
|
|
|
|
|
| |
Only pseudos have patterns on them.
Also don't set the asm string for VINTRP_Pseudo. All pseudos should have empty
asm.
This matches what all other multiclasses do.
llvm-svn: 227212
|
|
|
|
|
|
|
| |
Each class is split into two: one adds let statements around non-pseudos,
and the other one specifies the parameters.
llvm-svn: 227211
|
|
|
|
| |
llvm-svn: 227210
|
|
|
|
|
|
| |
This enables a lot of existing patterns for VI.
llvm-svn: 227209
|
|
|
|
|
|
|
|
|
| |
This defines the SI versions only, so it shouldn't change anything.
There are no changes other than using the new multiclasses, adding missing
mayLoad/mayStore, and formatting fixes.
llvm-svn: 227208
|
|
|
|
|
|
|
|
|
|
|
| |
'is_zero_undef' flag.
This patch teaches the Instruction Combiner how to fold a cttz/ctlz followed by
a icmp plus select into a single cttz/ctlz with flag 'is_zero_undef' cleared.
Added test InstCombine/select-cmp-cttz-ctlz.ll.
llvm-svn: 227197
|
|
|
|
|
|
|
| |
Sanitizer coverage constructor must run after asan constructor (for each DSO).
Bump constructor priority to guarantee that.
llvm-svn: 227195
|
|
|
|
|
|
|
|
|
| |
When lowering memcpy, memset or memmove, this assert checks whether the pointer
operands are in an address space < 256 which means "user defined address space"
on X86. However, this notion of "user defined address space" does not exist
for other targets.
llvm-svn: 227191
|
|
|
|
|
|
|
| |
off of the MachineFunction or with the version that takes a
Function reference as an argument.
llvm-svn: 227185
|
|
|
|
|
|
| |
(and remove an extraneous private).
llvm-svn: 227181
|
|
|
|
| |
llvm-svn: 227180
|
|
|
|
|
| |
NB: Saving files after editing helps.
llvm-svn: 227178
|
|
|
|
|
|
|
| |
when we didn't need the cast to the base class or the cached version
off of the subtarget.
llvm-svn: 227176
|
|
|
|
|
|
| |
and remove and unnecessary class variable.
llvm-svn: 227175
|
|
|
|
| |
llvm-svn: 227173
|
|
|
|
|
|
| |
getSubtarget.
llvm-svn: 227172
|
|
|
|
|
|
|
|
|
|
| |
LoopRotate wanted to avoid live range interference by looking at the
uses of a Value in the loop latch and seeing if any lied outside of the
loop. We would wrongly perform this operation on Constants.
This fixes PR22337.
llvm-svn: 227171
|
|
|
|
| |
llvm-svn: 227170
|
|
|
|
|
|
|
|
|
|
|
|
| |
r227148 added test CommandLineTest.HideUnrelatedOptionsMulti which repeatedly
outputs two following lines:
-tool: CommandLine Error: Option 'test-option-1' registered more than once!
-tool: CommandLine Error: Option 'test-option-2' registered more than once!
r227154 depends on changes from r227148
llvm-svn: 227167
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
object that manages a single run of this pass.
This was already essentially how it worked. Within the run function, it
would point members at *stack local* allocations that were only live for
a single run. Instead, it seems much cleaner to have a utility object
whose lifetime is clearly bounded by the run of the pass over the
function and can use member variables in a more direct way.
This also makes it easy to plumb the analyses used into it from the pass
and will make it re-usable with the new pass manager.
No functionality changed here, its just a refactoring.
llvm-svn: 227162
|
|
|
|
|
|
|
| |
subtarget and so doesn't need the TargetMachine or to access via
getSubtargetImpl. Update all callers.
llvm-svn: 227160
|
|
|
|
|
|
| |
getSubtargetImpl.
llvm-svn: 227159
|
|
|
|
|
|
| |
code.
llvm-svn: 227157
|
|
|
|
|
|
| |
a subtarget.
llvm-svn: 227156
|
|
|
|
| |
llvm-svn: 227154
|
|
|
|
|
|
|
| |
Phabricator revision: http://reviews.llvm.org/D7121
Patch by Sanjin Sijaric <ssijaric@codeaurora.org>!
llvm-svn: 227149
|
|
|
|
|
|
| |
SmallVectorImpl. Also adding a test case.
llvm-svn: 227148
|
|
|
|
|
|
|
|
| |
For ordered, unordered, equal and not-equal tests, packed float and double comparison instructions can be safely commuted without affecting the results. This patch checks the comparison mode of the (v)cmpps + (v)cmppd instructions and commutes the result if it can.
Differential Revision: http://reviews.llvm.org/D7178
llvm-svn: 227145
|
|
|
|
|
|
|
|
|
|
|
| |
This is especially useful for the UTF8 -> UTF16 direction, since
there is no equivalent of llvm::SmallString<> for wide characters.
This means that anyone who wants a null terminated string is forced
to manually push and pop their own null terminator.
Reviewed by: Reid Kleckner.
llvm-svn: 227143
|
|
|
|
|
|
|
|
| |
Patch to allow (v)pclmulqdq to be commuted - swaps the src registers and inverts the immediate (low/high) src mask.
Differential Revision: http://reviews.llvm.org/D7180
llvm-svn: 227141
|
|
|
|
|
|
| |
Need a new API for clang-modernize that allows specifying a list of option categories to remain visible. This will allow clang-modernize to move off getRegisteredOptions.
llvm-svn: 227140
|
|
|
|
|
|
| |
commit r227113 moved DataLayout
llvm-svn: 227133
|