Filipe Cabecinhas [Sat, 24 Jan 2015 04:15:05 +0000 (04:15 +0000)]
[Bitcode] Diagnose errors instead of asserting from bad input
Eventually we can make some of these pass the error along to the caller.
Reports a fatal error if:
We find an invalid abbrev record
We try to get an invalid abbrev number
We can't fill the current word due to an EOF
Fixed an invalid bitcode test to check for output with FileCheck
Bugs found with afl-fuzz
llvm-svn: 226986
Filipe Cabecinhas [Sat, 24 Jan 2015 03:55:22 +0000 (03:55 +0000)]
Fix REQUIRES lines added in r226951 and add the x86 feature if the X86 target was compiled in
llvm-svn: 226985
Rui Ueyama [Sat, 24 Jan 2015 02:57:20 +0000 (02:57 +0000)]
Return a boolean value directly, instead of returning true if true and false if false.
llvm-svn: 226984
Richard Trieu [Sat, 24 Jan 2015 02:48:32 +0000 (02:48 +0000)]
When checking the template argument list, use a copy of that list for changes
and only update the orginal list on a valid arugment list. When checking an
individual expression template argument, and conversions are required, update
the expression in the template argument. Since template arguments are
speculatively checked, the copying of the template argument list prevents
updating the template arguments when the list does not match the template.
Additionally, clean up the integer checking code in the template diffing code.
The code performs unneccessary conversions from APSInt to APInt.
Fixes PR21758.
This essentially reverts r224770 to recommits r224667 and r224668 with extra
changes to prevent the template instantiation problems seen in PR22006.
A test to catch the discovered problem is also added.
llvm-svn: 226983
Chandler Carruth [Sat, 24 Jan 2015 02:25:21 +0000 (02:25 +0000)]
[PM] Update Clang to reflect the TLI API change in LLVM r226981.
llvm-svn: 226982
Chandler Carruth [Sat, 24 Jan 2015 02:06:09 +0000 (02:06 +0000)]
[PM] Rework how the TargetLibraryInfo pass integrates with the new pass
manager to support the actual uses of it. =]
When I ported instcombine to the new pass manager I discover that it
didn't work because TLI wasn't available in the right places. This is
a somewhat surprising and/or subtle aspect of the new pass manager
design that came up before but I think is useful to be reminded of:
While the new pass manager *allows* a function pass to query a module
analysis, it requires that the module analysis is already run and cached
prior to the function pass manager starting up, possibly with
a 'require<foo>' style utility in the pass pipeline. This is an
intentional hurdle because using a module analysis from a function pass
*requires* that the module analysis is run prior to entering the
function pass manager. Otherwise the other functions in the module could
be in who-knows-what state, etc.
A somewhat surprising consequence of this design decision (at least to
me) is that you have to design a function pass that leverages
a module analysis to do so as an optional feature. Even if that means
your function pass does no work in the absence of the module analysis,
you have to handle that possibility and remain conservatively correct.
This is a natural consequence of things being able to invalidate the
module analysis and us being unable to re-run it. And it's a generally
good thing because it lets us reorder passes arbitrarily without
breaking correctness, etc.
This ends up causing problems in one case. What if we have a module
analysis that is *definitionally* impossible to invalidate. In the
places this might come up, the analysis is usually also definitionally
trivial to run even while other transformation passes run on the module,
regardless of the state of anything. And so, it follows that it is
natural to have a hard requirement on such analyses from a function
pass.
It turns out, that TargetLibraryInfo is just such an analysis, and
InstCombine has a hard requirement on it.
The approach I've taken here is to produce an analysis that models this
flexibility by making it both a module and a function analysis. This
exposes the fact that it is in fact safe to compute at any point. We can
even make it a valid CGSCC analysis at some point if that is useful.
However, we don't want to have a copy of the actual target library info
state for each function! This state is specific to the triple. The
somewhat direct and blunt approach here is to turn TLI into a pimpl,
with the state and mutators in the implementation class and the query
routines primarily in the wrapper. Then the analysis can lazily
construct and cache the implementations, keyed on the triple, and
on-demand produce wrappers of them for each function.
One minor annoyance is that we will end up with a wrapper for each
function in the module. While this is a bit wasteful (one pointer per
function) it seems tolerable. And it has the advantage of ensuring that
we pay the absolute minimum synchronization cost to access this
information should we end up with a nice parallel function pass manager
in the future. We could look into trying to mark when analysis results
are especially cheap to recompute and more eagerly GC-ing the cached
results, or we could look at supporting a variant of analyses whose
results are specifically *not* cached and expected to just be used and
discarded by the consumer. Either way, these seem like incremental
enhancements that should happen when we start profiling the memory and
CPU usage of the new pass manager and not before.
The other minor annoyance is that if we end up using the TLI in both
a module pass and a function pass, those will be produced by two
separate analyses, and thus will point to separate copies of the
implementation state. While a minor issue, I dislike this and would like
to find a way to cleanly allow a single analysis instance to be used
across multiple IR unit managers. But I don't have a good solution to
this today, and I don't want to hold up all of the work waiting to come
up with one. This too seems like a reasonable thing to incrementally
improve later.
llvm-svn: 226981
Richard Smith [Sat, 24 Jan 2015 01:55:52 +0000 (01:55 +0000)]
Bring the modules buildbot back to life after r226940.
llvm-svn: 226980
Kuba Brecka [Sat, 24 Jan 2015 01:42:44 +0000 (01:42 +0000)]
Reverting r226937: lit: Make MCJIT's supported arch check case insensitive
The r226937 commit causes ASan lit tests to be all skipped on OS X.
llvm-svn: 226979
Quentin Colombet [Sat, 24 Jan 2015 01:25:54 +0000 (01:25 +0000)]
[AArch64][LoadStoreOptimizer] Form LDPSW when possible.
This patch adds the missing LD[U]RSW variants to the load store optimizer, so
that we generate LDPSW when possible.
<rdar://problem/
19583480>
llvm-svn: 226978
Richard Smith [Sat, 24 Jan 2015 01:07:20 +0000 (01:07 +0000)]
[modules] Sometimes we can deserialize a class member but not have yet
encountered any definition for the class; this happens when the definition is
added by an update record that is not yet loaded. In such a case, eagerly pick
the original parent of the member as the canonical definition of the class
rather than muddling through with the canonical declaration (the latter can
lead to us failing to merge properly later if the canonical definition turns
out to be some other declaration).
llvm-svn: 226977
Greg Fitzgerald [Sat, 24 Jan 2015 01:06:07 +0000 (01:06 +0000)]
Fix the ELF shared library build targets - take 2
lldELF is used by each ELF backend. lldELF's ELFLinkingContext
also held a reference to each backend, creating a link-time
cycle. This patch moves the backend references to lldDriver.
Differential Revision: http://reviews.llvm.org/D7119
llvm-svn: 226976
Lang Hames [Sat, 24 Jan 2015 00:45:11 +0000 (00:45 +0000)]
[Orc] Add some missing headers to the CompileOnDemandLayer.h
llvm-svn: 226975
Bruno Cardoso Lopes [Sat, 24 Jan 2015 00:22:04 +0000 (00:22 +0000)]
[x86] Fix a comment
llvm-svn: 226974
Lang Hames [Sat, 24 Jan 2015 00:01:29 +0000 (00:01 +0000)]
[Orc] Add orcjit to the dependencies list in the Makefile for lli.
This should fix a few more broken bots.
llvm-svn: 226973
Rui Ueyama [Fri, 23 Jan 2015 23:59:39 +0000 (23:59 +0000)]
ELF: Remove dead code.
llvm-svn: 226972
Rui Ueyama [Fri, 23 Jan 2015 23:59:37 +0000 (23:59 +0000)]
ELF: Remove virtual from non-overriden functions.
If it's overridden by a derived class, add override to the derived class.
llvm-svn: 226971
Tom Stellard [Fri, 23 Jan 2015 23:59:08 +0000 (23:59 +0000)]
R600/SI: Emit .hsa.version section for amdhsa OS
llvm-svn: 226970
Reid Kleckner [Fri, 23 Jan 2015 23:51:25 +0000 (23:51 +0000)]
Fix assertion when C++ EH filters are present in functions using SEH
Should fix PR22305.
llvm-svn: 226969
Justin Bogner [Fri, 23 Jan 2015 23:46:13 +0000 (23:46 +0000)]
InstrProf: Use the stream when dumping counters
llvm-svn: 226968
Adrian Prantl [Fri, 23 Jan 2015 23:40:47 +0000 (23:40 +0000)]
Address more review comments for DIExpression::iterator.
- input_iterator
- define an operator->
- make constructors private were possible
llvm-svn: 226967
Rui Ueyama [Fri, 23 Jan 2015 23:39:33 +0000 (23:39 +0000)]
Fix spelling.
llvm-svn: 226966
Rui Ueyama [Fri, 23 Jan 2015 23:39:30 +0000 (23:39 +0000)]
Remove extra parentheses.
llvm-svn: 226965
Justin Bogner [Fri, 23 Jan 2015 23:28:30 +0000 (23:28 +0000)]
InstrProf: debug dumps should go to dbgs(), not outs()
llvm-svn: 226964
Greg Fitzgerald [Fri, 23 Jan 2015 23:26:13 +0000 (23:26 +0000)]
[MachO] Remove dependency on lldDriver
Moved getMemoryBuffer from DarwnLdDriver to MachOLinkingContext.
lldMachO shared library target now builds.
Differential Review: http://reviews.llvm.org/D7155
llvm-svn: 226963
Greg Clayton [Fri, 23 Jan 2015 23:18:53 +0000 (23:18 +0000)]
Adding the ability to get the language from a mangled name. This isn't used in the SVN LLDB, but will be used in another codebase based on the SVN LLDB.
llvm-svn: 226962
Justin Bogner [Fri, 23 Jan 2015 23:09:27 +0000 (23:09 +0000)]
llvm-cov: Don't use llvm::outs() in library code
Nothing in lib/ should be using llvm::outs() directly. Thread it in
from the caller instead.
llvm-svn: 226961
Justin Bogner [Fri, 23 Jan 2015 22:57:02 +0000 (22:57 +0000)]
llvm-cov: Use range-for (NFC)
llvm-svn: 226960
Vince Harron [Fri, 23 Jan 2015 22:57:00 +0000 (22:57 +0000)]
Fixing TestRegisters on Linux with LLGS
This patch fixes TestRegisters on Linux with LLGS
Introduce GetUserRegisterCount on RegisterInfoInterface to distinguish
lldb internal registers (e.g.: DR0-DR7) during register counting.
Update GDBRemoteCommunicationServer to skip lldb internal registers on
read/write register and on discover register.
Submitted for Tamas Berghammer
llvm-svn: 226959
Reid Kleckner [Fri, 23 Jan 2015 22:55:31 +0000 (22:55 +0000)]
mips: Fix "XPASS" test results by removing 'not' commands
These tests are asserting and crashing for me, and 'not' sees that as a
non-zero exit code instead of a signal code for obscure Windows reasons.
This causes the test to pass, giving me an unclean 'ninja check'.
The test is already XFAILd, so just run the test without 'not' and let
lit handle the failure.
llvm-svn: 226958
Vince Harron [Fri, 23 Jan 2015 22:50:34 +0000 (22:50 +0000)]
Renamed UpdateSDKDirectoryInfosInNeeded->IfNeeded
Also removed extra call to UpdateSDKDirectoryInfosIfNeeded
llvm-svn: 226957
Vince Harron [Fri, 23 Jan 2015 22:48:28 +0000 (22:48 +0000)]
fixed up some logging messages (options and wait_pid were swapped)
llvm-svn: 226956
David Blaikie [Fri, 23 Jan 2015 22:48:27 +0000 (22:48 +0000)]
DebugInfo: Remove outdated comment. Column info is no longer needed to differentiate inline callsites.
llvm-svn: 226955
David Blaikie [Fri, 23 Jan 2015 22:47:05 +0000 (22:47 +0000)]
Disable warnings in an IRGen test to make test failures less noisy
llvm-svn: 226954
Bruno Cardoso Lopes [Fri, 23 Jan 2015 22:44:16 +0000 (22:44 +0000)]
[x86] Combine x86mmx/i64 to v2i64 conversion to use scalar_to_vector
Handle the poor codegen for i64/x86xmm->v2i64 (%mm -> %xmm) moves. Instead of
using stack store/load pair to do the job, use scalar_to_vector directly, which
in the MMX case can use movq2dq. This was the current behavior prior to
improvements for vector legalization of extloads in r213897.
This commit fixes the regression and as a side-effect also remove some
unnecessary shuffles.
In the new attached testcase, we go from:
pshufw $-18, (%rdi), %mm0
movq %mm0, -8(%rsp)
movq -8(%rsp), %xmm0
pshufd $-44, %xmm0, %xmm0
movd %xmm0, %eax
...
To:
pshufw $-18, (%rdi), %mm0
movq2dq %mm0, %xmm0
movd %xmm0, %eax
...
Differential Revision: http://reviews.llvm.org/D7126
rdar://problem/
19413324
llvm-svn: 226953
Justin Bogner [Fri, 23 Jan 2015 22:38:01 +0000 (22:38 +0000)]
llvm-cov: clang-format the GCOV files (NFC)
llvm-svn: 226952
Filipe Cabecinhas [Fri, 23 Jan 2015 22:32:12 +0000 (22:32 +0000)]
[lld] Added REQUIRES lines to tests
llvm-svn: 226951
Filipe Cabecinhas [Fri, 23 Jan 2015 22:32:05 +0000 (22:32 +0000)]
[lld] Re-add REQUIRES line
Please don't remove REQUIRES lines when refreshing tests.
llvm-svn: 226950
Reid Kleckner [Fri, 23 Jan 2015 22:25:47 +0000 (22:25 +0000)]
Fix the MSVC build with the new Orc JIT APIs
llvm-svn: 226949
Michael J. Spencer [Fri, 23 Jan 2015 22:24:57 +0000 (22:24 +0000)]
[YAMLIO] Dirty hack: Force integral conversion to allow strong typedefs to convert.
llvm-svn: 226948
Eric Fiselier [Fri, 23 Jan 2015 22:22:36 +0000 (22:22 +0000)]
Get libc++ building on Sun Solaris. Patch from C Bergstrom.
llvm-svn: 226947
Lang Hames [Fri, 23 Jan 2015 22:11:07 +0000 (22:11 +0000)]
[Orc] Remove a bunch of constructors from ObjectLinkingLayer.
These constructors were causing trouble for MSVC and older GCCs. This should
fix more of the build failures from r226940.
llvm-svn: 226946
Tom Stellard [Fri, 23 Jan 2015 22:05:45 +0000 (22:05 +0000)]
R600/SI: Move i64 -> v2i32 load promotion into AMDGPUDAGToDAGISel::Select()
We used to do this promotion during DAG legalization, but this
caused an infinite loop in ExpandUnalignedLoad() because it assumed
that i64 loads were legal if i64 was a legal type.
It also seems better to report i64 loads as legal, since they actually
are and we were just promoting them to simplify our tablegen files.
llvm-svn: 226945
Fariborz Jahanian [Fri, 23 Jan 2015 21:58:46 +0000 (21:58 +0000)]
Objective-C moderinzer [qoi], add space on rhs when needed when
converting to property-dot syntax for setters.
rdar://
19381786
llvm-svn: 226944
Michael J. Spencer [Fri, 23 Jan 2015 21:58:09 +0000 (21:58 +0000)]
[Object][ELF] Test unknown type.
llvm-svn: 226943
Michael J. Spencer [Fri, 23 Jan 2015 21:57:50 +0000 (21:57 +0000)]
[YAMLIO] Add support for numeric values in enums.
llvm-svn: 226942
Lang Hames [Fri, 23 Jan 2015 21:49:12 +0000 (21:49 +0000)]
[Orc] LLVMLinkInOrcMCJITReplacement shouldn't be in the anonymous namespace.
This should fix some of the builder errors from r226940.
llvm-svn: 226941
Lang Hames [Fri, 23 Jan 2015 21:25:00 +0000 (21:25 +0000)]
[Orc] New JIT APIs.
This patch adds a new set of JIT APIs to LLVM. The aim of these new APIs is to
cleanly support a wider range of JIT use cases in LLVM, and encourage the
development and contribution of re-usable infrastructure for LLVM JIT use-cases.
These APIs are intended to live alongside the MCJIT APIs, and should not affect
existing clients.
Included in this patch:
1) New headers in include/llvm/ExecutionEngine/Orc that provide a set of
components for building JIT infrastructure.
Implementation code for these headers lives in lib/ExecutionEngine/Orc.
2) A prototype re-implementation of MCJIT (OrcMCJITReplacement) built out of the
new components.
3) Minor changes to RTDyldMemoryManager needed to support the new components.
These changes should not impact existing clients.
4) A new flag for lli, -use-orcmcjit, which will cause lli to use the
OrcMCJITReplacement class as its underlying execution engine, rather than
MCJIT itself.
Tests to follow shortly.
Special thanks to Michael Ilseman, Pete Cooper, David Blaikie, Eric Christopher,
Justin Bogner, and Jim Grosbach for extensive feedback and discussion.
llvm-svn: 226940
Adrian Prantl [Fri, 23 Jan 2015 21:24:41 +0000 (21:24 +0000)]
Move the accessor functions from DIExpression::iterator into a wrapper
DIExpression::Operand, so we can write range-based for loops.
Thanks to David Blaikie for the idea.
llvm-svn: 226939
Sergey Matveev [Fri, 23 Jan 2015 21:12:39 +0000 (21:12 +0000)]
[sanitizer] Update descriptor size for glibc 2.13.
See https://code.google.com/p/address-sanitizer/issues/detail?id=361
It's still not clear whether the values are correct in all cases, but at least
this should unbreak our bots.
llvm-svn: 226938
Reid Kleckner [Fri, 23 Jan 2015 21:11:40 +0000 (21:11 +0000)]
lit: Make MCJIT's supported arch check case insensitive
Should make the tests run when using CMake on systems where 'uname -p'
reports "amd64", such as FreeBSD.
Should fix PR21559.
llvm-svn: 226937
Kevin Enderby [Fri, 23 Jan 2015 21:02:44 +0000 (21:02 +0000)]
Fix the problem with llvm-objdump and -archive-headers in printing the archive header size field.
This problem showed up with the clang-cmake-armv7-a15-full bot. Thanks to Renato Golin for his help.
llvm-svn: 226936
Alexei Starovoitov [Fri, 23 Jan 2015 21:00:08 +0000 (21:00 +0000)]
[mips] fix spelling of 'disassembler'
trivial first commit
llvm-svn: 226935
Hans Wennborg [Fri, 23 Jan 2015 20:43:51 +0000 (20:43 +0000)]
LowerSwitch: replace unreachable default with popular case destination
SimplifyCFG currently does this transformation, but I'm planning to remove that
to allow other passes, such as this one, to exploit the unreachable default.
This patch takes care to keep track of what case values are unreachable even
after the transformation, allowing for more efficient lowering.
Differential Revision: http://reviews.llvm.org/D6697
llvm-svn: 226934
Oleksiy Vyalov [Fri, 23 Jan 2015 20:09:14 +0000 (20:09 +0000)]
Fix CMake build - add readline dependency on ${PYTHON_LIBRARY}.
llvm-svn: 226933
Colin LeMahieu [Fri, 23 Jan 2015 20:06:24 +0000 (20:06 +0000)]
[Objdump] Output information about common symbols in a way closer to GNU objdump.
llvm-svn: 226932
Ramkumar Ramachandra [Fri, 23 Jan 2015 19:45:35 +0000 (19:45 +0000)]
[emacs] llvm-mode: fix parens, font-lock i*
In llvm-mode, with electric-pair-mode turned on, typing a literal '['
would print out '[[', and '(' would print a '(('. This was a very
annoying bug caused by overzealous syntax-table entries: the parens are
already part of the '(' and ')' class by default. Fix this.
While at it, notice that i32, i64, i1 etc. are not font-locked despite a
clear intent to do so. The issue is that regexp-opt doesn't accept
regular expressions. So, spell out the common literal integers with
different widths.
Differential Revision: http://reviews.llvm.org/D7036
llvm-svn: 226931
Daniel Jasper [Fri, 23 Jan 2015 19:37:25 +0000 (19:37 +0000)]
clang-format: Fix another crasher caused by incomplete macro code.
We did't properly mark all of an AnnotatedLine's children as finalized
and thus would reformat the same tokens in different branches of #if/#else
sequences leading to invalid replacements.
llvm-svn: 226930
Kuba Brecka [Fri, 23 Jan 2015 19:29:19 +0000 (19:29 +0000)]
[compiler-rt] Ensure AsanInitFromRtl is called from a static initializer on OS X by using ASAN_DYNAMIC=1
The idea is to ensure that the ASan runtime gets initialized early (i.e.
before other initializers/constructors) even when DYLD_INSERT_LIBRARIES
is not used. In that case, the interceptors are not installed (on OS X,
DYLD_INSERT_LIBRARIES is required for interceptors to work), and therefore
ASan gets currently initialized quite late -- from the main executable's
module initializer. The following issues are a consequence of this:
https://code.google.com/p/address-sanitizer/issues/detail?id=363
https://code.google.com/p/address-sanitizer/issues/detail?id=357
Both of them are fixed with this patch.
Reviewed at http://reviews.llvm.org/D7117
llvm-svn: 226929
Greg Fitzgerald [Fri, 23 Jan 2015 19:24:32 +0000 (19:24 +0000)]
Revert " Fix the ELF shared library build targets"
This reverts commit
6a3f545b44cea46321e025d9ab773786af86cb51.
llvm-svn: 226928
Fariborz Jahanian [Fri, 23 Jan 2015 19:23:42 +0000 (19:23 +0000)]
Objective-C modernizer. Avoid using property-dot syntax when
receiver type is not valid for property-dot syntz use.
rdar://
19381786
llvm-svn: 226927
Kuba Brecka [Fri, 23 Jan 2015 19:17:20 +0000 (19:17 +0000)]
[compiler-rt] Fix the prototype of ioctl interceptor
The interceptor of ioctl is using a non-standard prototype:
INTERCEPTOR(int, ioctl, int d, unsigned request, void *arg)
At least on OS X, the request argument should be unsigned long and not
just unsigned, and also instead of the last argument (arg), the function
should be accepting a variable number of arguments, so the prototype
should be:
int ioctl(int fildes, unsigned long request, ...);
We can still keep using `unsigned` internally to save space, because we
know that all possible values of `request` will fit into it.
Reviewed at http://reviews.llvm.org/D7038
llvm-svn: 226926
Reid Kleckner [Fri, 23 Jan 2015 19:16:25 +0000 (19:16 +0000)]
Attempt to fix ::sscanf Cygwin build break reported in PR22302
llvm-svn: 226925
Francisco Lopes da Silva [Fri, 23 Jan 2015 19:06:57 +0000 (19:06 +0000)]
Add tests for code completion of variadic prototypes
llvm-svn: 226924
Daniel Jasper [Fri, 23 Jan 2015 19:04:49 +0000 (19:04 +0000)]
clang-format: Fix incorrect classification of "*".
Before:
*a = b *c;
After:
*a = b * c;
llvm-svn: 226923
Greg Fitzgerald [Fri, 23 Jan 2015 18:52:44 +0000 (18:52 +0000)]
Fix the ELF shared library build targets
lldELF is used by each ELF backend. lldELF's ELFLinkingContext
also held a reference to each backend, creating a link-time
cycle. This patch moves the backend references to lldDriver.
Differential Revision: http://reviews.llvm.org/D7119
llvm-svn: 226922
Kevin Enderby [Fri, 23 Jan 2015 18:52:17 +0000 (18:52 +0000)]
Add the option, -data-in-code, to llvm-objdump used with -macho to print the Mach-O data in code table.
llvm-svn: 226921
Reid Kleckner [Fri, 23 Jan 2015 18:49:01 +0000 (18:49 +0000)]
Classify functions by EH personality type rather than using the triple
This mostly reverts commit r222062 and replaces it with a new enum. At
some point this enum will grow at least for other MSVC EH personalities.
Also beefs up the way we were sniffing the personality function.
Previously we would emit the Itanium LSDA despite using
__C_specific_handler.
Reviewers: majnemer
Differential Revision: http://reviews.llvm.org/D6987
llvm-svn: 226920
Adrian Prantl [Fri, 23 Jan 2015 18:01:39 +0000 (18:01 +0000)]
Debug Info / PR22309: Allow union types to be emitted as unsigned constants.
llvm-svn: 226919
Eric Christopher [Fri, 23 Jan 2015 17:22:44 +0000 (17:22 +0000)]
Remove some local variables in place of just querying for them
in the couple of asserts.
llvm-svn: 226917
Sanjay Patel [Fri, 23 Jan 2015 16:40:50 +0000 (16:40 +0000)]
Process the -fno-signed-zeros optimization flag (PR20870)
The driver currently accepts but ignores the -fno-signed-zeros flag.
This patch passes the flag through and enables 'nsz' fast-math-flag
generation in IR.
The existing OpenCL flag for the same functionality is made into an
alias here. It may be removed in a subsequent patch.
This should resolve bug 20870 ( http://llvm.org/bugs/show_bug.cgi?id=20870 );
patches for the optimizer were checked in at:
http://llvm.org/viewvc/llvm-project?view=revision&revision=225050
http://llvm.org/viewvc/llvm-project?view=revision&revision=224583
Differential Revision: http://reviews.llvm.org/D6873
llvm-svn: 226915
Alexander Kornienko [Fri, 23 Jan 2015 15:36:10 +0000 (15:36 +0000)]
Replace size() calls on containers with empty() calls where appropriate. NFC
http://reviews.llvm.org/D7090
Patch by Gábor Horváth!
llvm-svn: 226914
Evgeniy Stepanov [Fri, 23 Jan 2015 15:14:27 +0000 (15:14 +0000)]
[sanitizer] Fix an edge case in MemoryRangeIsAvailable.
llvm-svn: 226913
Alexander Kornienko [Fri, 23 Jan 2015 15:10:37 +0000 (15:10 +0000)]
[clang-tidy] Use shrink_to_fit instead of copy and swap trick
The shrink_to_fit() method is more readable and more effective than
the copy and swap trick to reduce the capacity of a shrinkable container.
Note that, the shrink_to_fit() method is only available in C++11 and up.
Example:
std::vector<int>(v).swap(v); will be replaced with v.shrink_to_fit();
http://reviews.llvm.org/D7087
Patch by Gábor Horváth!
llvm-svn: 226912
Alexander Kornienko [Fri, 23 Jan 2015 14:43:06 +0000 (14:43 +0000)]
[clang-tidy] Small readability-container-size-empty cleanup
Utilized the hasEitherOperand instead of explicit anyOf.
http://reviews.llvm.org/D7142
Patch by Gábor Horváth!
llvm-svn: 226911
Viktor Kutuzov [Fri, 23 Jan 2015 14:39:23 +0000 (14:39 +0000)]
[Sanitizers] Intercept statfs() on FreeBSD
Committed unreviewed with permission.
llvm-svn: 226910
Deepak Panickal [Fri, 23 Jan 2015 14:31:56 +0000 (14:31 +0000)]
Fix handling of data-disassemble command arguments.
llvm-svn: 226909
Francisco Lopes da Silva [Fri, 23 Jan 2015 13:17:51 +0000 (13:17 +0000)]
Sema: code completion for variadic prototypes.
llvm-svn: 226908
Tamas Berghammer [Fri, 23 Jan 2015 11:02:28 +0000 (11:02 +0000)]
Cleanup do-gtest.py
* Add comments
* Refactor output manipulation (cleanup + minor bug fixes)
* Add better error reporting on test failure
llvm-svn: 226907
Tamas Berghammer [Fri, 23 Jan 2015 10:54:21 +0000 (10:54 +0000)]
Fix indentation in ValueObject.cpp (test commit)
llvm-svn: 226906
Toma Tabacu [Fri, 23 Jan 2015 10:40:19 +0000 (10:40 +0000)]
[mips] Add new error message and improve testing for parsing the .module directive.
Summary:
We used to silently ignore any empty .module's and we used to give an error saying that we found
an "unexpected token at start of statement" when the value of the option wasn't an identifier (e.g. if it was a number).
We now give an error saying that we "expected .module option identifier" in both of those cases.
I also fixed the other tests in mips-abi-bad.s, which all seemed to be broken.
Reviewers: dsanders
Reviewed By: dsanders
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D7095
llvm-svn: 226905
Jyoti Allur [Fri, 23 Jan 2015 09:10:03 +0000 (09:10 +0000)]
This patch fixes issue with lowering below mentioned pattern :-
_foo:
smull r0, r1, r1, r0
smull r2, r3, r3, r2
adds r0, r2, r0
adc r1, r3, r1
bx lr
to
_foo:
smull r0, r1, r1, r0
smlal r0, r1, r3, r2
bx lr
llvm-svn: 226904
Denis Protivensky [Fri, 23 Jan 2015 08:56:47 +0000 (08:56 +0000)]
Test commit.
llvm-svn: 226903
Craig Topper [Fri, 23 Jan 2015 08:00:59 +0000 (08:00 +0000)]
[x86] Change u8imm operands to always print as unsigned. This makes shuffle masks and the like make way more sense.
llvm-svn: 226902
Mehdi Amini [Fri, 23 Jan 2015 07:07:20 +0000 (07:07 +0000)]
DAGCombine: always constant fold FMA when target disable FP exceptions
Summary: When trying to constant fold an FMA in the DAG, getNode()
fails to fold the FMA if an operand is not finite. In this case this
patch allows the constant folding if !TLI->hasFloatingPointExceptions()
Reviewers: resistor
Reviewed By: resistor
Subscribers: hfinkel, llvm-commits
Differential Revision: http://reviews.llvm.org/D6912
From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 226901
Filipe Cabecinhas [Fri, 23 Jan 2015 06:59:51 +0000 (06:59 +0000)]
Add USES_TERMINAL to libcxx lit tests, if available
llvm-svn: 226900
Lang Hames [Fri, 23 Jan 2015 06:25:17 +0000 (06:25 +0000)]
[ADT] Add move operations to SmallVector<T,N> from SmallVectorImpl<T>.
This makes it possible to move between SmallVectors of different sizes.
Thanks to Dave Blaikie and Duncan Smith for patch feedback.
llvm-svn: 226899
Craig Topper [Fri, 23 Jan 2015 06:18:35 +0000 (06:18 +0000)]
Fix 80 column violation
llvm-svn: 226898
Craig Topper [Fri, 23 Jan 2015 06:11:45 +0000 (06:11 +0000)]
[X86] Add IntrNoMem to the AVX512 conflict intrinsics.
llvm-svn: 226897
Rafael Espindola [Fri, 23 Jan 2015 05:26:38 +0000 (05:26 +0000)]
[pr22293] Don't crash during codegen of a recursive destructor.
In ItaniumCXXABI::EmitCXXDestructors we first emit the base destructor
and then try to emit the complete one as an alias.
If in the base ends up calling the complete destructor, the GD for the
complete will be in the list of deferred decl by the time we replace
it with an alias and delete the original GV.
llvm-svn: 226896
Rafael Espindola [Fri, 23 Jan 2015 04:44:35 +0000 (04:44 +0000)]
Add STB_GNU_UNIQUE to the ELF writer.
This lets llvm-mc assemble files produced by gcc.
llvm-svn: 226895
Rui Ueyama [Fri, 23 Jan 2015 01:44:51 +0000 (01:44 +0000)]
Don't use iterator for the same reason as r226883.
llvm-svn: 226893
Jason Molenda [Fri, 23 Jan 2015 01:34:19 +0000 (01:34 +0000)]
debug printfs that got left in. I blame greg.
llvm-svn: 226892
Kate Stone [Fri, 23 Jan 2015 01:06:10 +0000 (01:06 +0000)]
Workaround for what looks like an OS X-specific libedit issue
Other platforms may benefit from something similar if issues arise. The
libedit library doesn't explicitly initialize the curses termcap library,
which it gets away with until TERM is set to VT100 where it stumbles over
an implementation assumption that may not exist on other platforms.
<rdar://problem/
17581929>
llvm-svn: 226891
NAKAMURA Takumi [Fri, 23 Jan 2015 01:05:12 +0000 (01:05 +0000)]
Prune an out-of-date \param since r226476. [-Wdocumentation]
llvm-svn: 226890
Jason Molenda [Fri, 23 Jan 2015 01:02:32 +0000 (01:02 +0000)]
Two fixes for compact unwind decoding for frameless large-stack-size
i386/x86_64 functions. The stack size was being multiplied by the
pointer size incorrectly. The register permutation placeholders
(UNWIND_X86_REG_NONE) were decrementing the stack offset of the
saved registers when it should not have been.
<rdar://problem/
19570035>
llvm-svn: 226889
NAKAMURA Takumi [Fri, 23 Jan 2015 01:02:07 +0000 (01:02 +0000)]
Reformat.
llvm-svn: 226888
NAKAMURA Takumi [Fri, 23 Jan 2015 01:01:52 +0000 (01:01 +0000)]
MipsAsmParser.cpp: Suppress a warning introduced in r226657. [-Wunused-variable]
llvm-svn: 226887
Jim Ingham [Fri, 23 Jan 2015 00:39:13 +0000 (00:39 +0000)]
Remove the "/" from the end of rpath paths. Having it there causes the
paths we get from dladdr to have "//" in it internally, and while that is
formally correct it is just asking for somebody to misparse it...
llvm-svn: 226886
Richard Smith [Fri, 23 Jan 2015 00:30:44 +0000 (00:30 +0000)]
Fix reference to sysroot in this test (broken in r226875).
llvm-svn: 226885
Kuba Brecka [Fri, 23 Jan 2015 00:14:22 +0000 (00:14 +0000)]
Fix the extra whitespace from r226878.
llvm-svn: 226884