Peter Collingbourne [Wed, 22 Oct 2014 19:49:19 +0000 (19:49 +0000)]
Do not add -gsplit-dwarf to LLVM_DEFINITIONS.
This would cause the flag to appear in the output of "llvm-config --cppflags",
which should contain only preprocessor flags. The -gsplit-dwarf flag in
particular can cause problems with certain downstream users such as cgo.
Differential Revision: http://reviews.llvm.org/D5895
llvm-svn: 220410
David Blaikie [Wed, 22 Oct 2014 19:34:33 +0000 (19:34 +0000)]
DebugInfo: Omit scopes in -gmlt to reduce metadata size (on disk and in memory)
I haven't done any actual impact analysis of this change as it's a
strict improvement, but I'd be curious to know how much it helps.
llvm-svn: 220408
Alexey Samsonov [Wed, 22 Oct 2014 19:34:25 +0000 (19:34 +0000)]
Fixup for r220403: Use getFileLoc() instead of getSpellingLoc() in SanitizerBlacklist.
This also handles the case where function name (not its body)
is obtained from macro expansion.
llvm-svn: 220407
Shawn Best [Wed, 22 Oct 2014 19:29:00 +0000 (19:29 +0000)]
Sort unit test failures by name - submitted for Vince Harron reviews.llvm.org/D5904
llvm-svn: 220406
Benjamin Kramer [Wed, 22 Oct 2014 19:13:54 +0000 (19:13 +0000)]
LoopVectorize: Simplify code. No functionality change.
llvm-svn: 220405
Diego Novillo [Wed, 22 Oct 2014 18:39:50 +0000 (18:39 +0000)]
Shorten auto iterators for function basic blocks.
Use consistent naming for basic block instances.
No functional changes.
llvm-svn: 220404
Alexey Samsonov [Wed, 22 Oct 2014 18:26:07 +0000 (18:26 +0000)]
SanitizerBlacklist: Use spelling location for blacklisting purposes.
When SanitizerBlacklist decides if the SourceLocation is blacklisted,
we need to first turn it into a SpellingLoc before fetching the filename
and scanning "src:" entries. Otherwise we will fail to fecth the
correct filename for function definitions coming from macro expansion.
llvm-svn: 220403
Matt Arsenault [Wed, 22 Oct 2014 18:25:02 +0000 (18:25 +0000)]
Fix number of operands in documentation for minnum / maxnum
llvm-svn: 220402
Justin Bogner [Wed, 22 Oct 2014 18:18:54 +0000 (18:18 +0000)]
test: Make this test runnable in directories with @ in their names
Jenkins likes to use directories with names involving the '@'
character, which breaks the sed expression in this test. Switch to use
'|' on the assumption that it's less likely to show up in a path.
llvm-svn: 220401
Reid Kleckner [Wed, 22 Oct 2014 17:50:19 +0000 (17:50 +0000)]
Reland r219810 "Fix late template parsing leak with incremental processing"
Original message:
Add a second late template parser callback meant to cleanup any
resources allocated by late template parsing. Call it from the
Sema::ActOnEndOfTranslationUnit method after all pending template
instantiations have been completed. Teach Parser::ParseTopLevelDecl to
install the cleanup callback when incremental processing is enabled so
that Parser::TemplateIds can be freed.
Patch by Brad King!
llvm-svn: 220400
Hans Wennborg [Wed, 22 Oct 2014 17:47:49 +0000 (17:47 +0000)]
Fix VS2012 build; C++11 type aliases are not supported.
llvm-svn: 220399
Reid Kleckner [Wed, 22 Oct 2014 17:26:00 +0000 (17:26 +0000)]
MS ABI: Emit more canonical vbptr stores and loads
This eliminates some i8* GEPs and makes the IR that clang emits a bit
more canonical. More work is needed for vftables, but that isn't a clear
win so I plan to send it for review.
llvm-svn: 220398
Colin LeMahieu [Wed, 22 Oct 2014 17:23:01 +0000 (17:23 +0000)]
Ammending 220393 - Removing unused decoding tables.
llvm-svn: 220397
Colin LeMahieu [Wed, 22 Oct 2014 17:03:19 +0000 (17:03 +0000)]
Ammending 220393 - Removing unused functions.
llvm-svn: 220396
Bill Schmidt [Wed, 22 Oct 2014 16:58:20 +0000 (16:58 +0000)]
[PATCH] Support select-cc for VSFRC when VSX is enabled
A previous patch enabled SELECT_VSRC and SELECT_CC_VSRC for VSX to
handle <2 x double> cases. This patch adds SELECT_VSFRC and
SELECT_CC_VSFRC to allow use of all 64 vector-scalar registers for the
f64 type when VSX is enabled. The changes are analogous to those in
the previous patch. I've added a new variant to vsx.ll to test the
code generation.
(I also cleaned up a little formatting in PPCInstrVSX.td from the
previous patch.)
llvm-svn: 220395
Diego Novillo [Wed, 22 Oct 2014 16:51:50 +0000 (16:51 +0000)]
Use auto iteration in lib/Transforms/Scalar/SampleProfile.cpp. No functional changes.
llvm-svn: 220394
Colin LeMahieu [Wed, 22 Oct 2014 16:49:14 +0000 (16:49 +0000)]
[Hexagon] Adding basic disassembler.
Marking all instructions as CodeGenOnly since encoding bits are not set yet.
http://reviews.llvm.org/D5829?vs=on&id=15023&whitespace=ignore-all#toc
llvm-svn: 220393
Philip Reames [Wed, 22 Oct 2014 16:37:13 +0000 (16:37 +0000)]
Preserving 'nonnull' metadata in SimplifyCFG
When we hoist two loads above an if, we can preserve the nonnull metadata. We could also do the same for sinking them, but we appear to not handle metadata at all in that case.
Thanks to Hal for the review.
Differential Revision: http://reviews.llvm.org/D5910
llvm-svn: 220392
Sanjay Patel [Wed, 22 Oct 2014 15:29:23 +0000 (15:29 +0000)]
Shrinkify libcalls: use float versions of double libm functions with fast-math (bug 17850)
When a call to a double-precision libm function has fast-math semantics
(via function attribute for now because there is no IR-level FMF on calls),
we can avoid fpext/fptrunc operations and use the float version of the call
if the input and output are both float.
We already do this optimization using a command-line option; this patch just
adds the ability for fast-math to use the existing functionality.
I moved the cl::opt from InstructionCombining into SimplifyLibCalls because
it's only ever used internally to that class.
Modified the existing test cases to use the unsafe-fp-math attribute rather
than repeating all tests.
This patch should solve: http://llvm.org/bugs/show_bug.cgi?id=17850
Differential Revision: http://reviews.llvm.org/D5893
llvm-svn: 220390
Rafael Espindola [Wed, 22 Oct 2014 15:05:51 +0000 (15:05 +0000)]
Make two helper functions static.
llvm-svn: 220389
Jan Vesely [Wed, 22 Oct 2014 14:32:53 +0000 (14:32 +0000)]
r600: Fix get_work_dim range metadata
Reviewed-by: Matt Arsenault <Matthew.Arsenault@amd.com>
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
llvm-svn: 220388
Rafael Espindola [Wed, 22 Oct 2014 14:27:08 +0000 (14:27 +0000)]
Remove unused StmtVector& parameters from declaration parsing functions.
Patch by Eelis van der Weegen!
llvm-svn: 220387
Diego Novillo [Wed, 22 Oct 2014 13:36:35 +0000 (13:36 +0000)]
Change error to warning when a profile cannot be found.
When the profile for a function cannot be applied, we use to emit an
error. This seems extreme. The compiler can continue, it's just that the
optimization opportunities won't include profile information.
llvm-svn: 220386
Bill Schmidt [Wed, 22 Oct 2014 13:13:40 +0000 (13:13 +0000)]
[PowerPC] Support select-cc for VSX
The tests test/CodeGen/Generic/select-cc.ll and
test/CodeGen/PowerPC/select-cc.ll both fail with VSX enabled. The
problem is that the lowering logic for the SELECT and SELECT_CC
operations doesn't currently support the VSX registers. This patch
fixes that.
In lib/Target/PowerPC/PPCInstrInfo.td, we have pseudos to handle this
for other register classes. Similar pseudos are added in
PPCInstrVSX.td (they must be there, because the "vsrc" register class
definition appears there) for the VSRC register class. The
SELECT_VSRC pseudo is then used in pattern matching for SELECT_CC.
The rest of the patch just adds logic for SELECT_VSRC wherever similar
logic appears for SELECT_VRRC.
There are no new test cases because the existing tests above test
this, along with a variant in test/CodeGen/PowerPC/vsx.ll.
After discussion with Hal, a future patch will add similar _VSFRC
variants to override f64 type handling (currently using F8RC).
llvm-svn: 220385
Aaron Ballman [Wed, 22 Oct 2014 13:09:43 +0000 (13:09 +0000)]
Fixing a -Wsign-compare warning; NFC.
I think it might make sense to make COFF::MaxNumberOfSections16 be a uint32_t, however, that may have wider-reaching implications in other projects, which is why I did not change that declaration.
llvm-svn: 220384
Diego Novillo [Wed, 22 Oct 2014 13:00:05 +0000 (13:00 +0000)]
Support using sample profiles with partial debug info (driver)
Summary:
When using a profile, we used to require the use -gmlt so that we could
get access to the line locations. This is used to match line numbers in
the input profile to the line numbers in the function's IR.
But this is actually not necessary. The driver can provide source
location tracking without the emission of debug information. In these
cases, the annotation 'llvm.dbg.cu' is missing from the IR, but the
actual line location annotations are still present.
This patch tells the driver to only emit source location tracking
when -fprofile-sample-use is present in the command line.
Reviewers: echristo, dblaikie
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D5888
llvm-svn: 220383
Diego Novillo [Wed, 22 Oct 2014 12:59:00 +0000 (12:59 +0000)]
Support using sample profiles with partial debug info.
Summary:
When using a profile, we used to require the use -gmlt so that we could
get access to the line locations. This is used to match line numbers in
the input profile to the line numbers in the function's IR.
But this is actually not necessary. The driver can provide source
location tracking without the emission of debug information. In these
cases, the annotation 'llvm.dbg.cu' is missing from the IR, but the
actual line location annotations are still present.
This patch adds a new way of looking for the start of the current
function. Instead of looking through the compile units in llvm.dbg.cu,
we can walk up the scope for the first instruction in the function with
a debug loc. If that describes the function, we use it. Otherwise, we
keep looking until we find one.
If no such instruction is found, we then give up and produce an error.
Reviewers: echristo, dblaikie
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D5887
llvm-svn: 220382
Arnaud A. de Grandmaison [Wed, 22 Oct 2014 12:40:20 +0000 (12:40 +0000)]
[AArch64] Cleanup A57PBQPConstraints
And add a long awaited testcase.
llvm-svn: 220381
Bruno Cardoso Lopes [Wed, 22 Oct 2014 12:18:48 +0000 (12:18 +0000)]
[InstSimplify] Support constant folding to vector of pointers
ConstantFolding crashes when trying to InstSimplify the following load:
@a = private unnamed_addr constant %mst {
i8* inttoptr (i64 -1 to i8*),
i8* inttoptr (i64 -1 to i8*)
}, align 8
%x = load <2 x i8*>* bitcast (%mst* @a to <2 x i8*>*), align 8
This patch fix this by adding support to this type of folding:
%x = load <2 x i8*>* bitcast (%mst* @a to <2 x i8*>*), align 8
==> gets folded to:
%x = <2 x i8*> <i8* inttoptr (i64 -1 to i8*), i8* inttoptr (i64 -1 to i8*)>
llvm-svn: 220380
Jyoti Allur [Wed, 22 Oct 2014 10:41:14 +0000 (10:41 +0000)]
[Thumb/Thumb2] Implement restrictions on SP in register list on LDM, STM variants in thumb mode
llvm-svn: 220379
Peter Zotov [Wed, 22 Oct 2014 10:24:05 +0000 (10:24 +0000)]
[OCaml] Fix a typo in documentation.
llvm-svn: 220377
Daniel Jasper [Wed, 22 Oct 2014 09:50:23 +0000 (09:50 +0000)]
clang-format: Fix tests after recent change to ObjC block formatting.
llvm-svn: 220376
Daniel Jasper [Wed, 22 Oct 2014 09:12:44 +0000 (09:12 +0000)]
clang-format: Use AllowShortBlocksOnASingleLine for ObjC blocks, too.
llvm-svn: 220375
Daniel Jasper [Wed, 22 Oct 2014 09:01:12 +0000 (09:01 +0000)]
clang-format: Fix broken test.
llvm-svn: 220374
Daniel Jasper [Wed, 22 Oct 2014 08:42:58 +0000 (08:42 +0000)]
clang-format: Fix incorrect trailing return arrow detection.
Before:
auto doSomething(Aaaaaa* aaaaaa) -> decltype(aaaaaa -> f()) {}
After:
auto doSomething(Aaaaaa* aaaaaa) -> decltype(aaaaaa->f()) {}
llvm-svn: 220373
Matthew Gardiner [Wed, 22 Oct 2014 07:22:56 +0000 (07:22 +0000)]
Added functions to the C++ API, for the benefit of non-8-bit byte architectures.
New functions to give client applications to tools to discover target byte sizes
for addresses prior to ReadMemory. Also added GetPlatform and ReadMemory to the
SBTarget class, since they seemed to be useful utilities to have.
Each new API has had a test case added.
http://reviews.llvm.org/D5867
llvm-svn: 220372
Matt Arsenault [Wed, 22 Oct 2014 05:30:42 +0000 (05:30 +0000)]
R600/SI: Add another failing testcase for i1 copies
It's not handling phis.
llvm-svn: 220371
Richard Trieu [Wed, 22 Oct 2014 05:21:59 +0000 (05:21 +0000)]
Fix style issue from r220363. No functional change.
llvm-svn: 220370
Kostya Serebryany [Wed, 22 Oct 2014 05:02:20 +0000 (05:02 +0000)]
[tsan] add a stub of another dynamic annotation
llvm-svn: 220369
Matt Arsenault [Wed, 22 Oct 2014 04:26:10 +0000 (04:26 +0000)]
R600/SI: Add failing testcase reduced from OpenCV
This fails the verifier with:
"Expected a VCSrc_32 register, but got a VReg_1 register"
llvm-svn: 220368
Rafael Espindola [Wed, 22 Oct 2014 03:10:56 +0000 (03:10 +0000)]
Handle spaces and quotes in file names in MRI scripts.
llvm-svn: 220364
Richard Trieu [Wed, 22 Oct 2014 02:52:00 +0000 (02:52 +0000)]
Disable the uninitialized field warning in uninstantiated classes.
If a templated class is not instantiated, then the AST for it could be missing
some things that would throw the field checker off. Wait until specialization
before emitting these warnings.
llvm-svn: 220363
Saleem Abdulrasool [Wed, 22 Oct 2014 02:37:29 +0000 (02:37 +0000)]
Driver: rename Windows to MSVCToolChain
This renames the Windows toolchain to MSVCToolChain. This is a preparatory step
for adding a CrossWindowsToolChain which uses clang/libc++/(ld/lld) without the
standard GCC toolchain lookup. NFC.
llvm-svn: 220362
Rafael Espindola [Wed, 22 Oct 2014 02:23:31 +0000 (02:23 +0000)]
Fix a gcc warning.
Thanks to Filipe Cabecinhas for the report.
llvm-svn: 220361
Filipe Cabecinhas [Wed, 22 Oct 2014 02:16:06 +0000 (02:16 +0000)]
Silence gcc's -Wcomment
gcc's (4.7, I think) -Wcomment warning is not "as smart" as clang's and
warns even if the line right after the backslash-newline sequence only has
a line comment that starts at the beginning of the line.
llvm-svn: 220360
Richard Smith [Wed, 22 Oct 2014 02:05:46 +0000 (02:05 +0000)]
[modules] Initial support for explicitly loading .pcm files.
Implicit module builds are not well-suited to a lot of build systems. In
particular, they fare badly in distributed build systems, and they lead to
build artifacts that are not tracked as part of the usual dependency management
process. This change allows explicitly-built module files (which are already
supported through the -emit-module flag) to be explicitly loaded into a build,
allowing build systems to opt to manage module builds and dependencies
themselves.
This is only the first step in supporting such configurations, and it should
be considered experimental and subject to change or removal for now.
llvm-svn: 220359
Jim Ingham [Wed, 22 Oct 2014 01:54:17 +0000 (01:54 +0000)]
The breakpoint location hit counts were getting incremented in
BreakpointLocation::ShouldStop. That worked but wasn't really right,
since there's nothing to guarantee that won't get called more than
once. So this change moves that responsibility to the StopInfoBreakpoint
directly, and then it uses the BreakpointSite to actually do the bumping.
Also fix a test case that was assuming if you had many threads running some
code with a breakpoint in it, the hit count when you stopped would always be
1. Many of the threads could have hit it at the same time...
<rdar://problem/
18577603>
llvm-svn: 220358
Daniel Dunbar [Wed, 22 Oct 2014 01:26:06 +0000 (01:26 +0000)]
[lit] Fix Python-3 compatibility, patch by Dan Liew.
llvm-svn: 220357
NAKAMURA Takumi [Wed, 22 Oct 2014 01:25:49 +0000 (01:25 +0000)]
<float.h>: Don't seek #include_next if -ffreestanding for targeting mingw.
llvm-svn: 220356
Daniel Dunbar [Wed, 22 Oct 2014 00:48:23 +0000 (00:48 +0000)]
[lit] Bump version number.
llvm-svn: 220355
Daniel Dunbar [Wed, 22 Oct 2014 00:34:31 +0000 (00:34 +0000)]
Fix ShTest parsing error when a keyword line doesn't end with a newline.
llvm-svn: 220354
Matt Arsenault [Wed, 22 Oct 2014 00:28:59 +0000 (00:28 +0000)]
Fix typo
llvm-svn: 220353
Matt Arsenault [Wed, 22 Oct 2014 00:15:53 +0000 (00:15 +0000)]
Try to fix documentation bot warning
llvm-svn: 220352
Evgeniy Stepanov [Wed, 22 Oct 2014 00:12:40 +0000 (00:12 +0000)]
[msan] Handle param-tls overflow.
ParamTLS (shadow for function arguments) is of limited size. This change
makes all arguments that do not fit unpoisoned, and avoids writing
past the end of a TLS buffer.
llvm-svn: 220351
Rui Ueyama [Wed, 22 Oct 2014 00:05:30 +0000 (00:05 +0000)]
[PECOFF] Do not write duplicate directives to .def file.
This is a follow-up patch for r220333. r220333 renames exported symbols.
That raised another issue; if we have both decorated and undecorated names
for the same symbol, we'll end up have two duplicate exported symbol
entries.
This is a fix for that issue by removing duplciate entries.
llvm-svn: 220350
Hans Wennborg [Tue, 21 Oct 2014 23:49:52 +0000 (23:49 +0000)]
Revert "Teach the load analysis to allow finding available values which require" (r220277)
This seems to have caused PR21330.
llvm-svn: 220349
Nick Kledzik [Tue, 21 Oct 2014 23:45:37 +0000 (23:45 +0000)]
[mach-o] Support missing MH_SUBSECTIONS_VIA_SYMBOLS
All compiler generated mach-o object files are marked with MH_SUBSECTIONS_VIA_SYMBOLS.
But hand written assembly files need to opt-in if they are written correctly.
The flag means the linker can break up a sections at symbol addresses and
dead strip or re-order functions.
This change recognizes object files without the flag and marks its atoms as
not dead strippable and adds a layout-after chain of references so that the
atoms cannot be re-ordered.
llvm-svn: 220348
Lang Hames [Tue, 21 Oct 2014 23:41:15 +0000 (23:41 +0000)]
[MCJIT] Defer application of AArch64 MachO GOT relocations until resolve time.
On AArch64, GOT references are page relative (ADRP + LDR), so they can't be
applied until we know exactly where, within a page, the GOT entry will be in
the target address space.
Fixes <rdar://problem/
18693976>.
llvm-svn: 220347
Rafael Espindola [Tue, 21 Oct 2014 23:18:51 +0000 (23:18 +0000)]
MRI scripts: Add addlib support.
llvm-svn: 220346
JF Bastien [Tue, 21 Oct 2014 23:18:21 +0000 (23:18 +0000)]
LTO: respect command-line options that disable vectorization.
Summary: Patches 202051 and 208013 added calls to LTO's PassManager which unconditionally add LoopVectorizePass and SLPVectorizerPass instead of following the logic in PassManagerBuilder::populateModulePassManager and honoring the -vectorize-loops -run-slp-after-loop-vectorization flags.
Reviewers: nadav, aschwaighofer, yijiang
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D5884
llvm-svn: 220345
Rafael Espindola [Tue, 21 Oct 2014 23:04:55 +0000 (23:04 +0000)]
Use a range loop. NFC.
llvm-svn: 220344
Richard Smith [Tue, 21 Oct 2014 23:01:04 +0000 (23:01 +0000)]
PR21327 / C++ DR1652 / C++ DR73: comparing a past-the-end pointer for one
complete object to a pointer to the start of another complete object does
not evaluate to the constant 'false'. All other comparisons between the
addresses of subobjects of distinct complete objects still do.
llvm-svn: 220343
Matt Arsenault [Tue, 21 Oct 2014 23:01:01 +0000 (23:01 +0000)]
Add minnum / maxnum codegen
llvm-svn: 220342
Matt Arsenault [Tue, 21 Oct 2014 23:00:20 +0000 (23:00 +0000)]
Add minnum / maxnum intrinsics
These are named following the IEEE-754 names for these
functions, rather than the libm fmin / fmax to avoid
possible ambiguities. Some languages may implement something
resembling fmin / fmax which return NaN if either operand is
to propagate errors. These implement the IEEE-754 semantics
of returning the other operand if either is a NaN representing
missing data.
llvm-svn: 220341
Duncan P. N. Exon Smith [Tue, 21 Oct 2014 22:27:47 +0000 (22:27 +0000)]
IR: Reorder metadata bitcode serialization, NFC
Enumerate `MDNode`'s operands *before* the node itself, so that the
reader requires less RAUW. Although this will cause different code
paths to be hit in the reader, this should effectively be no
functionality change.
llvm-svn: 220340
Matt Arsenault [Tue, 21 Oct 2014 22:21:41 +0000 (22:21 +0000)]
R600: Update for div_fmas intrinsic change
llvm-svn: 220339
Matt Arsenault [Tue, 21 Oct 2014 22:20:55 +0000 (22:20 +0000)]
R600/SI: Add missing parameter to div_fmas intrinsic
llvm-svn: 220338
Duncan P. N. Exon Smith [Tue, 21 Oct 2014 22:13:34 +0000 (22:13 +0000)]
IR: Remove dead code in metadata bitcode writing, NFC
No one cares how many uses each metadata value has, so don't bother
counting.
llvm-svn: 220337
Rafael Espindola [Tue, 21 Oct 2014 21:56:47 +0000 (21:56 +0000)]
Overwrite instead of adding to archives when creating them in mri scripts.
This matches the behavior of GNU ar and also makes it easier to implemnt
support for the addlib command.
llvm-svn: 220336
Arnaud A. de Grandmaison [Tue, 21 Oct 2014 21:50:49 +0000 (21:50 +0000)]
Pacify bots and simplify r220321
llvm-svn: 220335
Rafael Espindola [Tue, 21 Oct 2014 21:47:27 +0000 (21:47 +0000)]
Convert a few std::string with StringRef. NFC.
This is a micro optimization, but also makes the code a bit more flexible.
The MRIMembers variable is a short term hack. It is going away in the next
commit.
llvm-svn: 220334
Rui Ueyama [Tue, 21 Oct 2014 21:41:28 +0000 (21:41 +0000)]
[PECOFF] Fix exported symbol in the import library
There are two ways to specify a symbol to be exported in the module
definition file.
1) EXPORT <external name> = <symbol>
2) EXPORT <symbol>
In (1), you give both external name and internal name. In that case,
the linker tries to find a symbol using the internal name, and write
that address to the export table with the external name. Thus, from
the outer world, the symbol seems to be exported as the external name.
In (2), internal name is basically the same as the external name
with an exception: if you give an undecorated symbol to the EXPORT
directive, and if the linker finds a decorated symbol, the external
name for the symbol will become the decorated symbol.
LLD didn't implement that exception correctly. This patch fixes that.
llvm-svn: 220333
Reid Kleckner [Tue, 21 Oct 2014 21:15:45 +0000 (21:15 +0000)]
GCC has supported C++11 ref-qualifiers since 4.8.1
This requires incorporating __GNUC_PATCHLEVEL__ into our prerequisite
check, and renaming our __GNUC_PREREQ to LLVM_GNUC_PREREQ, since it is
now functionally different.
Patch by Chilledheart!
Differential Revision: http://reviews.llvm.org/D5879
llvm-svn: 220332
Richard Smith [Tue, 21 Oct 2014 21:15:18 +0000 (21:15 +0000)]
[modules] When building an injected-class-name type, we may have to insert it
into multiple merged classes' TypeForDecl slots.
llvm-svn: 220331
Nick Kledzik [Tue, 21 Oct 2014 21:14:11 +0000 (21:14 +0000)]
Subclass InputGraph to get darwin linker library semantics
The darwin linker operates differently than the gnu linker with respect to
libraries. The darwin linker first links in all object files from the command
line, then to resolve any remaining undefines, it repeatedly iterates over
libraries on the command line until either all undefines are resolved or no
undefines were resolved in the last pass.
When Shankar made the InputGraph model, the plan for darwin was for the darwin
driver to place all libraries in a group at the end of the InputGraph. Thus
making the darwin model a subset of the gnu model. But it turns out that does
not work because the driver cannot tell if a file is an object or library until
it has been loaded, which happens later.
This solution is to subclass InputGraph for darwin and just iterate the graph
the way darwin linker needs.
llvm-svn: 220330
Matt Arsenault [Tue, 21 Oct 2014 21:08:36 +0000 (21:08 +0000)]
R600: Use default GlobalDirective
The overridden one wasn't inserting a space,
so you would end up with .globalfoo
llvm-svn: 220329
Evgeniy Stepanov [Tue, 21 Oct 2014 21:08:13 +0000 (21:08 +0000)]
[sanitizer] Fix build with _FILE_OFFSET_BITS=64.
Sanitizer source is not affected by _FILE_OFFSET_BITS in general,
but this one file must be built with 32-bit off_t. More details in the code.
llvm-svn: 220328
Rafael Espindola [Tue, 21 Oct 2014 21:07:49 +0000 (21:07 +0000)]
Use a StringRef. No functionality change.
llvm-svn: 220327
Rui Ueyama [Tue, 21 Oct 2014 21:05:01 +0000 (21:05 +0000)]
Use __cxa_demangle on FreeBSD to fix buildbots.
llvm-svn: 220326
Philip Reames [Tue, 21 Oct 2014 21:02:19 +0000 (21:02 +0000)]
Teach combineMetadata how to merge 'nonnull' metadata.
combineMetadata is used when merging two instructions into one. This change teaches it how to merge 'nonnull' - i.e. only preserve it on the new instruction if it's set on both sources. This isn't actually used yet since I haven't adjusted any of the call sites to pass in nonnull as a 'known metadata'.
llvm-svn: 220325
Philip Reames [Tue, 21 Oct 2014 21:00:03 +0000 (21:00 +0000)]
Preserve 'nonnull' when changing type of the load.
When changing the type of a load in Chandler's recent InstCombine changes, we can preserve the new 'nonnull' metadata.
I considered adding an assert since 'nonnull' is only valid on pointer types, but casting a pointer to a non-pointer would involve more than a bitcast anyways. If someone extends this transform to handle more than bitcasts, the verifier will report the malformed IR, so a separate assertion isn't needed. Also, the fpmath flags would have the same problem.
llvm-svn: 220324
Philip Reames [Tue, 21 Oct 2014 20:56:29 +0000 (20:56 +0000)]
Extend the verifier to check usage of 'nonnull' metadata.
The recently added !nonnull metadata is only valid on loads of pointer type.
llvm-svn: 220323
Enrico Granata [Tue, 21 Oct 2014 20:52:14 +0000 (20:52 +0000)]
Expose the type-info flags at the public API layer. These flags provide much more informational content to consumers of the LLDB API than the existing TypeClass. Part of the fix for rdar://
18517593
llvm-svn: 220322
Arnaud A. de Grandmaison [Tue, 21 Oct 2014 20:47:22 +0000 (20:47 +0000)]
[PBQP] Teach PassConfig to tell if the default register allocator is used.
This enables targets to adapt their pass pipeline to the register
allocator in use. For example, with the AArch64 backend, using PBQP
with the cortex-a57, the FPLoadBalancing pass is no longer necessary.
llvm-svn: 220321
Eric Christopher [Tue, 21 Oct 2014 20:39:34 +0000 (20:39 +0000)]
Move anonymous types declared in an anonymous union to
outside the anonymous union as it's a language extension
we don't normally support.
llvm-svn: 220320
Eric Christopher [Tue, 21 Oct 2014 20:36:17 +0000 (20:36 +0000)]
Remove unused variable.
llvm-svn: 220319
Eric Christopher [Tue, 21 Oct 2014 20:35:35 +0000 (20:35 +0000)]
Fix implicit conversion of NULL constant to 'bool'.
llvm-svn: 220318
Rafael Espindola [Tue, 21 Oct 2014 20:34:57 +0000 (20:34 +0000)]
Move code a bit to avoid a few declarations. NFC.
llvm-svn: 220317
Arnaud A. de Grandmaison [Tue, 21 Oct 2014 20:10:21 +0000 (20:10 +0000)]
[PBQP] Add a testcase for r220302: Fix coalescing benefits
llvm-svn: 220316
Rui Ueyama [Tue, 21 Oct 2014 20:02:00 +0000 (20:02 +0000)]
Assume cxxabi.h exists on FreeBSD
HAVE_CXXABI_H is not defined on FreeBSD but the system actually
has the header. CMake test fails because the header depends on size_t.
llvm-svn: 220315
David Majnemer [Tue, 21 Oct 2014 19:51:55 +0000 (19:51 +0000)]
InstCombine: Simplify FoldICmpCstShrCst
This function was complicated by the fact that it tried to perform
canonicalizations that were already preformed by InstSimplify. Remove
this extra code and move the tests over to InstSimplify. Add asserts to
make sure our preconditions hold before we make any assumptions.
llvm-svn: 220314
Aaron Ballman [Tue, 21 Oct 2014 19:37:56 +0000 (19:37 +0000)]
Removing unused variable (assigned into, but never read from); NFC.
llvm-svn: 220313
Aaron Ballman [Tue, 21 Oct 2014 19:24:06 +0000 (19:24 +0000)]
Follow-up commit to r211657 which introduced these macros, but not for MSVC. This turns out to break our freestanding tests on Windows when compiling in MSVC-compatible mode. It was decided (lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-
20141020/116942.html is the start of the thread) to support this as part of Clang's interface on all platforms.
llvm-svn: 220312
Hal Finkel [Tue, 21 Oct 2014 19:20:21 +0000 (19:20 +0000)]
Treat -g1 as -gline-tables-only
-g1 on gcc (and also IBM's xlc) are documented to be very similar to
-gline-tables-only. Our -gline-tables-only might still be more verbose than -g1
on other compilers, but currently we treat -g1 as -g, and so we're producing
much more debug info at -g1 than everybody else. Treating -g1 as
-gline-tables-only brings us much closer to what everyone else is doing.
For more information, see the discussion on
http://lists.cs.uiuc.edu/pipermail/cfe-dev/2014-October/039649.html
llvm-svn: 220311
Rafael Espindola [Tue, 21 Oct 2014 18:31:09 +0000 (18:31 +0000)]
Drop support for an old version of ld64 (from darwin 9).
llvm-svn: 220310
Sanjay Patel [Tue, 21 Oct 2014 18:26:57 +0000 (18:26 +0000)]
remove function names from comments; NFC
llvm-svn: 220309
Rafael Espindola [Tue, 21 Oct 2014 18:24:31 +0000 (18:24 +0000)]
Convert two tests to use llvm-readobj.
llvm-svn: 220308
Justin Bogner [Tue, 21 Oct 2014 18:03:08 +0000 (18:03 +0000)]
Driver: Quote the command in crash reproduction scripts.
This fixes crash report generation when filenames have spaces. It also
removes an awkward workaround that quoted *some* arguments when
generating crash reports.
llvm-svn: 220307
Enrico Granata [Tue, 21 Oct 2014 17:49:24 +0000 (17:49 +0000)]
Add typemaps to handle the transformation of Python list of strings into a 'char const **'. This fixes zephyr's issue with SBTarget::Launch without splitting the API into multiple names
llvm-svn: 220306
Justin Bogner [Tue, 21 Oct 2014 17:24:44 +0000 (17:24 +0000)]
Driver: Move crash report command mangling into Command::Print
This pushes the logic for generating a crash reproduction script
entirely into Command::Print, instead of Command doing half of the
work and then relying on textual substitution for the rest. This makes
this logic much easier to read and will simplify fixing a couple of
issues in this area.
llvm-svn: 220305