Filipe Cabecinhas [Fri, 20 Feb 2015 03:41:07 +0000 (03:41 +0000)]
Make FileCheck be a common dependency, not an ASan one.
Summary:
It still gets picked up by ASan, but it also gets picked up by the other
test suites.
Otherwise, some test suites (e.g: UBSan) would complain they had no
dependencies, and wouldn't run.
Reviewers: samsonov, eugenis
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D7740
llvm-svn: 229962
Rui Ueyama [Fri, 20 Feb 2015 03:35:59 +0000 (03:35 +0000)]
PECOFF: Fix base relocation for ImageBase.
This is yet another edge case of base relocation for symbols. Absolute
symbols are in general not target of base relocation because absolute
atom is a way to point to a specific memory location. In r229816, I
removed entries for absolute atoms from the base relocation table
(so that they won't be fixed by the loader).
However, there was one exception -- ImageBase. ImageBase points to the
start address of the current image in memory. That needs to be fixed up
at load time. This patch is to treat the symbol in a special manner.
llvm-svn: 229961
Duncan P. N. Exon Smith [Fri, 20 Feb 2015 03:17:58 +0000 (03:17 +0000)]
Bitcode: Stop assuming non-null fields
When writing the bitcode serialization for the new debug info hierarchy,
I assumed two fields would never be null.
Drop that assumption, since it's brittle (and crashes the
`BitcodeWriter` if wrong), and is a check better left for the verifier
anyway. (No need for a bitcode upgrade here, since the new hierarchy is
still not in place.)
The fields in question are `MDCompileUnit::getFile()` and
`MDDerivedType::getBaseType()`, the latter of which isn't null in
test/Transforms/Mem2Reg/ConvertDebugInfo2.ll (see !14, a pointer to
nothing). While the testcase might have bitrotted, there's no reason
for the bitcode format to rely on non-null for metadata operands.
This also fixes a bug in `AsmWriter` where if the `file:` is null it
isn't emitted (caught by the double-round trip in the testcase I'm
adding) -- this is a required field in `LLParser`.
I'll circle back to ConvertDebugInfo2. Once the specialized nodes are
in place, I'll be trying to turn the debug info verifier back on by
default (in the newer module pass form committed r206300) and throwing
more logic in there. If the testcase has bitrotted (as opposed to me
not understanding the schema correctly) I'll fix it then.
llvm-svn: 229960
Hal Finkel [Fri, 20 Feb 2015 03:05:53 +0000 (03:05 +0000)]
[InstCombine] Remove unnecessary variable indexing into single-element arrays
This change addresses a deficiency pointed out in PR22629. To copy from the bug
report:
[from the bug report]
Consider this code:
int f(int x) {
int a[] = {12};
return a[x];
}
GCC knows to optimize this to
movl $12, %eax
ret
The code generated by recent Clang at -O3 is:
movslq %edi, %rax
movl .L_ZZ1fiE1a(,%rax,4), %eax
retq
.L_ZZ1fiE1a:
.long 12 # 0xc
[end from the bug report]
This definitely seems worth fixing. I've also seen this kind of code before (as
the base case of generic vector wrapper templates with one element).
The general idea is to look at the GEP feeding a load or a store, which has
some variable as its first non-zero index, and determine if that index must be
zero (or else an out-of-bounds access would occur). We can do this for allocas
and globals with constant initializers where we know the maximum size of the
underlying object. When we find such a GEP, we create a new one for the memory
access with that first variable index replaced with a constant zero.
Even if we can't eliminate the memory access (and sometimes we can't), it is
still useful because it removes unnecessary indexing calculations.
llvm-svn: 229959
Chandler Carruth [Fri, 20 Feb 2015 03:05:47 +0000 (03:05 +0000)]
[x86] Make the new vector shuffle legality test on by default, which
reflects the fact that the x86 backend can in fact lower any shuffle you
want it to with reasonably high code quality.
My recent work on the new vector shuffle has made this regress *very*
little. The diff in the test cases makes me very, very happy.
llvm-svn: 229958
Kostya Serebryany [Fri, 20 Feb 2015 03:02:37 +0000 (03:02 +0000)]
[fuzzer] one more experimental search mode: -use_coverage_pairs=1
llvm-svn: 229957
Justin Bogner [Fri, 20 Feb 2015 02:55:22 +0000 (02:55 +0000)]
utils: Teach lldbDataFormatters about llvm::Optional
llvm-svn: 229956
Chandler Carruth [Fri, 20 Feb 2015 02:44:13 +0000 (02:44 +0000)]
[x86] Clean up a couple of test cases with the new update script. Split
one test case that is only partially tested in 32-bits into two test
cases so that the script doesn't generate massive spews of tests for the
cases we don't care about.
llvm-svn: 229955
Philip Reames [Fri, 20 Feb 2015 02:34:49 +0000 (02:34 +0000)]
Adjust enablement of RewriteStatepointsForGC
When back merging the changes in 229945 I noticed that I forgot to mark the test cases with the appropriate GC. We want the rewriting to be off by default (even when manually added to the pass order), not on-by default. To keep the current test working, mark them as using the statepoint-example GC and whitelist that GC.
Longer term, we need a better selection mechanism here for both actual usage and testing. As I migrate more tests to the in tree version of this pass, I will probably need to update the enable/disable logic as well.
llvm-svn: 229954
Duncan P. N. Exon Smith [Fri, 20 Feb 2015 02:28:49 +0000 (02:28 +0000)]
IR: Extract macros from DILocation, NFC
`DILocation` is a lightweight wrapper. Its accessors check for null and
the correct type, and then forward to `MDLocation`.
Extract a couple of macros to do the `dyn_cast_or_null<>` and default
return logic. I'll be using these to minimize error-prone boilerplate
when I move the new hierarchy into place -- since all the other
subclasses of `DIDescriptor` will similarly become lightweight wrappers.
(Note that I hope to obsolete these wrappers fairly quickly, with the
goal of renaming the underlying types (e.g., I'll rename `MDLocation` to
`DILocation` once the name is free).)
llvm-svn: 229953
Chandler Carruth [Fri, 20 Feb 2015 02:15:36 +0000 (02:15 +0000)]
Revert r229944: EH: Prune unreachable resume instructions during Dwarf EH preparation
This doesn't pass 'ninja check-llvm' for me. Lots of tests, including
the ones updated, fail with crashes and other explosions.
llvm-svn: 229952
Kostya Serebryany [Fri, 20 Feb 2015 02:12:25 +0000 (02:12 +0000)]
[sanitizer] fix a test broken by r229940
llvm-svn: 229951
Larisse Voufo [Fri, 20 Feb 2015 02:07:22 +0000 (02:07 +0000)]
Add -fno-sized-deallocation option for completeness of fix in r229241 in documentation in r229818.
llvm-svn: 229950
Lang Hames [Fri, 20 Feb 2015 02:03:30 +0000 (02:03 +0000)]
[Orc][Kaleidoscope] Fix the orc/kaleidoscope tutorials on linux.
llvm-svn: 229949
Alexey Samsonov [Fri, 20 Feb 2015 01:45:51 +0000 (01:45 +0000)]
[Sanitizer] Remove multiline comment to silence GCC warning. NFC.
llvm-svn: 229948
Duncan P. N. Exon Smith [Fri, 20 Feb 2015 01:18:47 +0000 (01:18 +0000)]
IR: Add getRaw() helper, NFC
llvm-svn: 229947
Philip Reames [Fri, 20 Feb 2015 01:06:44 +0000 (01:06 +0000)]
Add a pass for constructing gc.statepoint sequences w/explicit relocations
This patch consists of a single pass whose only purpose is to visit previous inserted gc.statepoints which do not have gc.relocates inserted yet, and insert them. This can be used either immediately after IR generation to perform 'early safepoint insertion' or late in the pass order to perform 'late insertion'.
This patch is setting the stage for work to continue in tree. In particular, there are known naming and style violations in the current patch. I'll try to get those resolved over the next week or so. As I touch each area to make style changes, I need to make sure we have adequate testing in place. As part of the cleanup, I will be cleaning up a collection of test cases we have out of tree and submitting them upstream. The tests included in this change are very basic and mostly to provide examples of usage.
The pass has several main subproblems it needs to address:
- First, it has identify any live pointers. In the current code, the use of address spaces to distinguish pointers to GC managed objects is hard coded, but this will become parametrizable in the near future. Note that the current change doesn't actually contain a useful liveness analysis. It was seperated into a followup change as the code wasn't ready to be shared. Instead, the current implementation just considers any dominating def of appropriate pointer type to be live.
- Second, it has to identify base pointers for each live pointer. This is a fairly straight forward data flow algorithm.
- Third, the information in the previous steps is used to actually introduce rewrites. Rather than trying to do this by hand, we simply re-purpose the code behind Mem2Reg to do this for us.
llvm-svn: 229945
Reid Kleckner [Fri, 20 Feb 2015 01:00:19 +0000 (01:00 +0000)]
EH: Prune unreachable resume instructions during Dwarf EH preparation
Today a simple function that only catches exceptions and doesn't run
destructor cleanups ends up containing a dead call to _Unwind_Resume
(PR20300). We can't remove these dead resume instructions during normal
optimization because inlining might introduce additional landingpads
that do have cleanups to run. Instead we can do this during EH
preparation, which is guaranteed to run after inlining.
Fixes PR20300.
Reviewers: majnemer
Differential Revision: http://reviews.llvm.org/D7744
llvm-svn: 229944
Eric Christopher [Fri, 20 Feb 2015 00:45:28 +0000 (00:45 +0000)]
Revert "AVX-512: Full implementation for VRNDSCALESS/SD instructions and intrinsics."
The instructions were being generated on architectures that don't support avx512.
This reverts commit r229837.
llvm-svn: 229942
Eric Christopher [Fri, 20 Feb 2015 00:36:53 +0000 (00:36 +0000)]
Add a license header to the AVX512 file.
llvm-svn: 229941
Kostya Serebryany [Fri, 20 Feb 2015 00:30:44 +0000 (00:30 +0000)]
[sanitizer] when dumping the basic block trace, also dump the module names. Patch by Laszlo Szekeres
llvm-svn: 229940
Eric Christopher [Fri, 20 Feb 2015 00:03:45 +0000 (00:03 +0000)]
This needs to be a const variable so the two sides of the ternary
operator agree on type.
llvm-svn: 229938
Michael Gottesman [Fri, 20 Feb 2015 00:02:49 +0000 (00:02 +0000)]
[objc-arc-contract] We can not move retains over instructions which can not conservatively be proven to not decrement the retain's RCIdentity.
I also cleaned up the code to make it more understandable for mere mortals.
<rdar://problem/
19853758>
llvm-svn: 229937
Michael Gottesman [Fri, 20 Feb 2015 00:02:45 +0000 (00:02 +0000)]
[objc-arc] Add the predicate CanDecrementRefCount.
This is different from CanAlterRefCount since CanDecrementRefCount is
attempting to prove specifically whether or not an instruction can
decrement instead of the more general question of whether it can
decrement or increment.
llvm-svn: 229936
Eric Fiselier [Thu, 19 Feb 2015 23:57:46 +0000 (23:57 +0000)]
Fix incorrect locale mapping in config.py on OSX
llvm-svn: 229935
Jordan Rose [Thu, 19 Feb 2015 23:57:04 +0000 (23:57 +0000)]
[analyzer] RetainCountChecker: don't try to track ivars known to be nil.
We expect in general that any nil value has no retain count information
associated with it; violating this results in unexpected state unification
/later/ when we decide to throw the information away. Unexpectedly caching
out can lead to an assertion failure or crash.
rdar://problem/
19862648
llvm-svn: 229934
Duncan P. N. Exon Smith [Thu, 19 Feb 2015 23:56:07 +0000 (23:56 +0000)]
IR: Fix MDType fields from unsigned to uint64_t
When trying to match the current schema with the new debug info
hierarchy, I downgraded `SizeInBits`, `AlignInBits` and `OffsetInBits`
to 32-bits (oops!). Caught this while testing my upgrade script to move
the hierarchy into place. Bump it back up to 64-bits and update tests.
llvm-svn: 229933
Ahmed Bougacha [Thu, 19 Feb 2015 23:52:41 +0000 (23:52 +0000)]
[ARM] Re-re-apply VLD1/VST1 base-update combine.
This re-applies r223862, r224198, r224203, and r224754, which were
reverted in r228129 because they exposed Clang misalignment problems
when self-hosting.
The combine caused the crashes because we turned ISD::LOAD/STORE nodes
to ARMISD::VLD1/VST1_UPD nodes. When selecting addressing modes, we
were very lax for the former, and only emitted the alignment operand
(as in "[r1:128]") when it was larger than the standard alignment of
the memory type.
However, for ARMISD nodes, we just used the MMO alignment, no matter
what. In our case, we turned ISD nodes to ARMISD nodes, and this
caused the alignment operands to start being emitted.
And that's how we exposed alignment problems that were ignored before
(but I believe would have been caught with SCTRL.A==1?).
To fix this, we can just mirror the hack done for ISD nodes: only
take into account the MMO alignment when the access is overaligned.
Original commit message:
We used to only combine intrinsics, and turn them into VLD1_UPD/VST1_UPD
when the base pointer is incremented after the load/store.
We can do the same thing for generic load/stores.
Note that we can only combine the first load/store+adds pair in
a sequence (as might be generated for a v16f32 load for instance),
because other combines turn the base pointer addition chain (each
computing the address of the next load, from the address of the last
load) into independent additions (common base pointer + this load's
offset).
rdar://
19717869, rdar://
14062261.
llvm-svn: 229932
Eric Christopher [Thu, 19 Feb 2015 23:52:35 +0000 (23:52 +0000)]
Only use the initialized MCInstrInfo if it's been initialized already
during SetupMachineFunction. This is also the single use of MII
and it'll be changing to TargetInstrInfo (which is MachineFunction
based) in the next commit here.
llvm-svn: 229931
Duncan P. N. Exon Smith [Thu, 19 Feb 2015 23:48:17 +0000 (23:48 +0000)]
DebugInfo: Match Name and DisplayName in testcase
There's no way for `DIBuilder` to create a subprogram or global variable
where `getName()` and `getDisplayName()` give different answers. This
testcase managed to achieve the feat though. This was probably just
left behind in some sort of upgrade along the way.
llvm-svn: 229930
Ahmed Bougacha [Thu, 19 Feb 2015 23:30:37 +0000 (23:30 +0000)]
[ARM] Minor cleanup to CombineBaseUpdate. NFC.
In preparation for a future patch:
- rename isLoad to isLoadOp: the former is confusing, and can be taken
to refer to the fact that the node is an ISD::LOAD. (it isn't, yet.)
- change formatting here and there.
- add some comments.
- const-ify bools.
llvm-svn: 229929
Eric Christopher [Thu, 19 Feb 2015 23:29:42 +0000 (23:29 +0000)]
Migrate away a use of the subtarget (and TargetMachine) from
AsmPrinterDwarf since the information is on the MCRegisterInfo
via the MCContext and MMI that we already have on the AsmPrinter.
llvm-svn: 229928
Eric Fiselier [Thu, 19 Feb 2015 23:26:54 +0000 (23:26 +0000)]
Move to using -fdiagnostics-color=always on both GCC and Clang
llvm-svn: 229927
Duncan P. N. Exon Smith [Thu, 19 Feb 2015 23:25:21 +0000 (23:25 +0000)]
IR: Add missing null operand to MDSubroutineType
Add missing `nullptr` from `MDSubroutineType`'s operands for
`MDCompositeTypeBase::getIdentifier()` (and add tests for all the other
unused fields). This highlights just how crazy it is that
`MDSubroutineType` inherits from `MDCompositeTypeBase`.
llvm-svn: 229926
Ahmed Bougacha [Thu, 19 Feb 2015 23:13:10 +0000 (23:13 +0000)]
[CodeGen] Use ArrayRef instead of std::vector&. NFC.
The former lets us use SmallVectors. Do so in ARM and AArch64.
llvm-svn: 229925
Alexey Samsonov [Thu, 19 Feb 2015 22:56:49 +0000 (22:56 +0000)]
[Sanitizer] Drop LibIgnore dependency on SuppressionContext. NFC.
Let each LibIgnore user (for now it's only TSan) manually go
through SuppressionContext and pass ignored library templates to
LibIgnore.
llvm-svn: 229924
Alexey Samsonov [Thu, 19 Feb 2015 22:56:47 +0000 (22:56 +0000)]
[Sanitizer] Move TemplateMatch() to sanitizer_common.cc. NFC.
llvm-svn: 229923
Hans Wennborg [Thu, 19 Feb 2015 22:39:24 +0000 (22:39 +0000)]
Don't dllexport inline methods when targeting MinGW.
MinGW neither imports nor exports such methods. The import bit was
committed earlier, in r221154, and this takes care of the export part.
This also partially fixes PR22591.
llvm-svn: 229922
Dimitry Andric [Thu, 19 Feb 2015 22:32:33 +0000 (22:32 +0000)]
Add support for analyzing FreeBSD kernel printf extensions.
This adds a new __freebsd_kprintf__ format string type, which enables
checking when used in __attribute__((format(...))) attributes. It can
check the FreeBSD kernel specific %b, %D, %r and %y specifiers, using
existing diagnostic messages. Also adds test cases for all these
specifiers.
Differential Revision: http://reviews.llvm.org/D7154
llvm-svn: 229921
Tobias Grosser [Thu, 19 Feb 2015 22:16:12 +0000 (22:16 +0000)]
Fix formatting
llvm-svn: 229920
Fariborz Jahanian [Thu, 19 Feb 2015 21:52:41 +0000 (21:52 +0000)]
[Objective-C Sema]. Don't warn about use of
property accessors in @selector not implemented
because they will be auto-synthesized. rdar://
16607480
llvm-svn: 229919
David Majnemer [Thu, 19 Feb 2015 21:41:48 +0000 (21:41 +0000)]
Itanium ABI: Pack expansions change the arity of expressions to unknown
llvm-svn: 229918
Eric Christopher [Thu, 19 Feb 2015 21:29:51 +0000 (21:29 +0000)]
MCTargetOptions reside on the TargetMachine that we always have via
TargetOptions.
llvm-svn: 229917
Eric Christopher [Thu, 19 Feb 2015 21:24:23 +0000 (21:24 +0000)]
Remove a call to TargetMachine::getSubtarget from the inline
asm support in the asm printer. If we can get a subtarget from
the machine function then we should do so, otherwise we can
go ahead and create a default one since we're at the module
level.
llvm-svn: 229916
Reid Kleckner [Thu, 19 Feb 2015 21:13:45 +0000 (21:13 +0000)]
Avoid using a COMDAT for sized delete on MachO
llvm-svn: 229915
Colin LeMahieu [Thu, 19 Feb 2015 21:10:50 +0000 (21:10 +0000)]
[Hexagon] Moving remaining methods off of HexagonMCInst in to HexagonMCInstrInfo and eliminating HexagonMCInst class.
llvm-svn: 229914
Reid Kleckner [Thu, 19 Feb 2015 21:01:34 +0000 (21:01 +0000)]
Put the implicit weak sized deallocation funciton in C++14 in a comdat
Fixes PR22635.
llvm-svn: 229913
Greg Fitzgerald [Thu, 19 Feb 2015 20:42:23 +0000 (20:42 +0000)]
Fix heap-buffer-overflow bugs identified by the Address Sanitizer
Differential Revision: http://reviews.llvm.org/D7733
llvm-svn: 229912
Benjamin Kramer [Thu, 19 Feb 2015 20:24:04 +0000 (20:24 +0000)]
MC: Allow multiple comma-separated expressions on the .uleb128 directive.
For compatiblity with GNU as. Binutils documents this as
'.uleb128 expressions'. Subtle, isn't it?
llvm-svn: 229911
Ben Langmuir [Thu, 19 Feb 2015 20:23:22 +0000 (20:23 +0000)]
Revert "Mangle the IsSystem bit into the .pcm file name"
While I investigate some possible problems with this patch.
This reverts commit r228966
llvm-svn: 229910
Argyrios Kyrtzidis [Thu, 19 Feb 2015 20:12:20 +0000 (20:12 +0000)]
[PCH/Modules] Check that the specific module cache path the PCH was built with, is the same as
the one in the current compiler invocation. If they differ reject the PCH.
This protects against the badness occurring from getting modules loaded from different module caches (see crashes).
rdar://
19889860
llvm-svn: 229909
Benjamin Kramer [Thu, 19 Feb 2015 20:04:02 +0000 (20:04 +0000)]
SSAUpdater: Use range-based for. NFC.
llvm-svn: 229908
Eric Christopher [Thu, 19 Feb 2015 19:52:25 +0000 (19:52 +0000)]
Remove unused argument from emitInlineAsmStart.
llvm-svn: 229907
Michael Gottesman [Thu, 19 Feb 2015 19:51:36 +0000 (19:51 +0000)]
[objc-arc] Convert the bodies of ARCInstKind predicates into covered switches.
This is much better than the previous manner of just using
short-curcuiting booleans from:
1. A "naive" efficiency perspective: we do not have to rely on the
compiler to change the short circuiting boolean operations into a
switch.
2. An understanding perspective by making the implicit behavior of
negative predicates explicit.
3. A maintainability perspective through the covered switch flag making
it easy to know where to update code when adding new ARCInstKinds.
llvm-svn: 229906
Michael Gottesman [Thu, 19 Feb 2015 19:51:32 +0000 (19:51 +0000)]
[objc-arc] Change the InstructionClass to be an enum class called ARCInstKind.
I also renamed ObjCARCUtil.cpp -> ARCInstKind.cpp. That file only contained
items related to ARCInstKind anyways.
llvm-svn: 229905
Chris Bieneman [Thu, 19 Feb 2015 19:50:52 +0000 (19:50 +0000)]
Checking if TARGET_OS_IPHONE is defined isn't good enough for 10.7 and earlier.
Older versions of the TargetConditionals header always defined TARGET_OS_IPHONE to something (0 or 1), so we need to test not only for the existence but also if it is 1.
This resolves PR22631.
llvm-svn: 229904
Colin LeMahieu [Thu, 19 Feb 2015 19:49:27 +0000 (19:49 +0000)]
[Hexagon] Moving more functions off of HexagonMCInst and in to HexagonMCInstrInfo.
llvm-svn: 229903
David Majnemer [Thu, 19 Feb 2015 19:35:18 +0000 (19:35 +0000)]
CodeGen: Weak reference temporaries belong in a COMDAT
llvm-svn: 229902
Ilia K [Thu, 19 Feb 2015 19:26:52 +0000 (19:26 +0000)]
Add -stack-select-frame command (MI)
Summary:
Add -stack-select-frame command + test.
All tests pass on OS X.
Reviewers: abidh, emaste, clayborg
Reviewed By: clayborg
Subscribers: lldb-commits, emaste, clayborg, abidh
Differential Revision: http://reviews.llvm.org/D7765
llvm-svn: 229901
David Majnemer [Thu, 19 Feb 2015 19:25:17 +0000 (19:25 +0000)]
CodeGen: static constexpr data members should have a linkonce_odr init
Classes can be defined in multiple translation units. This means that
the static constexpr data members should have identical initializers in
all translation units. Implement this by giving the reference temporary
linkonce_odr linkage.
llvm-svn: 229900
Adam Nemet [Thu, 19 Feb 2015 19:15:21 +0000 (19:15 +0000)]
[LoopAccesses] Change LAA:getInfo to return a constant reference
As expected, this required a few more const-correctness fixes.
Based on Hal's feedback on D7684.
llvm-svn: 229899
Adam Nemet [Thu, 19 Feb 2015 19:15:19 +0000 (19:15 +0000)]
[LoopAccesses] Add -analyze support
The LoopInfo in combination with depth_first is used to enumerate the
loops.
Right now -analyze is not yet complete. It only prints the result of
the analysis, the report and the run-time checks. Printing the unsafe
depedences will require a bit more reshuffling which I'd like to do in a
follow-on to this patchset. Unsafe dependences are currently checked
via -debug-only=loop-accesses in the new test.
This is part of the patchset that converts LoopAccessAnalysis into an
actual analysis pass.
llvm-svn: 229898
Adam Nemet [Thu, 19 Feb 2015 19:15:15 +0000 (19:15 +0000)]
[LoopAccesses] Split out LoopAccessReport from VectorizerReport
The only difference between these two is that VectorizerReport adds a
vectorizer-specific prefix to its messages. When LAA is used in the
vectorizer context the prefix is added when we promote the
LoopAccessReport into a VectorizerReport via one of the constructors.
This is part of the patchset that converts LoopAccessAnalysis into an
actual analysis pass.
llvm-svn: 229897
Adam Nemet [Thu, 19 Feb 2015 19:15:13 +0000 (19:15 +0000)]
[LoopAccesses] Add missing const to APIs in VectorizationReport
When I split out LoopAccessReport from this, I need to create some temps
so constness becomes necessary.
This is part of the patchset that converts LoopAccessAnalysis into an
actual analysis pass.
llvm-svn: 229896
Adam Nemet [Thu, 19 Feb 2015 19:15:10 +0000 (19:15 +0000)]
[LoopAccesses] Add canAnalyzeLoop
This allows the analysis to be attempted with any loop. This feature
will be used with -analysis. (LV only requests the analysis on loops
that have already satisfied these tests.)
This is part of the patchset that converts LoopAccessAnalysis into an
actual analysis pass.
llvm-svn: 229895
Adam Nemet [Thu, 19 Feb 2015 19:15:07 +0000 (19:15 +0000)]
[LoopAccesses] Change debug messages from LV to LAA
Also add pass name as an argument to VectorizationReport::emitAnalysis.
This is part of the patchset that converts LoopAccessAnalysis into an
actual analysis pass.
llvm-svn: 229894
Adam Nemet [Thu, 19 Feb 2015 19:15:04 +0000 (19:15 +0000)]
[LoopAccesses] Create the analysis pass
This is a function pass that runs the analysis on demand. The analysis
can be initiated by querying the loop access info via LAA::getInfo. It
either returns the cached info or runs the analysis.
Symbolic stride information continues to reside outside of this analysis
pass. We may move it inside later but it's not a priority for me right
now. The idea is that Loop Distribution won't support run-time stride
checking at least initially.
This means that when querying the analysis, symbolic stride information
can be provided optionally. Whether stride information is used can
invalidate the cache entry and rerun the analysis. Note that if the
loop does not have any symbolic stride, the entry should be preserved
across Loop Distribution and LV.
Since currently the only user of the pass is LV, I just check that the
symbolic stride information didn't change when using a cached result.
On the LV side, LoopVectorizationLegality requests the info object
corresponding to the loop from the analysis pass. A large chunk of the
diff is due to LAI becoming a pointer from a reference.
A test will be added as part of the -analyze patch.
Also tested that with AVX, we generate identical assembly output for the
testsuite (including the external testsuite) before and after.
This is part of the patchset that converts LoopAccessAnalysis into an
actual analysis pass.
llvm-svn: 229893
Adam Nemet [Thu, 19 Feb 2015 19:15:00 +0000 (19:15 +0000)]
[LoopAccesses] Cache the result of canVectorizeMemory
LAA will be an on-demand analysis pass, so we need to cache the result
of the analysis. canVectorizeMemory is renamed to analyzeLoop which
computes the result. canVectorizeMemory becomes the query function for
the cached result.
This is part of the patchset that converts LoopAccessAnalysis into an
actual analysis pass.
llvm-svn: 229892
Adam Nemet [Thu, 19 Feb 2015 19:14:56 +0000 (19:14 +0000)]
[LoopAccesses] Stash the report from the analysis rather than emitting it
The transformation passes will query this and then emit them as part of
their own report. The currently only user LV is modified to do just
that.
This is part of the patchset that converts LoopAccessAnalysis into an
actual analysis pass.
llvm-svn: 229891
Adam Nemet [Thu, 19 Feb 2015 19:14:52 +0000 (19:14 +0000)]
[LoopAccesses] Make VectorizerParams global + fix for cyclic dep
As LAA is becoming a pass, we can no longer pass the params to its
constructor. This changes the command line flags to have external
storage. These can now be accessed both from LV and LAA.
VectorizerParams is moved out of LoopAccessInfo in order to shorten the
code to access it.
This commits also has the fix (D7731) to the break dependence cycle
between the analysis and vector libraries.
This is part of the patchset that converts LoopAccessAnalysis into an
actual analysis pass.
llvm-svn: 229890
Adam Nemet [Thu, 19 Feb 2015 19:14:34 +0000 (19:14 +0000)]
Revert "Reformat."
This reverts commit r229651.
I'd like to ultimately revert r229650 but this reformat stands in the
way. I'll reformat the affected files once the the loop-access pass is
fully committed.
llvm-svn: 229889
David Blaikie [Thu, 19 Feb 2015 19:06:04 +0000 (19:06 +0000)]
[orcjit] Include CMake support for the fully_lazy example and fix the build
Not sure if/how to make the CMake build use C++14 for the examples, so
let's stick to C++11 for now.
llvm-svn: 229888
Filipe Cabecinhas [Thu, 19 Feb 2015 19:00:33 +0000 (19:00 +0000)]
Make the _mm256_insert_epi64 definition more consistent
Use long long for the epi64 argument, like the other intrinsics.
NFC since this is only defined in 64-bit mode, not in 32-bit.
Fix suggested by H. J. Lu!
llvm-svn: 229886
Colin LeMahieu [Thu, 19 Feb 2015 19:00:00 +0000 (19:00 +0000)]
[Hexagon] Creating HexagonMCInstrInfo namespace as landing zone for static functions detached from HexagonMCInst.
llvm-svn: 229885
Eric Christopher [Thu, 19 Feb 2015 18:46:25 +0000 (18:46 +0000)]
Fix grammar in documentation.
Patch by Ralph Campbell!
llvm-svn: 229884
Eric Christopher [Thu, 19 Feb 2015 18:46:23 +0000 (18:46 +0000)]
Update and remove a few calls to TargetMachine::getSubtargetImpl
out of the asm printer.
llvm-svn: 229883
Kostya Serebryany [Thu, 19 Feb 2015 18:45:37 +0000 (18:45 +0000)]
[fuzzer] split main() into FuzzerDriver() that takes a callback as a parameter and a tiny main() in a separate file
llvm-svn: 229882
Ben Langmuir [Thu, 19 Feb 2015 18:22:35 +0000 (18:22 +0000)]
Assume the original file is created before release in LockFileManager
This is true in clang, and let's us remove the problematic code that
waits around for the original file and then times out if it doesn't get
created in short order. This caused any 'dead' lock file or legitimate
time out to cause a cascade of timeouts in any processes waiting on the
same lock (even if they only just showed up).
llvm-svn: 229881
Kostya Serebryany [Thu, 19 Feb 2015 18:21:12 +0000 (18:21 +0000)]
[fuzzer] properly annotate fallthrough, add one more entry to FAQ
llvm-svn: 229880
Johannes Doerfert [Thu, 19 Feb 2015 18:11:50 +0000 (18:11 +0000)]
[REFACTOR] Simplify the SCoP detection interface a bit
llvm-svn: 229879
Pavel Labath [Thu, 19 Feb 2015 18:10:55 +0000 (18:10 +0000)]
Factor out common URL handling code in PlatformRemoteGDBServer
Summary:
this also gets rid of a compiler warning in release builds by using a dynamically allocated
buffer. Therefore, a size assertion is not necessary (and probably should have been an error in
the first place).
Reviewers: tberghammer
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D7751
llvm-svn: 229878
Johannes Doerfert [Thu, 19 Feb 2015 18:09:39 +0000 (18:09 +0000)]
[NFC] Generalize getIslCompatibleName interface.
llvm-svn: 229877
Oleksiy Vyalov [Thu, 19 Feb 2015 17:58:04 +0000 (17:58 +0000)]
Prevent LLGS from crashing when exiting - make NativeProcessLinux to wait until ThreadStateCoordinator is fully stopped before entering ~NativeProcessLinux.
http://reviews.llvm.org/D7692
llvm-svn: 229875
Colin LeMahieu [Thu, 19 Feb 2015 17:38:39 +0000 (17:38 +0000)]
[Hexagon] Removing static variable holding MCInstrInfo.
llvm-svn: 229872
Benjamin Kramer [Thu, 19 Feb 2015 17:19:43 +0000 (17:19 +0000)]
LSR: Move set instead of copying. NFC.
llvm-svn: 229871
Sanjay Patel [Thu, 19 Feb 2015 16:59:11 +0000 (16:59 +0000)]
add X86 load folding tests for unary math ops
X86 load folding is fragile; eg, the tests here
don't work without AVX even though they should. This
is because we have a mix of tablegen patterns that have
been added over time, and we have a load folding table
used by the peephole optimizer that has to be kept in
sync with the ever-changing ISA and tablegen defs.
llvm-svn: 229870
John Thompson [Thu, 19 Feb 2015 16:47:27 +0000 (16:47 +0000)]
Added module map coverage support, extracted from module-map-checker.
llvm-svn: 229869
Ilia K [Thu, 19 Feb 2015 16:33:16 +0000 (16:33 +0000)]
Fix usage of m_bThreadInvalid in -thread-info (MI)
llvm-svn: 229868
Tobias Grosser [Thu, 19 Feb 2015 16:24:57 +0000 (16:24 +0000)]
Drop left over code from FinalRead statement removal.
We removed FinalRead statements in r152319.
llvm-svn: 229867
Marshall Clow [Thu, 19 Feb 2015 16:17:46 +0000 (16:17 +0000)]
Make basic_streambuf::xsputn write characters in chunks whenever possible, instead of one at a time. References PR#10193
llvm-svn: 229866
Daniel Jasper [Thu, 19 Feb 2015 16:14:18 +0000 (16:14 +0000)]
clang-format: [js] Support ES6 module exports.
Patch by Martin Probst, thank you!
llvm-svn: 229865
Rafael Espindola [Thu, 19 Feb 2015 16:08:20 +0000 (16:08 +0000)]
Avoid conversion to float when creating ConstantDataArray/ConstantDataVector.
Patch by Raoux, Thomas F!
llvm-svn: 229864
Daniel Jasper [Thu, 19 Feb 2015 16:07:32 +0000 (16:07 +0000)]
clang-format: [js] Support ES6 module imports.
Patch by Martin Probst.
llvm-svn: 229863
Daniel Jasper [Thu, 19 Feb 2015 16:03:16 +0000 (16:03 +0000)]
clang-format: [js] Do not fall through for JS structural elements.
Patch by Martin Probst. Thank you.
llvm-svn: 229862
Benjamin Kramer [Thu, 19 Feb 2015 15:26:17 +0000 (15:26 +0000)]
Demote vectors to arrays. No functionality change.
llvm-svn: 229861
Timur Iskhodzhanov [Thu, 19 Feb 2015 15:25:26 +0000 (15:25 +0000)]
[ASan/Win] Thread sanitizer common interface through asan_win_dll_thunk.cc
llvm-svn: 229860
Chandler Carruth [Thu, 19 Feb 2015 15:21:57 +0000 (15:21 +0000)]
[x86] Delete still more piles of complex code now that we have a good
systematic lowering of v8i16.
This required a slight strategy shift to prefer unpack lowerings in more
places. While this isn't a cut-and-dry win in every case, it is in the
overwhelming majority. There are only a few places where the old
lowering would probably be a touch faster, and then only by a small
margin.
In some cases, this is yet another significant improvement.
llvm-svn: 229859
Timur Iskhodzhanov [Thu, 19 Feb 2015 15:15:33 +0000 (15:15 +0000)]
[Sanitizers] Move the common sanitizer interface from sanitizer_internal_defs.h to a new sanitizer_interface_internal.h file
Reviewed at http://reviews.llvm.org/D7758
llvm-svn: 229858
Ilia K [Thu, 19 Feb 2015 15:14:17 +0000 (15:14 +0000)]
Add -stack-info-frame command (MI)
Summary:
Add -stack-info-frame command + test.
All tests pass on OS X.
Reviewers: emaste, clayborg, abidh
Reviewed By: abidh
Subscribers: lldb-commits, clayborg, emaste, abidh
Differential Revision: http://reviews.llvm.org/D7750
llvm-svn: 229857
Chandler Carruth [Thu, 19 Feb 2015 15:06:13 +0000 (15:06 +0000)]
[x86] Teach the unpack lowering how to lower with an initial unpack in
addition to lowering to trees rooted in an unpack.
This saves shuffles and or registers in many various ways, lets us
handle another class of v4i32 shuffles pre SSE4.1 without domain
crosses, etc.
llvm-svn: 229856