Philip Reames [Wed, 9 Sep 2015 23:40:12 +0000 (23:40 +0000)]
[RewriteStatepointsForGC] Extend base pointer inference to handle insertelement
This change is simply enhancing the existing inference algorithm to handle insertelement instructions by conservatively inserting a new instruction to propagate the vector of associated base pointers. In the process, I'm ripping out the peephole optimizations which mostly helped cover the fact this hadn't been done.
Note that most of the newly inserted nodes will be nearly immediately removed by the post insertion optimization pass introduced in 246718. Arguably, we should be trying harder to avoid the malloc traffic here, but I'd rather get the code correct, then worry about compile time.
Unlike previous extensions of the algorithm to handle more case, I discovered the existing code was causing miscompiles in some cases. In particular, we had an implicit assumption that the peephole covered *all* insert element instructions, so if we had a value directly based on a insert element the peephole didn't cover, we proceeded as if it were a base anyways. Not good. I believe we had the same issue with shufflevector which is why I adjusted the predicate for them as well.
Differential Revision: http://reviews.llvm.org/D12583
llvm-svn: 247210
John McCall [Wed, 9 Sep 2015 23:37:17 +0000 (23:37 +0000)]
ARC: Fix the precise-lifetime suppression of returns_inner_pointer
receiver extension for message sends via property syntax.
rdar://
22172983
llvm-svn: 247209
Philip Reames [Wed, 9 Sep 2015 23:26:08 +0000 (23:26 +0000)]
[RewriteStatepointsForGC] Make base pointer inference deterministic
Previously, the base pointer algorithm wasn't deterministic. The core fixed point was (of course), but we were inserting new nodes and optimizing them in an order which was unspecified and variable. We'd somewhat hacked around this for testing by sorting by value name, but that doesn't solve the general determinism problem.
Instead, we can use the order of traversal over the def/use graph to give us a single consistent ordering. Today, this is a DFS order, but the exact order doesn't mater provided it's deterministic for a given input.
(Q: It is safe to rely on a deterministic order of operands right?)
Note that this only fixes the determinism within a single inference step. The inference step is currently invoked many times in a non-deterministic order. That's a future change in the sequence. :)
Differential Revision: http://reviews.llvm.org/D12640
llvm-svn: 247208
John McCall [Wed, 9 Sep 2015 23:04:17 +0000 (23:04 +0000)]
Fix access control for lookups using the Microsoft __super extension.
rdar://
22464808
llvm-svn: 247207
Stephane Sezer [Wed, 9 Sep 2015 22:58:23 +0000 (22:58 +0000)]
Fix a small comment typo in Windows Process code.
llvm-svn: 247206
Rafael Espindola [Wed, 9 Sep 2015 22:53:55 +0000 (22:53 +0000)]
Change the load addr into something that works on linux x86_64.
With this simple static programs run again.
llvm-svn: 247205
NAKAMURA Takumi [Wed, 9 Sep 2015 22:51:31 +0000 (22:51 +0000)]
thread_local is not implemented for targeting cygwin yet.
llvm-svn: 247204
Sanjay Patel [Wed, 9 Sep 2015 22:39:06 +0000 (22:39 +0000)]
convert builtin_unpredictable on a switch into metadata for LLVM
llvm-svn: 247203
Greg Clayton [Wed, 9 Sep 2015 22:35:25 +0000 (22:35 +0000)]
Fix the build-llvm.pl to not create one monster .a file from all of the llvm and clang .a files. We now just make a file list which we pass to the linker.
llvm-svn: 247202
Peter Collingbourne [Wed, 9 Sep 2015 22:30:32 +0000 (22:30 +0000)]
LowerBitSets: Fix non-determinism bug.
Visit disjoint sets in a deterministic order based on the maximum BitSetNM
index, otherwise the order in which we visit them will depend on pointer
comparisons. This was being exposed by MSan.
llvm-svn: 247201
Enrico Granata [Wed, 9 Sep 2015 22:30:24 +0000 (22:30 +0000)]
Introduce the notion of an escape helper. Different languages have different notion of what to print in a string and how to escape non-printable things. The escape helper is where this notion is provided to LLDB
This is NFC, other than a code re-org
llvm-svn: 247200
Piotr Padlewski [Wed, 9 Sep 2015 22:20:28 +0000 (22:20 +0000)]
Generating assumption loads of vptr after ctor call (fixed)
Generating call assume(icmp %vtable, %global_vtable) after constructor
call for devirtualization purposes.
For more info go to:
http://lists.llvm.org/pipermail/cfe-dev/2015-July/044227.html
Edit:
Fixed version because of PR24479.
After this patch got reverted because of ScalarEvolution bug (D12719)
Merged after John McCall big patch (Added Address).
http://reviews.llvm.org/D11859
llvm-svn: 247199
Chandler Carruth [Wed, 9 Sep 2015 22:13:56 +0000 (22:13 +0000)]
[PM] Update Polly for the new AA infrastructure landed in r247167.
llvm-svn: 247198
Greg Clayton [Wed, 9 Sep 2015 22:13:36 +0000 (22:13 +0000)]
Remove unused function.
llvm-svn: 247197
Greg Clayton [Wed, 9 Sep 2015 22:13:01 +0000 (22:13 +0000)]
Now that CompilerType uses a "TypeSystem *" and a "void *" instead of a "clang::ASTContext *" and a "void *", we need to know if anyone is trying to create a CompilerType from a clang::ASTContext that has no backing ClangASTContext.
This assert will fire if this is the case and we will need to fix the offending code.
llvm-svn: 247196
Enrico Granata [Wed, 9 Sep 2015 22:00:18 +0000 (22:00 +0000)]
Remove Target::GetBasicType()
I was experimenting with it briefly, and then settled on Target::GetTypeSystem + TypeSystem::GetBasicType, so this API is not necessary to have
Thanks to Ryan Brown for bringing it to my attention
llvm-svn: 247195
Nathan Wilson [Wed, 9 Sep 2015 21:48:31 +0000 (21:48 +0000)]
[Concepts] Add diagnostic; invalid specifier on function or variable concept declaration
Summary: Diagnose variable and function concept declarations when an invalid specifier appears
Reviewers: rsmith, aaron.ballman, faisalv, fraggamuffin, hubert.reinterpretcast
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D12435
llvm-svn: 247194
Greg Clayton [Wed, 9 Sep 2015 21:34:32 +0000 (21:34 +0000)]
Remove a call to deleted function.
llvm-svn: 247193
Reid Kleckner [Wed, 9 Sep 2015 21:10:03 +0000 (21:10 +0000)]
[SEH] Emit 32-bit SEH tables for the new EH IR
The 32-bit tables don't actually contain PC range data, so emitting them
is incredibly simple.
The 64-bit tables, on the other hand, use the same table for state
numbering as well as label ranges. This makes things more difficult, so
it will be implemented later.
llvm-svn: 247192
Ed Maste [Wed, 9 Sep 2015 21:00:10 +0000 (21:00 +0000)]
For now skip ThreadSpecificBreakTestCase on FreeBSD
It often hangs or times out, and obscures issues with other tests.
Just skip it for now (until the FreeBSD test suite is producing
consistent results) so that we can get a buildbot back.
Previous investigation (for failures) in llvm.org/pr18522
llvm-svn: 247190
Enrico Granata [Wed, 9 Sep 2015 20:59:49 +0000 (20:59 +0000)]
Preparatory work for letting language plugins help the StringPrinter with formatting special characters
llvm-svn: 247189
David Majnemer [Wed, 9 Sep 2015 20:57:59 +0000 (20:57 +0000)]
[MS ABI] Don't crash on references to pointers to members in args
We know that a reference can always be dereferenced. However, we don't
always know the number of bytes if the reference's pointee type is
incomplete. This case was correctly handled but we didn't consider the
case where the type is complete but we cannot calculate its size for ABI
specific reasons. In this specific case, a member pointer's size is
available only under certain conditions.
This fixes PR24703.
llvm-svn: 247188
Dan Gohman [Wed, 9 Sep 2015 20:54:31 +0000 (20:54 +0000)]
[WebAssembly] Update target datalayout strings.
llvm-svn: 247187
Teresa Johnson [Wed, 9 Sep 2015 20:53:31 +0000 (20:53 +0000)]
Change EmitRecordWithAbbrevImpl to take Optional record code. NFC.
This change enables EmitRecord to pass the supplied record Code to
EmitRecordWithAbbrevImpl, rather than insert it into the Vals array.
It is an enabler for changing EmitRecord to take an ArrayRef<uintty> instead
of a SmallVectorImpl<uintty>&
Patch suggested by Duncan P. N. Exon Smith, modified by myself a bit to get
correct assertion checking.
llvm-svn: 247186
Michael J. Spencer [Wed, 9 Sep 2015 20:48:09 +0000 (20:48 +0000)]
[elf2] Assign output sections to PHDRs.
This is a minimal implementation to produce legal output. Future patches will combine multiple compatible PT_LOADs.
llvm-svn: 247185
Piotr Padlewski [Wed, 9 Sep 2015 20:47:30 +0000 (20:47 +0000)]
ScalarEvolution assume hanging bugfix
http://reviews.llvm.org/D12719
llvm-svn: 247184
Mehdi Amini [Wed, 9 Sep 2015 20:35:37 +0000 (20:35 +0000)]
Revert "EmitRecordWith* API change: takes an ArrayRef instead of a SmallVector (NFC)"
This reverts commit r247179.
From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 247183
Mehdi Amini [Wed, 9 Sep 2015 20:35:15 +0000 (20:35 +0000)]
Revert "Bitcode Writer: EmitRecordWith* takes an ArrayRef instead of a SmallVector (NFC)"
This reverts commit r247178.
From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 247182
Rafael Espindola [Wed, 9 Sep 2015 20:26:23 +0000 (20:26 +0000)]
Add the DT_NEEDED entries to the dynamic table.
llvm-svn: 247181
David Majnemer [Wed, 9 Sep 2015 20:20:08 +0000 (20:20 +0000)]
Revert trunc(lshr (sext A), Cst) to ashr A, Cst
This reverts commit r246997, it introduced a regression (PR24763).
llvm-svn: 247180
Mehdi Amini [Wed, 9 Sep 2015 20:08:51 +0000 (20:08 +0000)]
EmitRecordWith* API change: takes an ArrayRef instead of a SmallVector (NFC)
From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 247179
Mehdi Amini [Wed, 9 Sep 2015 20:08:39 +0000 (20:08 +0000)]
Bitcode Writer: EmitRecordWith* takes an ArrayRef instead of a SmallVector (NFC)
From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 247178
Renato Golin [Wed, 9 Sep 2015 19:44:40 +0000 (19:44 +0000)]
Revert "AVX512: Implemented encoding and intrinsics for vextracti64x4 ,vextracti64x2, vextracti32x8, vextracti32x4, vextractf64x4, vextractf64x2, vextractf32x8, vextractf32x4 Added tests for intrinsics and encoding."
This reverts commit r247149, as it was breaking numerous buildbots of varied architectures.
llvm-svn: 247177
Argyrios Kyrtzidis [Wed, 9 Sep 2015 18:54:16 +0000 (18:54 +0000)]
[libclang] Add missing clang_CompileCommand_* functions in libclang.exports.
llvm-svn: 247176
Greg Clayton [Wed, 9 Sep 2015 18:41:50 +0000 (18:41 +0000)]
Make sure to flush the stream to make sure the string is up to date when we query its size.
llvm-svn: 247175
Sanjay Patel [Wed, 9 Sep 2015 18:38:30 +0000 (18:38 +0000)]
allow unpredictable metadata on switch statements
llvm-svn: 247174
Zachary Turner [Wed, 9 Sep 2015 18:25:13 +0000 (18:25 +0000)]
Don't allow duplicate names for tests.
We had 2 tests named TestCPPBreakpoints.py. If one of those tests
failed, both of them would be reported as failures and contribute
to the failure count. There may be other examples of duplicate
test names, and we should fix those as we find them.
llvm-svn: 247173
Michael Kruse [Wed, 9 Sep 2015 18:20:31 +0000 (18:20 +0000)]
Fix typo: zycle -> cycle [NFC]
llvm-svn: 247172
Matthias Braun [Wed, 9 Sep 2015 18:08:03 +0000 (18:08 +0000)]
Save LaneMask with livein registers
With subregister liveness enabled we can detect the case where only
parts of a register are live in, this is expressed as a 32bit lanemask.
The current code only keeps registers in the live-in list and therefore
enumerated all subregisters affected by the lanemask. This turned out to
be too conservative as the subregister may also cover additional parts
of the lanemask which are not live. Expressing a given lanemask by
enumerating a minimum set of subregisters is computationally expensive
so the best solution is to simply change the live-in list to store the
lanemasks as well. This will reduce memory usage for targets using
subregister liveness and slightly increase it for other targets
Differential Revision: http://reviews.llvm.org/D12442
llvm-svn: 247171
Matthias Braun [Wed, 9 Sep 2015 18:07:54 +0000 (18:07 +0000)]
VirtRegMap: Improve addMBBLiveIns() using SlotIndex::MBBIndexIterator; NFC
Now that we have an explicit iterator over the idx2MBBMap in SlotIndices
we can use the fact that segments and the idx2MBBMap is sorted by
SlotIndex position so can advance both simultaneously instead of
starting from the beginning for each segment.
This complicates the code for the subregister case somewhat but should
be more efficient and has the advantage that we get the final lanemask
for each block immediately which will be important for a subsequent
change.
Removes the now unused SlotIndexes::findMBBLiveIns function.
Differential Revision: http://reviews.llvm.org/D12443
llvm-svn: 247170
Rui Ueyama [Wed, 9 Sep 2015 18:02:23 +0000 (18:02 +0000)]
Fix indentation.
llvm-svn: 247169
Rui Ueyama [Wed, 9 Sep 2015 17:55:09 +0000 (17:55 +0000)]
ELF2: Reduce nesting by returning early. NFC.
llvm-svn: 247168
Chandler Carruth [Wed, 9 Sep 2015 17:55:00 +0000 (17:55 +0000)]
[PM/AA] Rebuild LLVM's alias analysis infrastructure in a way compatible
with the new pass manager, and no longer relying on analysis groups.
This builds essentially a ground-up new AA infrastructure stack for
LLVM. The core ideas are the same that are used throughout the new pass
manager: type erased polymorphism and direct composition. The design is
as follows:
- FunctionAAResults is a type-erasing alias analysis results aggregation
interface to walk a single query across a range of results from
different alias analyses. Currently this is function-specific as we
always assume that aliasing queries are *within* a function.
- AAResultBase is a CRTP utility providing stub implementations of
various parts of the alias analysis result concept, notably in several
cases in terms of other more general parts of the interface. This can
be used to implement only a narrow part of the interface rather than
the entire interface. This isn't really ideal, this logic should be
hoisted into FunctionAAResults as currently it will cause
a significant amount of redundant work, but it faithfully models the
behavior of the prior infrastructure.
- All the alias analysis passes are ported to be wrapper passes for the
legacy PM and new-style analysis passes for the new PM with a shared
result object. In some cases (most notably CFL), this is an extremely
naive approach that we should revisit when we can specialize for the
new pass manager.
- BasicAA has been restructured to reflect that it is much more
fundamentally a function analysis because it uses dominator trees and
loop info that need to be constructed for each function.
All of the references to getting alias analysis results have been
updated to use the new aggregation interface. All the preservation and
other pass management code has been updated accordingly.
The way the FunctionAAResultsWrapperPass works is to detect the
available alias analyses when run, and add them to the results object.
This means that we should be able to continue to respect when various
passes are added to the pipeline, for example adding CFL or adding TBAA
passes should just cause their results to be available and to get folded
into this. The exception to this rule is BasicAA which really needs to
be a function pass due to using dominator trees and loop info. As
a consequence, the FunctionAAResultsWrapperPass directly depends on
BasicAA and always includes it in the aggregation.
This has significant implications for preserving analyses. Generally,
most passes shouldn't bother preserving FunctionAAResultsWrapperPass
because rebuilding the results just updates the set of known AA passes.
The exception to this rule are LoopPass instances which need to preserve
all the function analyses that the loop pass manager will end up
needing. This means preserving both BasicAAWrapperPass and the
aggregating FunctionAAResultsWrapperPass.
Now, when preserving an alias analysis, you do so by directly preserving
that analysis. This is only necessary for non-immutable-pass-provided
alias analyses though, and there are only three of interest: BasicAA,
GlobalsAA (formerly GlobalsModRef), and SCEVAA. Usually BasicAA is
preserved when needed because it (like DominatorTree and LoopInfo) is
marked as a CFG-only pass. I've expanded GlobalsAA into the preserved
set everywhere we previously were preserving all of AliasAnalysis, and
I've added SCEVAA in the intersection of that with where we preserve
SCEV itself.
One significant challenge to all of this is that the CGSCC passes were
actually using the alias analysis implementations by taking advantage of
a pretty amazing set of loop holes in the old pass manager's analysis
management code which allowed analysis groups to slide through in many
cases. Moving away from analysis groups makes this problem much more
obvious. To fix it, I've leveraged the flexibility the design of the new
PM components provides to just directly construct the relevant alias
analyses for the relevant functions in the IPO passes that need them.
This is a bit hacky, but should go away with the new pass manager, and
is already in many ways cleaner than the prior state.
Another significant challenge is that various facilities of the old
alias analysis infrastructure just don't fit any more. The most
significant of these is the alias analysis 'counter' pass. That pass
relied on the ability to snoop on AA queries at different points in the
analysis group chain. Instead, I'm planning to build printing
functionality directly into the aggregation layer. I've not included
that in this patch merely to keep it smaller.
Note that all of this needs a nearly complete rewrite of the AA
documentation. I'm planning to do that, but I'd like to make sure the
new design settles, and to flesh out a bit more of what it looks like in
the new pass manager first.
Differential Revision: http://reviews.llvm.org/D12080
llvm-svn: 247167
Matthias Braun [Wed, 9 Sep 2015 17:49:46 +0000 (17:49 +0000)]
MachineVerifier: Check that SlotIndex MBBIndexList is sorted.
This introduces a check that the MBBIndexList is sorted as proposed in
http://reviews.llvm.org/D12443 but split up into a separate commit.
llvm-svn: 247166
Rui Ueyama [Wed, 9 Sep 2015 17:40:51 +0000 (17:40 +0000)]
ELF2: Return early. NFC.
llvm-svn: 247165
Zachary Turner [Wed, 9 Sep 2015 17:25:43 +0000 (17:25 +0000)]
Fix some compiler warnings.
llvm-svn: 247164
Alexander Kornienko [Wed, 9 Sep 2015 17:06:09 +0000 (17:06 +0000)]
[clang-tidy] Fix PR22785.
Fix http://llvm.org/PR22785. Bug 22785 - readability-braces-around-statements
doesn't work well with macros.
http://reviews.llvm.org/D12729
Patch by Marek Kurdej!
llvm-svn: 247163
Matt Arsenault [Wed, 9 Sep 2015 17:03:29 +0000 (17:03 +0000)]
AMDGPU: Extract full 64-bit subregister and use subregs
Instead of extracting both 32-bit components from the 128-bit
register. This produces fewer copies and is easier for
the copy peephole optimizer to understand and see the actual uses
as extracts from a reg_sequence.
This avoids needing to handle subregister composing in the
PeepholeOptimizer's ValueTracker for this case.
llvm-svn: 247162
Matt Arsenault [Wed, 9 Sep 2015 17:03:18 +0000 (17:03 +0000)]
AMDGPU: Remove unused multiclass argument
llvm-svn: 247161
Argyrios Kyrtzidis [Wed, 9 Sep 2015 16:48:47 +0000 (16:48 +0000)]
Fix a small bug in clang where generating some temporary files would have an extra period before the extension.
Patch by Cameron Esfahani!
llvm-svn: 247160
Tom Stellard [Wed, 9 Sep 2015 16:39:30 +0000 (16:39 +0000)]
llvm-config: Add --build-system option
Summary:
This can be used for distinguishing between cmake and autoconf builds.
Users may need this in order to handle inconsistencies between the
outputs of the two build systems.
Reviewers: echristo, chandlerc, beanz
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D11838
llvm-svn: 247159
Dan Gohman [Wed, 9 Sep 2015 16:13:47 +0000 (16:13 +0000)]
[WebAssembly] Implement calls with void return types.
llvm-svn: 247158
Tom Stellard [Wed, 9 Sep 2015 15:43:26 +0000 (15:43 +0000)]
AMDGPU/SI: Fold operands through REG_SEQUENCE instructions
Summary:
This helps mostly when we use add instructions for address calculations
that contain immediates.
Reviewers: arsenm
Subscribers: arsenm, llvm-commits
Differential Revision: http://reviews.llvm.org/D12256
llvm-svn: 247157
Silviu Baranga [Wed, 9 Sep 2015 15:35:02 +0000 (15:35 +0000)]
[CostModel][AArch64] Remove amortization factor for some of the vector select instructions
Summary:
We are not scalarizing the wide selects in codegen for i16 and i32 and
therefore we can remove the amortization factor. We still have issues
with i64 vectors in codegen though.
Reviewers: mcrosier
Subscribers: mcrosier, aemerson, llvm-commits, rengolin
Differential Revision: http://reviews.llvm.org/D12724
llvm-svn: 247156
Rafael Espindola [Wed, 9 Sep 2015 15:33:08 +0000 (15:33 +0000)]
Start adding content to the dynamic section.
With this patch we create a dynamic string table (it is allocated, unlike
the regular one) and the dynamic section has a DT_STRTAB pointing to it.
llvm-svn: 247155
Sanjay Patel [Wed, 9 Sep 2015 15:24:36 +0000 (15:24 +0000)]
don't repeat function names in comments; NFC
llvm-svn: 247154
Alexander Kornienko [Wed, 9 Sep 2015 15:23:39 +0000 (15:23 +0000)]
[clang-tidy] Automatically redirect to the new page.
llvm-svn: 247153
Dan Gohman [Wed, 9 Sep 2015 15:13:36 +0000 (15:13 +0000)]
[WebAssembly] Tidy up some unneeded newline characters.
llvm-svn: 247152
Joseph Tremoulet [Wed, 9 Sep 2015 14:57:06 +0000 (14:57 +0000)]
[CMake] Flag recursive cmake invocations for cross-compile
Summary:
Cross-compilation uses recursive cmake invocations to build native host
tools. These recursive invocations only forward a fixed set of
variables/options, since the native environment is generally the default.
This change adds -DLLVM_TARGET_IS_CROSSCOMPILE_HOST=TRUE to the recursive
cmake invocations, so that cmake files can distinguish these recursive
invocations from top-level ones, which can explain why expected options
are unset.
LLILC will use this to avoid trying to generate its build rules in the
crosscompile native host target (where it is not needed), which would fail
if attempted because LLILC requires a cmake variable passed on the command
line, which is not forwarded in the recursive invocation.
Reviewers: rnk, beanz
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D12679
llvm-svn: 247151
Sanjay Patel [Wed, 9 Sep 2015 14:54:29 +0000 (14:54 +0000)]
function names start with a lower case letter; NFC
llvm-svn: 247150
Igor Breger [Wed, 9 Sep 2015 14:35:09 +0000 (14:35 +0000)]
AVX512: Implemented encoding and intrinsics for
vextracti64x4 ,vextracti64x2, vextracti32x8, vextracti32x4, vextractf64x4, vextractf64x2, vextractf32x8, vextractf32x4
Added tests for intrinsics and encoding.
Differential Revision: http://reviews.llvm.org/D11802
llvm-svn: 247149
Sanjay Patel [Wed, 9 Sep 2015 14:34:26 +0000 (14:34 +0000)]
don't repeat function names in comments; NFC
llvm-svn: 247148
Johannes Doerfert [Wed, 9 Sep 2015 14:19:04 +0000 (14:19 +0000)]
Disable support for pointer expressions
The support for pointer expressions is broken as it can only handle
some patterns in the IslExprBuilder. We should to treat pointers in
expressions the same as integers at some point and revert this patch.
llvm-svn: 247147
Zoran Jovanovic [Wed, 9 Sep 2015 13:55:45 +0000 (13:55 +0000)]
[mips][microMIPS] Implement ADDU16, AND16, ANDI16, NOT16, OR16, SLL16 and SRL16 instructions
Differential Revision: http://reviews.llvm.org/D11178
llvm-svn: 247146
Alex Lorenz [Wed, 9 Sep 2015 13:44:33 +0000 (13:44 +0000)]
Fix PR 24633 - Handle undef values when parsing standalone constants.
llvm-svn: 247145
Rafael Espindola [Wed, 9 Sep 2015 13:36:00 +0000 (13:36 +0000)]
[Solaris] Use the GCC Installation detector to add the C++ include paths.
Patch by Xan López!
llvm-svn: 247144
Ed Maste [Wed, 9 Sep 2015 13:15:14 +0000 (13:15 +0000)]
Update expectedFailureFreeBSD to expectedFlakeyFreeBSD for intermittent tests
Due to LLDB or test race conditions these tests do not pass
consistently.
llvm.org/pr15037
llvm.org/pr19310
llvm.org/pr22611
llvm-svn: 247143
Michael Kruse [Wed, 9 Sep 2015 13:15:11 +0000 (13:15 +0000)]
Generate gitversion.h in autoconf builds
Add a custom makefile rule to generate lib/External/isl/gitversion.h
from GIT_HEAD_ID and trigger it using BULIT_SOURCES to ensure the file
exists before compilation starts.
The latest ISL creates gitversion.h from Makefile.am only, instead also
from configure.ac in previous version. While the Polly build invokes
configure, it does not invoke ISL's make such that the file was missing.
Invoking ISL's make would come with additional problems such as
triggering automake because of not preserved file time stamps.
Re-running automake might not be successful on other system
configurations for instance because it was preconfigured without
--with-clang option.
llvm-svn: 247142
Ed Maste [Wed, 9 Sep 2015 13:10:33 +0000 (13:10 +0000)]
XFAIL TestFormatters on FreeBSD
The test is hitting an assertion in Clang. This is an extension of
r246766.
llvm.org/pr24691
llvm-svn: 247141
James Molloy [Wed, 9 Sep 2015 12:51:10 +0000 (12:51 +0000)]
Rename ExitCount to BackedgeTakenCount, because that's what it is.
We called a variable ExitCount, stored the backedge count in it, then redefined it to be the exit count again.
llvm-svn: 247140
James Molloy [Wed, 9 Sep 2015 12:51:06 +0000 (12:51 +0000)]
Delay predication of stores until near the end of vector code generation
Predicating stores requires creating extra blocks. It's much cleaner if we do this in one pass instead of mutating the CFG while writing vector instructions.
Besides which we can make use of helper functions to update domtree for us, reducing the work we need to do.
llvm-svn: 247139
Alexandros Lamprineas [Wed, 9 Sep 2015 11:29:06 +0000 (11:29 +0000)]
[ARM] "cortex-r5f" and "cortex-m4f" are unknown names for clang.
The tests in test/CodeGen/arm-target-features.c are currently
passing but warning messages are suppressed. These tests are now
synchronized with the corresponding changes in Target Parser.
This patch will fix the regressions in clang caused by r247136
Differential Revision: http://reviews.llvm.org/D12722
llvm-svn: 247138
Tamas Berghammer [Wed, 9 Sep 2015 11:28:52 +0000 (11:28 +0000)]
Fix type in include header name
llvm-svn: 247137
Alexandros Lamprineas [Wed, 9 Sep 2015 11:20:48 +0000 (11:20 +0000)]
LLVM does not distinguish Cortex-M4 from Cortex-M4F neither Cortex-R5 from R5F.
Removed "cortex-r5f" and "cortex-m4f" from Target Parser, sinced they are
unknown cpu names for llvm and clang. Also updated default FPUs for R5 and M4
accordingly.
Differential Revision: http://reviews.llvm.org/D12692
Change-Id: Ib81c7216521a361d8ee1296e4b6a2aa00bd479c5
llvm-svn: 247136
Tamas Berghammer [Wed, 9 Sep 2015 11:16:32 +0000 (11:16 +0000)]
Add missing include after rL247131
llvm-svn: 247135
Mohit K. Bhakkad [Wed, 9 Sep 2015 10:32:20 +0000 (10:32 +0000)]
[LLDB][MIPS] Added support for the debugging of N32/O32 applications on MIPS64 target.
Patch by Nitesh Jain
Reviewers: clayborg, ovyalov.
Subscribers: jaydeep, bhushan, mohit.bhakkad, sagar, nitesh.jain, lldb-commits.
Differential Revision: http://reviews.llvm.org/D12671
llvm-svn: 247134
Tamas Berghammer [Wed, 9 Sep 2015 10:26:50 +0000 (10:26 +0000)]
Change the looping stack detection code
In some special case (e.g. signal handlers, hand written assembly) it is
valid to have 2 stack frame with the same CFA value. This CL change the
looping stack detection code to report a loop only if at least 3
consecutive frames have the same CFA.
Differential revision: http://reviews.llvm.org/D12699
llvm-svn: 247133
Tamas Berghammer [Wed, 9 Sep 2015 10:20:48 +0000 (10:20 +0000)]
Add basic fission support to SymbolFileDWARF
* Create new dwo symbol file class
* Add handling for .dwo sections
* Change indexes in SymbolFileDWARF to store compile unit offset next to
DIE offset
* Propagate queries from dwarf compile unit to the dwo compile unit
where applicable
Differential revision: http://reviews.llvm.org/D12291
llvm-svn: 247132
Tamas Berghammer [Wed, 9 Sep 2015 10:20:36 +0000 (10:20 +0000)]
Code cleanup in preparation of adding split dwarf support
* Remove some unused code
* Remove usage of DWARFDebugInfoEntry::Attributes where usage isn't
reasonable
* Cleanup DWARFMappedHash with separating it to header and implementation
file and fixing the visibility of the functions
Differential revision: http://reviews.llvm.org/D12374
llvm-svn: 247131
Tamas Berghammer [Wed, 9 Sep 2015 10:20:30 +0000 (10:20 +0000)]
Remove the dwo files in the cleanup stage of the tests
The dwo files are generated when the tests run with split dwarf info.
llvm-svn: 247130
Mohit K. Bhakkad [Wed, 9 Sep 2015 10:17:58 +0000 (10:17 +0000)]
[LLDB][MIPS] MIPS load/store instruction emulation for hardware watchpoints
Reviewers: clayborg.
Subscribers: jaydeep, bhushan, sagar, nitesh.jain, lldb-commits.
Differential Revision: http://reviews.llvm.org/D12670
llvm-svn: 247129
Daniel Sanders [Wed, 9 Sep 2015 09:53:20 +0000 (09:53 +0000)]
Fix vector splitting for extract_vector_elt and vector elements of <8-bits.
Summary:
One of the vector splitting paths for extract_vector_elt tries to lower:
define i1 @via_stack_bug(i8 signext %idx) {
%1 = extractelement <2 x i1> <i1 false, i1 true>, i8 %idx
ret i1 %1
}
to:
define i1 @via_stack_bug(i8 signext %idx) {
%base = alloca <2 x i1>
store <2 x i1> <i1 false, i1 true>, <2 x i1>* %base
%2 = getelementptr <2 x i1>, <2 x i1>* %base, i32 %idx
%3 = load i1, i1* %2
ret i1 %3
}
However, the elements of <2 x i1> are not byte-addressible. The result of this
is that the getelementptr expands to '%base + %idx * (1 / 8)' which simplifies
to '%base + %idx * 0', and then simply '%base' causing all values of %idx to
extract element zero.
This commit fixes this by promoting the vector elements of <8-bits to i8 before
splitting the vector.
This fixes a number of test failures in pocl.
Reviewers: pekka.jaaskelainen
Subscribers: pekka.jaaskelainen, llvm-commits
Differential Revision: http://reviews.llvm.org/D12591
llvm-svn: 247128
Chandler Carruth [Wed, 9 Sep 2015 09:46:16 +0000 (09:46 +0000)]
Fix a typo I spotted when hacking on SROA. Somewhat alarming that
nothing broke.
llvm-svn: 247127
Tobias Grosser [Wed, 9 Sep 2015 09:24:38 +0000 (09:24 +0000)]
IslNodeBuilder: Add virtual function to obtain the schedule of an ast node
Not all users of our IslNodeBuilder will attach scheduling information to the
AST in the same way IslAstInfo is doing it today. By going through a virtual
function when extracting the schedule of an AST node other users can provide
their own functions for extract scheduling information in case they attach
scheduling information in a different way to the AST nodes.
No functional change for Polly itself intended.
llvm-svn: 247126
Zoran Jovanovic [Wed, 9 Sep 2015 09:10:46 +0000 (09:10 +0000)]
[mips][microMIPS] Implement CACHEE and PREFE instructions
Differential Revision: http://reviews.llvm.org/D11628
llvm-svn: 247125
Hafiz Abid Qadeer [Wed, 9 Sep 2015 09:06:05 +0000 (09:06 +0000)]
Remove an invalid check in DW_OP_piece processing.
Summary:
When lldb is processing a location containing DW_OP_piece, the result is being
stored in the 'pieces' variable. The location is popped from the 'stack' variable.
So this check to see that 'stack' is not empty was invalid and caused the pieces
after the first to not get processed.
I am working on an architecture which has 16-bit and 8-bit registers. So this
problem was quite easy to see. But I was able to re-produce this issue on x86
too with long long variable and compiling woth -m32. It resulted in following
location list.
00000014 08048496 080484b5 (DW_OP_reg6 (esi); DW_OP_piece: 4; DW_OP_reg7 (edi); DW_OP_piece: 4)
and lldb was only showing the contents of first register when I evaluated the
variable as it does not process the 2nd piece due to this check.
Reviewers: clayborg, aprantl
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D12674
llvm-svn: 247124
Matt Arsenault [Wed, 9 Sep 2015 08:39:49 +0000 (08:39 +0000)]
AMDGPU: Fix not encoding src2 of VOP3b instructions
Broken by r247074. Should include an assembler test,
but the assembler is currently broken for VOP3b apparently.
llvm-svn: 247123
Sanjoy Das [Wed, 9 Sep 2015 03:47:18 +0000 (03:47 +0000)]
[IRCE] Add INITIALIZE_PASS_DEPENDENCY invocations.
IRCE was just using INITIALIZE_PASS(), which is incorrect.
llvm-svn: 247122
Jason Molenda [Wed, 9 Sep 2015 03:36:24 +0000 (03:36 +0000)]
When lldb gets the register definitions from the response of a
qXfer:features:read:target.xml packet, or via the
plugin.process.gdb-remote.target-definition-file setting, if the
register definition doesn't give us eh_frame or DWARF register
numbers for that register, try to get that information from the ABI
plugin.
The DWARF/eh_frame register numbers are defined in the ABI
standardization documents - so getting this from the ABI plugin is
reasonable. There's little value in having the remote stub inform
us of this generic information, as long as we can all agree on the
names of the registers.
There's some additional information we could get from the ABI. For
instance, on ABIs where function arguments are passed in registers,
lldb defines alternate names like "arg1", "arg2", "arg3" for these
registers so they can be referred to that way by the user. We could
get this from the ABI if the remote stub doesn't provide that. That
may be something worth doing in the future - but for now, I'm keeping
this a little more minimal.
Thinking about this, what we want/need from the remote stub at a
minimum are:
1. The names of the register
2. The number that the stub will use to refer to the register with
the p/P packets and in the ? response packets (T/S) where
expedited register values are provided
3. The size of the register in bytes
(nice to have, to remove any doubt)
4. The offset of the register in the g/G packet if we're going to
use that for reading/writing registers.
debugserver traditionally provides a lot more information in
addition to this via the qRegisterInfo packet, and debugserver
augments its response to the qXfer:features:read:target.xml
query to include this information. Including:
DWARF regnum, eh_frame regnum, stabs regnum, encoding (ieee754,
Uint, Vector, Sint), format (hex, unsigned, pointer, vectorof*,
float), registers that should be marked as invalid if this
register is modified, and registers that contain this register.
We might want to get all of this from the ABI - I'm not convinced
that it makes sense for the remote stub to provide any of these
details, as long as the ABI and remote stub can agree on register
names.
Anyway, start with eh_frame and DWARF coming from the ABI if
they're not provided by the remote stub. We can look at doing
more in the future.
<rdar://problem/
22566585>
llvm-svn: 247121
Jason Molenda [Wed, 9 Sep 2015 03:24:52 +0000 (03:24 +0000)]
A change I'm open to reverting if there is disagreement:
When lldb receives a gdb-remote protocol packet that has
nonprintable characters, it will print the packet in
gdb-remote logging with binary-hex encoding so we don't
dump random 8-bit characters into the packet log.
I'm changing this check to allow whitespace characters
(newlines, linefeeds, tabs) to be printed if those are
the only non-printable characters in the packet.
This is primarily to get the response to the
qXfer:features:read:target.xml packet to show up in the
packet logs in human readable form. Right now we just
get a dozen kilobytes of hex-ascii and it's hard to
figure out what register number scheme is being used.
llvm-svn: 247120
Lang Hames [Wed, 9 Sep 2015 03:14:29 +0000 (03:14 +0000)]
[RuntimeDyld] Add support for MachO x86_64 SUBTRACTOR relocation.
llvm-svn: 247119
Dan Gohman [Wed, 9 Sep 2015 01:52:45 +0000 (01:52 +0000)]
[WebAssembly] Fix lowering of calls with more than one argument.
llvm-svn: 247118
Steven Wu [Wed, 9 Sep 2015 01:37:18 +0000 (01:37 +0000)]
Fix vld1_lane intrinsic generation
Fix a bug introduced in r246985 which causes assertion when generating
vld1_lane.
llvm-svn: 247117
Stephane Sezer [Wed, 9 Sep 2015 01:22:05 +0000 (01:22 +0000)]
Teach utilsOsType about NetBSD
Summary: NetBSD is a free, fast, secure, and highly portable Unix-like Open Source operating system.
Reviewers: joerg, sas
Subscribers: sas, emaste, lldb-commits
Differential Revision: http://reviews.llvm.org/D12615
Change by Kamil Rytarowski <n54@gmx.com>
llvm-svn: 247116
Stephane Sezer [Wed, 9 Sep 2015 01:19:05 +0000 (01:19 +0000)]
NetBSD doesn't provide struct statfs, make use of struct statvfs
Reviewers: joerg, sas
Subscribers: labath, lldb-commits
Differential Revision: http://reviews.llvm.org/D12661
Change by Kamil Rytarowski <n54@gmx.com>
llvm-svn: 247115
Stephane Sezer [Wed, 9 Sep 2015 01:17:24 +0000 (01:17 +0000)]
Prevent from a redefinition of _GLIBCXX_USE_NANOSLEEP
Summary: Build warning caught on NetBSD.
Reviewers: joerg, sas
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D12662
Change by Kamil Rytarowski <n54@gmx.com>
llvm-svn: 247114
Matt Arsenault [Wed, 9 Sep 2015 01:12:27 +0000 (01:12 +0000)]
SelectionDAG: Support Expand of f16 extloads
Currently this hits an assert that extload should
always be supported, which assumes integer extloads.
This moves a hack out of SI's argument lowering and
is covered by existing tests.
llvm-svn: 247113
Enrico Granata [Wed, 9 Sep 2015 01:10:46 +0000 (01:10 +0000)]
Data formatter candidate matches can be generated in a number of ways; language-based dynamic type discovery being one of them (for instance, this is what takes an 'id' and discovers that it truly is an __NSArrayI, so it should probably use the NSArray formatter)
This used to be hardcoded in the FormatManager, but in a pluginized world that is not the right way to go
So, move this step to the Language plugin such that appropriate language plugins for a type get a say about adding candidates to the formatters lookup tables
llvm-svn: 247112
Bruce Mitchener [Wed, 9 Sep 2015 00:56:25 +0000 (00:56 +0000)]
Fix log message warning in SBThread.
Summary:
The format string was not set up correctly as it was missing the %.
This resulted in a warning (correctly) that the data arguments were
not all used.
Reviewers: clayborg, jingham
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D12714
llvm-svn: 247111
Dan Gohman [Wed, 9 Sep 2015 00:52:47 +0000 (00:52 +0000)]
[WebAssembly] Implement WebAssemblyInstrInfo::copyPhysReg
llvm-svn: 247110