Dan Albert [Tue, 6 Jan 2015 17:34:51 +0000 (17:34 +0000)]
[libcxx] Set _LIBCPP_ELAST for mingw.
Reviewers: K-ballo, mclow.lists, EricWF
Reviewed By: EricWF
Subscribers: jfb, jroelofs, majnemer, cfe-commits
Differential Revision: http://reviews.llvm.org/D6558
llvm-svn: 225273
Adrian Prantl [Tue, 6 Jan 2015 17:14:10 +0000 (17:14 +0000)]
Reapply: Teach SROA how to update debug info for fragmented variables.
This also rolls in the changes discussed in http://reviews.llvm.org/D6766.
Defers migrating the debug info for new allocas until after all partitions
are created.
Thanks to Chandler for reviewing!
llvm-svn: 225272
Filipe Cabecinhas [Tue, 6 Jan 2015 17:08:26 +0000 (17:08 +0000)]
Don't loop endlessly for MachO files with 0 ncmds
llvm-svn: 225271
Colin LeMahieu [Tue, 6 Jan 2015 16:52:38 +0000 (16:52 +0000)]
[Hexagon] Fix 225267. GP register is not yet fully implemented. Removing Uses [GP] maintains existing behavior.
llvm-svn: 225270
Adrian Prantl [Tue, 6 Jan 2015 16:50:25 +0000 (16:50 +0000)]
Implement a very basic colored syntax highlighting for llvm-dwarfdump.
The color scheme is the same as the one used by the colorize dwarfdump
script on Darwin.
A new --color option can be used to forcibly turn color on or off.
http://reviews.llvm.org/D6852
llvm-svn: 225269
Hal Finkel [Tue, 6 Jan 2015 16:46:37 +0000 (16:46 +0000)]
[PowerPC] Add a regression test for r225251
In r225251, I removed an old entry from the README.txt file. While there are
several contributing factors (including pieces in Clang's ABI code), upon
further reflection, the backend part deserves a regression test.
llvm-svn: 225268
Colin LeMahieu [Tue, 6 Jan 2015 16:15:15 +0000 (16:15 +0000)]
[Hexagon] Adding dealloc_return encoding and absolute address stores.
llvm-svn: 225267
Asiri Rathnayake [Tue, 6 Jan 2015 15:55:09 +0000 (15:55 +0000)]
[ARM] Cleanup so_imm* tblgen defintions
No functional changes. Support for ARM's modified immediate syntax was added
in r223113 and r223115 (review: D6408). That patch introduced the mod_imm*
tblegen definitions which renders the existing so_imm* definitions redundant.
This patch gets rid of them completely.
Reviewed as: D6722
llvm-svn: 225266
Matt Arsenault [Tue, 6 Jan 2015 15:50:59 +0000 (15:50 +0000)]
Convert fcmp with 0.0 from casted integers to icmp
This is already handled in general when it is known the
conversion can't lose bits with smaller integer types
casted into wider floating point types.
This pattern happens somewhat often in GPU programs that cast
workitem intrinsics to float, which are often compared with 0.
Specifically handle the special case of compares with zero which
should also be known to not lose information. I had a more general
version of this which allows equality compares if the casted float is
exactly representable in the integer, but I'm not 100% confident that
is always correct.
Also fold cases that aren't integers to true / false.
llvm-svn: 225265
Tobias Grosser [Tue, 6 Jan 2015 12:57:44 +0000 (12:57 +0000)]
www: Draft changelog for the upcoming release.
llvm-svn: 225264
Tobias Grosser [Tue, 6 Jan 2015 12:31:31 +0000 (12:31 +0000)]
Fix html
llvm-svn: 225263
Tobias Grosser [Tue, 6 Jan 2015 12:30:26 +0000 (12:30 +0000)]
We currently do not create these result for polly
We should reconsider this after having switched to imath (instead of gmp)
as the default isl backend, as this would allow us to keep a copy of isl
in the polly svn and to consequently make it easier to distribute Polly.
llvm-svn: 225262
Jay Foad [Tue, 6 Jan 2015 10:01:15 +0000 (10:01 +0000)]
[asan] Bump the self-imposed stack limit from 128k to 256k. PowerPC64
Linux has 64k pages, so the old limit was only two pages. With ASLR the
initial sp might be right at the start of the second page, so the stack
will immediately grow down into the first page; and if you use all pages
of a limited stack then asan hits a kernel bug to do with how stack
guard pages are reported in /proc/self/maps:
http://lkml.iu.edu//hypermail/linux/kernel/1501.0/01025.html
We should still fix the underlying problems, but in the mean time this
patch makes the test work with 64k pages as well as it does with 4k
pages.
llvm-svn: 225261
NAKAMURA Takumi [Tue, 6 Jan 2015 09:44:44 +0000 (09:44 +0000)]
[CMake] Silence stderr on "COMMAND ${CMAKE_C_COMPILER} -Wl,--version". It was noisy during configuraion.
llvm-svn: 225260
NAKAMURA Takumi [Tue, 6 Jan 2015 09:44:29 +0000 (09:44 +0000)]
Reformat.
llvm-svn: 225259
Chandler Carruth [Tue, 6 Jan 2015 09:10:47 +0000 (09:10 +0000)]
[PM] Hide a function we only use in an assert behind NDEBUG.
llvm-svn: 225258
Chandler Carruth [Tue, 6 Jan 2015 09:06:35 +0000 (09:06 +0000)]
[PM] Introduce a utility pass that preserves no analyses.
Use this to test that path of invalidation. This test actually shows
redundant invalidation here that is really bad. I'm going to work on
fixing that next, but wanted to commit the test harness now that its all
working.
llvm-svn: 225257
Craig Topper [Tue, 6 Jan 2015 08:59:30 +0000 (08:59 +0000)]
[X86] Add OpSize32 to XBEGIN_4. Add XBEGIN_2 with OpSize16.
Requires new AsmParserOperand types that detect 16-bit and 32/64-bit mode so that we choose the right instruction based on default sizing without predicates. This is necessary since predicates mess up the disassembler table building.
llvm-svn: 225256
David Majnemer [Tue, 6 Jan 2015 08:41:31 +0000 (08:41 +0000)]
InstCombine: Bitcast call arguments from/to pointer/integer type
Try harder to get rid of bitcast'd calls by ptrtoint/inttoptr'ing
arguments and return values when DataLayout says it is safe to do so.
llvm-svn: 225254
Chandler Carruth [Tue, 6 Jan 2015 08:37:58 +0000 (08:37 +0000)]
[PM] Simplify how we parse the outer layer of the pass pipeline text and
remove an extra, redundant pass manager wrapping every run.
I had kept seeing these when manually testing, but it was getting really
annoying and was going to cause problems with overly eager invalidation.
The root cause was an overly complex and unnecessary pile of code for
parsing the outer layer of the pass pipeline. We can instead delegate
most of this to the recursive pipeline parsing.
I've added some somewhat more basic and precise tests to catch this.
llvm-svn: 225253
Craig Topper [Tue, 6 Jan 2015 07:35:50 +0000 (07:35 +0000)]
[X86] Make isel select the 2-byte register form of INC/DEC even in non-64-bit mode. Convert to the 1-byte form in non-64-bit mode as part of MCInst lowering.
Overall this seems simpler. It reduces duplication of patterns between both modes and it simplifies the memory folding/unfolding tables as they don't need to create fake instructions just to keep track of 64-bitness.
llvm-svn: 225252
Hal Finkel [Tue, 6 Jan 2015 07:23:13 +0000 (07:23 +0000)]
[PowerPC] Remove old README.txt entry regarding struct passing
Because of how Clang represents structs as arrays (at least on non-Darwin
platforms), and what SROA does, etc. this is no longer a problem.
llvm-svn: 225251
David Majnemer [Tue, 6 Jan 2015 07:12:52 +0000 (07:12 +0000)]
X86: Don't make illegal GOTTPOFF relocations
"ELF Handling for Thread-Local Storage" specifies that R_X86_64_GOTTPOFF
relocation target a movq or addq instruction.
Prohibit the truncation of such loads to movl or addl.
This fixes PR22083.
Differential Revision: http://reviews.llvm.org/D6839
llvm-svn: 225250
Hal Finkel [Tue, 6 Jan 2015 07:02:15 +0000 (07:02 +0000)]
[PowerPC] Add some missing names in getTargetNodeName
These are used for debugging output; NFC.
llvm-svn: 225249
Hal Finkel [Tue, 6 Jan 2015 06:01:57 +0000 (06:01 +0000)]
[PowerPC] Improve int_to_fp(fp_to_int(x)) combining
The old target DAG combine that allowed for performing int_to_fp(fp_to_int(x))
without a load/store pair is updated here with support for unsigned integers,
and to support single-precision values without a third rounding step, on newer
cores with the appropriate instructions.
llvm-svn: 225248
Saleem Abdulrasool [Tue, 6 Jan 2015 05:55:56 +0000 (05:55 +0000)]
Basic: fix compilation with MSVC
MSVC doesn't like the instantiation of the structure in the initializer list.
Initialize it in the constructor body to repair the build.
TargetInfo.h(545) : error C2143: syntax error : missing ')' before '{'
TargetInfo.h(545) : error C2143: syntax error : missing ';' before '}'
TargetInfo.h(545) : error C2059: syntax error : ')'
TargetInfo.h(545) : error C2059: syntax error : ','
TargetInfo.h(547) : error C2143: syntax error : missing ';' before '{'
TargetInfo.h(547) : error C2447: '{' : missing function header (old-style formal list?)
llvm-svn: 225247
Chandler Carruth [Tue, 6 Jan 2015 04:49:44 +0000 (04:49 +0000)]
[PM] Add a utility pass template that synthesizes the invalidation of
a specific analysis result.
This is quite handy to test things, and will also likely be very useful
for debugging issues. You could narrow down pass validation failures by
walking these invalidate pass runs up and down the pass pipeline, etc.
I've added support to the pass pipeline parsing to be able to create one
of these for any analysis pass desired.
Just adding this class uncovered one latent bug where the
AnalysisManager CRTP base class had a hard-coded Module type rather than
using IRUnitT.
I've also added tests for invalidation and caching of analyses in
a basic way across all the pass managers. These in turn uncovered two
more bugs where we failed to correctly invalidate an analysis -- its
results were invalidated but the key for re-running the pass was never
cleared and so it was never re-run. Quite nasty. I'm very glad to debug
this here rather than with a full system.
Also, yes, the naming here is horrid. I'm going to update some of the
names to be slightly less awful shortly. But really, I've no "good"
ideas for naming. I'll be satisfied if I can get it to "not bad".
llvm-svn: 225246
Chandler Carruth [Tue, 6 Jan 2015 04:49:38 +0000 (04:49 +0000)]
[PM] Simplify how we use the registry by including it only once. Still
more verbose than I'd like, but the code really isn't that interesting,
and this still seems vastly simpler than any other solutions I've come
up with. =] Maybe if we get to the 10th IR unit, this will be a problem
in practice.
llvm-svn: 225245
Saleem Abdulrasool [Tue, 6 Jan 2015 04:26:34 +0000 (04:26 +0000)]
Sema: analyze I,J,K,M,N,O constraints
Add additional constraint checking for target specific behaviour for inline
assembly constraints. We would previously silently let all arguments through
for these constraints. In cases where the constraints were violated, we could
end up failing to select instructions and triggering assertions or worse,
silently ignoring instructions.
llvm-svn: 225244
Craig Topper [Tue, 6 Jan 2015 04:23:57 +0000 (04:23 +0000)]
[X86] Remove 16-bit and 32-bit offset jump instructions from the AsmParser. We always select the 8-bit size and let the assembler backend relax to the larger size.
llvm-svn: 225243
Craig Topper [Tue, 6 Jan 2015 04:23:53 +0000 (04:23 +0000)]
[X86] Make isel select the shorter form of jump instructions instead of the long form.
The assembler backend will relax to the long form if necessary. This removes a swap from long form to short form in the MCInstLowering code. Selecting the long form used to be required by the old JIT.
llvm-svn: 225242
Brad Smith [Tue, 6 Jan 2015 02:53:17 +0000 (02:53 +0000)]
Set the default ISA for OpenBSD/mips64 to MIPS III.
llvm-svn: 225241
Chandler Carruth [Tue, 6 Jan 2015 02:50:06 +0000 (02:50 +0000)]
[PM] Add a collection of no-op analysis passes and switch the new pass
manager tests to use them and be significantly more comprehensive.
This, naturally, uncovered a bug where the CGSCC pass manager wasn't
printing analyses when they were run.
The only remaining core manipulator is I think an invalidate pass
similar to the require pass. That'll be next. =]
llvm-svn: 225240
Alexey Samsonov [Tue, 6 Jan 2015 02:44:05 +0000 (02:44 +0000)]
[Sanitizer] Use COMMON_FLAG macro to describe common runtime flags.
Summary:
Introduce a single place where we specify flag type, name, default
value, and description. This removes a large amount of boilerplate
and ensures we won't leave flags uninitialized.
Test Plan: regression test suite
Reviewers: kcc
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D6851
llvm-svn: 225239
Chandler Carruth [Tue, 6 Jan 2015 02:37:55 +0000 (02:37 +0000)]
[PM] Sink the no-op pass parsing logic into the .def-based registry to
simplify things. This will become more important as I add no-op analyses
that want to re-use the logic we already have for analyses in the
registry. For now, no functionality changed.
llvm-svn: 225238
Chandler Carruth [Tue, 6 Jan 2015 02:21:37 +0000 (02:21 +0000)]
[PM] Move the analysis registry into the Passes.cpp file and provide
a normal interface for it in Passes.h.
This gives us essentially a single interface for running pass managers
which are provided from the bottom of the LLVM stack through interfaces
at the top of the LLVM stack that populate them with all of the
different analyses available throughout. It also means there is a single
blob of code that needs to include all of the pass headers and needs to
deal with the registry of passes and parsing names.
No functionality changed intended, should just be cleanup.
llvm-svn: 225237
Chandler Carruth [Tue, 6 Jan 2015 02:10:51 +0000 (02:10 +0000)]
[PM] Add a utility to the new pass manager for generating a pass which
is a no-op other than requiring some analysis results be available.
This can be used in real pass pipelines to force the usually lazy
analysis running to eagerly compute something at a specific point, and
it can be used to test the pass manager infrastructure (my primary use
at the moment).
I've also added bit of pipeline parsing magic to support generating
these directly from the opt command so that you can directly use these
when debugging your analysis. The syntax is:
require<analysis-name>
This can be used at any level of the pass manager. For example:
cgscc(function(require<my-analysis>,no-op-function))
This would produce a no-op function pass requiring my-analysis, followed
by a fully no-op function pass, both of these in a function pass manager
which is nested inside of a bottom-up CGSCC pass manager which is in the
top-level (implicit) module pass manager.
I have zero attachment to the particular syntax I'm using here. Consider
it a straw man for use while I'm testing and fleshing things out.
Suggestions for better syntax welcome, and I'll update everything based
on any consensus that develops.
I've used this new functionality to more directly test the analysis
printing rather than relying on the cgscc pass manager running an
analysis for me. This is still minimally tested because I need to have
analyses to run first! ;] That patch is next, but wanted to keep this
one separate for easier review and discussion.
llvm-svn: 225236
Rafael Espindola [Tue, 6 Jan 2015 01:41:24 +0000 (01:41 +0000)]
Add a testcase that would have found the problem in r225048.
llvm-svn: 225235
Kostya Serebryany [Tue, 6 Jan 2015 01:31:23 +0000 (01:31 +0000)]
[ubsan] partially enable -fsanitize-coverage=N with ubsan. It will work as usual in most cases but will not dump coverage on error with -fno-sanitize-recover (that'll be a separate fix)
llvm-svn: 225234
Eric Christopher [Tue, 6 Jan 2015 01:12:42 +0000 (01:12 +0000)]
Remove dead variable.
llvm-svn: 225233
Eric Christopher [Tue, 6 Jan 2015 01:12:40 +0000 (01:12 +0000)]
Use the same call off of the TargetMachine rather than the subtarget.
llvm-svn: 225232
Eric Christopher [Tue, 6 Jan 2015 01:12:30 +0000 (01:12 +0000)]
Rewrite the Mips16HardFloat pass to avoid using the Subtarget.
llvm-svn: 225231
Kostya Serebryany [Tue, 6 Jan 2015 01:11:23 +0000 (01:11 +0000)]
[asan/tracing] write the trace using a sequence of internal_write calls instead of just one (otherwise files of > 2Gb are trunkated). Also a minor adjustment to the trace collection.
llvm-svn: 225230
Kostya Serebryany [Tue, 6 Jan 2015 01:02:48 +0000 (01:02 +0000)]
Allow -fsanitize-coverage=N with ubsan, clang part
Summary:
Allow -fsanitize-coverage=N with ubsan, clang part.
This simply allows the flag combination.
The LLVM will work out of the box, the compile-rt part
will follow as a separate patch.
Test Plan: check-clang
Reviewers: samsonov
Reviewed By: samsonov
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D6849
llvm-svn: 225229
Lang Hames [Tue, 6 Jan 2015 00:54:32 +0000 (00:54 +0000)]
Revert r225048: It broke ObjC on AArch64.
I've filed http://llvm.org/PR22100 to track this issue.
llvm-svn: 225228
Brad Smith [Tue, 6 Jan 2015 00:53:52 +0000 (00:53 +0000)]
Remove X86 .quad workaround for buggy GNU assembler on OpenBSD / Bitrig.
llvm-svn: 225227
Nick Kledzik [Tue, 6 Jan 2015 00:27:21 +0000 (00:27 +0000)]
Add 64-bit multiply functions to iOS arm64 compiler-rt dylib
llvm-svn: 225226
Greg Clayton [Tue, 6 Jan 2015 00:25:18 +0000 (00:25 +0000)]
More fixes to ensure if we are asked to launch a x86_64h process on darwin, that darwin-debug knows what to do and how to handle it.
llvm-svn: 225225
Greg Clayton [Tue, 6 Jan 2015 00:21:29 +0000 (00:21 +0000)]
Fix being able to get a thread result when calling HostThreadPosix::Join(). It was broken when initially checked in by getting the thread result into a temporary variable and never doing anything with it. Most threads in LLDB don't look at their thread results, but launching processes in a terminal window on MacOSX does require getting a thread result and this broke "process launch --tty" on darwin.
<rdar://problem/
19308966>
llvm-svn: 225224
Duncan P. N. Exon Smith [Mon, 5 Jan 2015 23:31:54 +0000 (23:31 +0000)]
IR: Don't drop MDNode uniquing on null operands
Now that `LLVMContextImpl` can call `MDNode::dropAllReferences()` to
prevent teardown madness, stop dropping uniquing just because an operand
drops to null.
Part of PR21532.
llvm-svn: 225223
Duncan P. N. Exon Smith [Mon, 5 Jan 2015 23:31:51 +0000 (23:31 +0000)]
Revert "Use the integrated assembler by default on 32-bit PowerPC and SPARC"
This reverts commit r225213. It's failing on multiple buildbots [1][2].
[1]: http://lab.llvm.org:8011/builders/clang-x86_64-debian-fast/builds/22032
[2]: http://lab.llvm.org:8080/green/view/Clang/job/clang-stage1-cmake-RA-incremental_check/2357/
llvm-svn: 225222
Duncan P. N. Exon Smith [Mon, 5 Jan 2015 23:31:42 +0000 (23:31 +0000)]
Revert "Use the integrated assembler by default on 32-bit PowerPC and SPARC"
This reverts commit r225212. It's failing on multiple buildbots [1][2].
[1]: http://lab.llvm.org:8011/builders/clang-x86_64-debian-fast/builds/22032
[2]: http://lab.llvm.org:8080/green/view/Clang/job/clang-stage1-cmake-RA-incremental_check/2357/
llvm-svn: 225221
Hal Finkel [Mon, 5 Jan 2015 23:17:43 +0000 (23:17 +0000)]
[PowerPC] Fix test to pass on Darwin hosts
llvm-svn: 225220
Siva Chandra [Mon, 5 Jan 2015 23:06:14 +0000 (23:06 +0000)]
Make array symbol reading resilient to incomplete DWARF.
Summary:
GCC emits DW_TAG_subrange_type for static member arrays, but with no
attributes. This in turn results in wrong type/value of the array when
printing with 'target variable <array var name>'. This patch fixes this
so that the array value is printed in this format:
(<element type> []) <array var name> = {}
Earlier, the array was being interpreted to be of its element type.
Note: This does not fix anything to do with 'expr' or 'p' commands.
Those commands still error out complaining about incomplete types.
Test Plan: dotest.py -p TestStaticVariables
Reviewers: emaste, clayborg
Reviewed By: clayborg
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D6799
llvm-svn: 225219
Zachary Turner [Mon, 5 Jan 2015 22:29:19 +0000 (22:29 +0000)]
When building on Windows, copy Python27(_d).dll to the output folder.
When Python does not exist on the system path, LLDB will be unable
to load it. Fix this by copying the dll to the output folder so
it will be side-by-side with lldb.exe.
llvm-svn: 225218
Hal Finkel [Mon, 5 Jan 2015 22:20:22 +0000 (22:20 +0000)]
[PowerPC] Remove old README.txt entry
We no longer generate horrible code for the stated function:
void f(signed char *a, _Bool b, _Bool c) {
signed char t = 0;
if (b) t = *a;
if (c) *a = t;
}
for which we now generate:
.L.f:
andi. 5, 5, 1
cmpldi 1, 4, 0
li 5, 0
beq 1, .LBB0_2
lbz 5, 0(3)
.LBB0_2: # %if.end
bclr 4, 1, 0
stb 5, 0(3)
blr
so we don't need the README.txt entry.
llvm-svn: 225217
Simon Pilgrim [Mon, 5 Jan 2015 22:08:48 +0000 (22:08 +0000)]
[X86][SSE] lowerVectorShuffleAsByteShift tidyup
Removed local isSequential predicate and use standard helper isSequentialOrUndefInRange instead.
llvm-svn: 225216
Saleem Abdulrasool [Mon, 5 Jan 2015 21:54:50 +0000 (21:54 +0000)]
tests: correct builtins test if built under -mthumb on ARM
The clear_cache and enable_execute_stack tests attempt to memcpy the definition
of a function into a buffer before executing the function. The problem with
this approach is that on some targets (ARM with thumb mode compilation, MIPS
with MIPS16 codegen or uMIPS), you would use a pointer which is incorrect (it
would be off-by-one) due to the ISA selection being encoded into the address.
This ensures that the function address is retrieved correctly in all cases.
llvm-svn: 225215
Hal Finkel [Mon, 5 Jan 2015 21:53:52 +0000 (21:53 +0000)]
[PowerPC] Convert a README.txt entry into a better test
We now produce the desired code as noted in the README.txt file (no spurious
or). Remove the README entry and improve the regression test.
llvm-svn: 225214
Brad Smith [Mon, 5 Jan 2015 21:48:16 +0000 (21:48 +0000)]
Use the integrated assembler by default on 32-bit PowerPC and SPARC
llvm-svn: 225213
Brad Smith [Mon, 5 Jan 2015 21:44:15 +0000 (21:44 +0000)]
Use the integrated assembler by default on 32-bit PowerPC and SPARC
llvm-svn: 225212
Hal Finkel [Mon, 5 Jan 2015 21:41:26 +0000 (21:41 +0000)]
[PowerPC] Remove README.txt entry
This entry has been rendered irrelevant now that we have proper CR bit
tracking.
llvm-svn: 225211
Colin LeMahieu [Mon, 5 Jan 2015 21:36:38 +0000 (21:36 +0000)]
[Hexagon] Adding add/sub with carry, logical shift left by immediate and memop instructions. Removing old defs without bits and updating references.
llvm-svn: 225210
Hal Finkel [Mon, 5 Jan 2015 21:33:14 +0000 (21:33 +0000)]
[PowerPC] Add a test for truncating a shifted load
We now produce the desired code as noted in the README.txt file. Remove the
README entry and add a regression test.
llvm-svn: 225209
Frederic Riss [Mon, 5 Jan 2015 21:29:41 +0000 (21:29 +0000)]
Make DIE.h a public CodeGen header.
dsymutil would like to use all the AsmPrinter/MCStreamer infrastructure
to stream out the DWARF. In order to do so, it will reuse the DIE object
and so this header needs to be public.
The interface exposed here has some corners that cannot be used without a
DwarfDebug object, but clients that want to stream Dwarf can just avoid
these.
Differential Revision: http://reviews.llvm.org/D6695
llvm-svn: 225208
Frederic Riss [Mon, 5 Jan 2015 21:29:28 +0000 (21:29 +0000)]
[dsymutil] Implement the BinaryHolder object and gain archive support.
This object is meant to own the ObjectFiles and their underlying
MemoryBuffer. It is basically the equivalent of an OwningBinary
except that it efficiently handles Archives. It is optimized for
efficiently providing mappings of members of the same archive when
they are opened successively (which is standard in Darwin debug
maps, objects from the same archive will be contiguous).
Of course, the BinaryHolder will also be used by the DWARF linker
once it is commited, but for now only the debug map parser uses it.
With this change, you can run llvm-dsymutil on your Darwin debug build
of clang and get a complete debug map for it.
Differential Revision: http://reviews.llvm.org/D6690
llvm-svn: 225207
NAKAMURA Takumi [Mon, 5 Jan 2015 21:24:36 +0000 (21:24 +0000)]
[autoconf] llvm/cmake/modules/Makefile: Make sure to regenerate LLVMConfig.cmake whenever Makefile is updated.
llvm-svn: 225206
Hal Finkel [Mon, 5 Jan 2015 21:22:42 +0000 (21:22 +0000)]
[PowerPC] Add another test for load/store with update
We now produce the desired code as noted in the README.txt file. Remove the
README entry and add a regression test.
llvm-svn: 225205
NAKAMURA Takumi [Mon, 5 Jan 2015 21:14:14 +0000 (21:14 +0000)]
[autoconf] Export LLVM_LIBDIR_SUFFIX with empty string in LLVMConfig.cmake. tools/llvm-config is also doing so.
llvm-svn: 225204
Hal Finkel [Mon, 5 Jan 2015 21:10:24 +0000 (21:10 +0000)]
[PowerPC] Fold i1 extensions with other ops
Consider this function from our README.txt file:
int foo(int a, int b) { return (a < b) << 4; }
We now explicitly track CR bits by default, so the comment in the README.txt
about not really having a SETCC is no longer accurate, but we did generate this
somewhat silly code:
cmpw 0, 3, 4
li 3, 0
li 12, 1
isel 3, 12, 3, 0
sldi 3, 3, 4
blr
which generates the zext as a select between 0 and 1, and then shifts the
result by a constant amount. Here we preprocess the DAG in order to fold the
results of operations on an extension of an i1 value into the SELECT_I[48]
pseudo instruction when the resulting constant can be materialized using one
instruction (just like the 0 and 1). This was not implemented as a DAGCombine
because the resulting code would have been anti-canonical and depends on
replacing chained user nodes, which does not fit well into the lowering
paradigm. Now we generate:
cmpw 0, 3, 4
li 3, 0
li 12, 16
isel 3, 12, 3, 0
blr
which is less silly.
llvm-svn: 225203
Simon Pilgrim [Mon, 5 Jan 2015 21:09:48 +0000 (21:09 +0000)]
[X86][SSE] Fixed description for isSequentialOrUndefInRange. NFC.
llvm-svn: 225202
Colin LeMahieu [Mon, 5 Jan 2015 20:56:41 +0000 (20:56 +0000)]
[Hexagon] Adding rounding reg/reg variants, accumulating multiplies, and accumulating shifts.
llvm-svn: 225201
Duncan P. N. Exon Smith [Mon, 5 Jan 2015 20:41:25 +0000 (20:41 +0000)]
IR: Prune arguments to ValueAsMetadata::ValueAsMetadata()
`LLVMContext` isn't actually used.
llvm-svn: 225200
Colin LeMahieu [Mon, 5 Jan 2015 20:35:54 +0000 (20:35 +0000)]
[Hexagon] Adding V4 bit manipulating instructions, removing ALU defs without encoding bits.
llvm-svn: 225199
Colin LeMahieu [Mon, 5 Jan 2015 20:14:58 +0000 (20:14 +0000)]
[Hexagon] Adding V4 logic-logic instructions and tests.
llvm-svn: 225198
Colin LeMahieu [Mon, 5 Jan 2015 20:04:40 +0000 (20:04 +0000)]
[Hexagon] Adding orand, bitsplit reg/reg, and modwrap instructions.
llvm-svn: 225197
Francisco Lopes da Silva [Mon, 5 Jan 2015 19:59:24 +0000 (19:59 +0000)]
Fix lit for builds under /opt
llvm-svn: 225196
Zachary Turner [Mon, 5 Jan 2015 19:37:03 +0000 (19:37 +0000)]
Fix about 20 tests on Windows.
Passing the argument string from dosep to dotest was failing on
Windows due to the fact that Windows uses \ for its path separator.
As a result, shlex.split() was treating it as an escape character.
This fixes the issue by telling shlex.split() to not use posix mode
when running on Windows.
llvm-svn: 225195
Dan Albert [Mon, 5 Jan 2015 19:31:59 +0000 (19:31 +0000)]
Fix some formatting I messed up in r225187.
llvm-svn: 225194
Greg Clayton [Mon, 5 Jan 2015 19:23:33 +0000 (19:23 +0000)]
Make sure x7 and x8 are treated as argument registers for arm64.
llvm-svn: 225193
Hal Finkel [Mon, 5 Jan 2015 18:52:29 +0000 (18:52 +0000)]
[PowerPC] Remove zexts after i32 ctlz
The 64-bit semantics of cntlzw are not special, the 32-bit population count is
stored as a 64-bit value in the range [0,32]. As a result, it is always zero
extended, and it can be added to the PPCISelDAGToDAG peephole optimization as a
frontier instruction for the removal of unnecessary zero extensions.
llvm-svn: 225192
Rafael Espindola [Mon, 5 Jan 2015 18:48:18 +0000 (18:48 +0000)]
Make this test a bit stricter.
The first function is named __cxx_global_var_init, which is a substring of
the following functions @__cxx_global_var_init(1,2,3,etc).
llvm-svn: 225191
Rafael Espindola [Mon, 5 Jan 2015 18:19:35 +0000 (18:19 +0000)]
Disable warnings in this test.
This makes it a lot easier to read the output from FileCheck when it fails.
llvm-svn: 225190
Hal Finkel [Mon, 5 Jan 2015 18:09:06 +0000 (18:09 +0000)]
[PowerPC] Remove zexts after byte-swapping loads
lhbrx and lwbrx not only load their data with byte swapping, but also clear the
upper 32 bits (at least). As a result, they can be added to the PPCISelDAGToDAG
peephole optimization as frontier instructions for the removal of unnecessary
zero extensions.
llvm-svn: 225189
Colin LeMahieu [Mon, 5 Jan 2015 18:08:21 +0000 (18:08 +0000)]
[Hexagon] Adding round reg/imm and bitsplit instructions.
llvm-svn: 225188
Dan Albert [Mon, 5 Jan 2015 18:07:36 +0000 (18:07 +0000)]
Make the Unwinder -Werror clean.
Mostly just format string fixes.
Tested clean on arm, x86, and x86_64 Linux.
llvm-svn: 225187
Saleem Abdulrasool [Mon, 5 Jan 2015 17:56:32 +0000 (17:56 +0000)]
SymbolRewriter: use iplist::splice
The swap implementation for iplist is currently unsupported. Simply splice the
old list into place, which achieves the same purpose. This is needed in order
to thread the -frewrite-map-file frontend option correctly. NFC.
llvm-svn: 225186
Saleem Abdulrasool [Mon, 5 Jan 2015 17:56:29 +0000 (17:56 +0000)]
SymbolRewriter: 80-column
Wrap a couple of lines. NFC.
llvm-svn: 225185
Vince Harron [Mon, 5 Jan 2015 17:49:23 +0000 (17:49 +0000)]
fix cross compilation to 32 bit arm targets
llvm-svn: 225184
Ahmed Bougacha [Mon, 5 Jan 2015 17:10:26 +0000 (17:10 +0000)]
[AArch64] Improve codegen of store lane instructions by avoiding GPR usage.
We used to generate code similar to:
umov.b w8, v0[2]
strb w8, [x0, x1]
because the STR*ro* patterns were preferred to ST1*.
Instead, we can avoid going through GPRs, and generate:
add x8, x0, x1
st1.b { v0 }[2], [x8]
This patch increases the ST1* AddedComplexity to achieve that.
rdar://
16372710
Differential Revision: http://reviews.llvm.org/D6202
llvm-svn: 225183
Samuel Antao [Mon, 5 Jan 2015 17:07:42 +0000 (17:07 +0000)]
Fix clash of gcc toolchains in driver regression tests.
For some regression tests the path to the right toolchain is specified using the -sysroot switch. However, if clang was configured with a custom gcc toolchain (either by using GCC_INSTALL_PREFIX in cmake or the equivalent configure command), the path to the custom gcc toolchain path takes precedence to the one specified by sysroot. This causes several regression tests to fail as they will be using an unexpected path. This patch fixes this issue by adding --gcc-toolchain='' to all tests that rely on that. The empty string causes the driver to pick the path from sysroot instead.
llvm-svn: 225182
Ahmed Bougacha [Mon, 5 Jan 2015 17:02:28 +0000 (17:02 +0000)]
[AArch64] Improve codegen of store lane 0 instructions by directly storing the subregister.
For 0-lane stores, we used to generate code similar to:
fmov w8, s0
str w8, [x0, x1, lsl #2]
instead of:
str s0, [x0, x1, lsl #2]
To correct that: for store lane 0 patterns, directly match to STR <subreg>0.
Byte-sized instructions don't have the special case for a 0 index,
because FPR8s are defined to have untyped content.
rdar://
16372710
Differential Revision: http://reviews.llvm.org/D6772
llvm-svn: 225181
Samuel Benzaquen [Mon, 5 Jan 2015 15:26:42 +0000 (15:26 +0000)]
Fix dangling pointer in isDerivedFrom.
Summary:
Replace usage of StringRef with std::string in AST_MATCHER* generated
matchers to make sure they keep their own copy of the string.
The value could be a temporary and it causes the pointer to be dangling
by the time the matcher is executed.
Reviewers: klimek
Subscribers: klimek, cfe-commits
Differential Revision: http://reviews.llvm.org/D6843
llvm-svn: 225180
NAKAMURA Takumi [Mon, 5 Jan 2015 14:18:04 +0000 (14:18 +0000)]
llvm/test/lit.cfg: have_ld_plugin_support(): Use decode() for stdout.
llvm-svn: 225171
NAKAMURA Takumi [Mon, 5 Jan 2015 14:06:14 +0000 (14:06 +0000)]
clang/CMakeLists.txt: Introduce LLVM_SHLIB_OUTPUT_INTDIR also here, or plugins tests might fail.
llvm-svn: 225170
Karthik Bhat [Mon, 5 Jan 2015 13:57:59 +0000 (13:57 +0000)]
Select lower fsub,fabs pattern to fabd on AArch64
This patch lowers patterns such as-
fsub v0.4s, v0.4s, v1.4s
fabs v0.4s, v0.4s
to
fabd v0.4s, v0.4s, v1.4s
on AArch64.
Review: http://reviews.llvm.org/D6791
llvm-svn: 225169
Rafael Espindola [Mon, 5 Jan 2015 13:44:59 +0000 (13:44 +0000)]
Fix formatting. NFC.
llvm-svn: 225168
Charlie Turner [Mon, 5 Jan 2015 13:26:37 +0000 (13:26 +0000)]
Parse Tag_compatibility correctly.
Tag_compatibility takes two arguments, but before this patch it would
erroneously accept just one, it now produces an error in that case.
Change-Id: I530f918587620d0d5dfebf639944d6083871ef7d
llvm-svn: 225167
Charlie Turner [Mon, 5 Jan 2015 13:12:17 +0000 (13:12 +0000)]
Emit the build attribute Tag_conformance.
Claim conformance to version 2.09 of the ARM ABI.
This build attribute must be emitted first amongst the build attributes when
written to an object file. This is to simplify conformance detection by
consumers.
Change-Id: If9eddcfc416bc9ad6e5cc8cdcb05d0031af7657e
llvm-svn: 225166
Karthik Bhat [Mon, 5 Jan 2015 13:11:07 +0000 (13:11 +0000)]
Select lower sub,abs pattern to sabd on AArch64
This patch lowers patterns such as-
sub v0.4s, v0.4s, v1.4s
abs v0.4s, v0.4s
to
sabd v0.4s, v0.4s, v1.4s
on AArch64.
Review: http://reviews.llvm.org/D6781
llvm-svn: 225165