Richard Smith [Fri, 18 Dec 2015 22:40:25 +0000 (22:40 +0000)]
Split RequireCompleteType into a function that actually requires that the type
is complete (with an error produced if not) and a function that merely queries
whether the type is complete. Either way we'll trigger instantiation if
necessary, but only the former will diagnose and recover from missing module
imports.
The intent of this change is to prevent a class of bugs where code would call
RequireCompleteType(..., 0) and then ignore the result. With modules, we must
check the return value and use it to determine whether the definition of the
type is visible.
This also fixes a debug info quality issue: calls to isCompleteType do not
trigger the emission of debug information for a type in limited-debug-info
mode. This allows us to avoid emitting debug information for type definitions
in more cases where we believe it is safe to do so.
llvm-svn: 256049
Rafael Espindola [Fri, 18 Dec 2015 22:23:16 +0000 (22:23 +0000)]
git-clang-format a region I am about to change.
llvm-svn: 256048
Xinliang David Li [Fri, 18 Dec 2015 22:22:12 +0000 (22:22 +0000)]
[PGO] Simplify computehash interface (NFC)
llvm-svn: 256047
Zachary Turner [Fri, 18 Dec 2015 22:20:15 +0000 (22:20 +0000)]
Support AlwaysBreakAfterReturnType
This changes the behavior of AlwaysBreakAfterDeclarationReturnType
so that it supports breaking after declarations, definitions, or
both.
Differential Revision: http://reviews.llvm.org/D10370
Reviewed By: Daniel Jasper
llvm-svn: 256046
Richard Smith [Fri, 18 Dec 2015 22:19:11 +0000 (22:19 +0000)]
[modules] Don't try to use the definition of a class if
RequireCompleteType(..., 0) says we're not permitted to do so. The definition
might not be visible, even though we know what it is.
llvm-svn: 256045
Todd Fiala [Fri, 18 Dec 2015 22:08:24 +0000 (22:08 +0000)]
remove xcshareddata exclusion from .gitignore; add desktop and lldb-python-testsuite shared schemes used by Xcode buildbot
llvm-svn: 256043
Enrico Granata [Fri, 18 Dec 2015 22:04:47 +0000 (22:04 +0000)]
Turns out, many people define structs named Point that do not share the same names that this formatter uses for fields; use the {} syntax to make it so that a failure to parse the summary doesn't cause the entire printout to fail
llvm-svn: 256042
Alexey Samsonov [Fri, 18 Dec 2015 22:02:14 +0000 (22:02 +0000)]
[Symbolize] Improve the ownership of parsed objects.
This code changes the way Symbolize handles parsed binaries: now
parsed OwningBinary<Binary> is not broken into (binary, memory buffer)
pair, and is just stored as-is in a cache. ObjectFile components
of Mach-O universal binaries are also stored explicitly in a
separate cache.
Additionally, this change:
* simplifies the code that parses/caches binaries: it's now done
in a single place, not three different functions.
* makes flush() method behave as expected, and actually clear
the cached parsed binaries and objects.
* fixes a dangling pointer issue described in
http://reviews.llvm.org/D15638
llvm-svn: 256041
Alexey Samsonov [Fri, 18 Dec 2015 22:02:08 +0000 (22:02 +0000)]
[sancov] IWYU fix: add proper header inclusion.
llvm-svn: 256040
Cong Hou [Fri, 18 Dec 2015 21:53:24 +0000 (21:53 +0000)]
Use getEdgeProbability() instead of getEdgeWeight() in BFI and remove getEdgeWeight() interfaces from MBPI.
This patch removes all getEdgeWeight() interfaces from CodeGen directory. As
getEdgeProbability() is a little more expensive than getEdgeWeight(), I will
compose a patch soon in which BPI only stores probabilities instead of edge
weights so that getEdgeProbability() will have O(1) time.
Differential revision: http://reviews.llvm.org/D15489
llvm-svn: 256039
Richard Smith [Fri, 18 Dec 2015 21:45:41 +0000 (21:45 +0000)]
Wire a SourceLocation into IsDerivedFrom and move the RequireCompleteType call
for the derived class into it. This is mostly just a cleanup, but could in
principle be a bugfix if there is some codepath that reaches here and didn't
previously require a complete type (I couldn't find any such codepath, though).
llvm-svn: 256037
Jingyue Wu [Fri, 18 Dec 2015 21:44:26 +0000 (21:44 +0000)]
[DivergenceAnalysis] fix a bug in computing influence regions
Fixes PR25864
llvm-svn: 256036
Jingyue Wu [Fri, 18 Dec 2015 21:36:30 +0000 (21:36 +0000)]
[NaryReassociate] allow candidate to have a different type
Summary:
If Candiadte may have a different type from GEP, we should bitcast or
pointer cast it to GEP's type so that the later RAUW doesn't complain.
Added a test in nary-gep.ll
Reviewers: tra, meheff
Subscribers: mcrosier, llvm-commits, jholewinski
Differential Revision: http://reviews.llvm.org/D15618
llvm-svn: 256035
Enrico Granata [Fri, 18 Dec 2015 21:35:21 +0000 (21:35 +0000)]
Add a test case that validates that my change in r255603 does the right thing
llvm-svn: 256034
Enrico Granata [Fri, 18 Dec 2015 21:25:24 +0000 (21:25 +0000)]
Add API to support retrieving the formatters category for a specific language
llvm-svn: 256033
Rafael Espindola [Fri, 18 Dec 2015 21:23:32 +0000 (21:23 +0000)]
Revert "Enhance BranchProbabilityInfo::calcUnreachableHeuristics for InvokeInst"
This reverts commit r256028.
It broke:
LLVM :: CodeGen/Mips/eh.ll
LLVM :: CodeGen/Mips/insn-zero-size-bb.ll
llvm-svn: 256032
Rafael Espindola [Fri, 18 Dec 2015 21:18:57 +0000 (21:18 +0000)]
Remove redundant argument. NFC.
llvm-svn: 256031
Jun Bum Lim [Fri, 18 Dec 2015 20:53:47 +0000 (20:53 +0000)]
Enhance BranchProbabilityInfo::calcUnreachableHeuristics for InvokeInst
When identifying blocks post-dominated by an unreachable-terminated block
in BranchProbabilityInfo, consider only the edge to the normal destination
block if the terminator is InvokeInst and let calcInvokeHeuristics() decide
edge weights for the InvokeInst.
llvm-svn: 256028
Todd Fiala [Fri, 18 Dec 2015 20:44:45 +0000 (20:44 +0000)]
Xcode build: add a lldb-python-test-suite target.
The llvm.org Green Dragon OS X lldb builder will be using this
target to run the LLDB Python test suite.
llvm-svn: 256027
Bob Wilson [Fri, 18 Dec 2015 20:37:54 +0000 (20:37 +0000)]
PIC should not be enabled by default on Darwin with -static.
r245667 changed -static so that it doesn't override an explicit -fPIC
option, but -static should still change the default for Darwin for -fno-PIC.
This matches longstanding GCC and Clang behavior on Darwin and changing it
would be disruptive, with no significant benefit.
http://reviews.llvm.org/D15455
rdar://problem/
23811045
llvm-svn: 256026
Krzysztof Parzyszek [Fri, 18 Dec 2015 20:19:30 +0000 (20:19 +0000)]
[Hexagon] Add PIC support
llvm-svn: 256025
Rafael Espindola [Fri, 18 Dec 2015 20:13:39 +0000 (20:13 +0000)]
Drop materializeAllPermanently.
This inlines materializeAll into the only caller
(materializeAllPermanently) and renames materializeAllPermanently to
just materializeAll.
llvm-svn: 256024
Chad Rosier [Fri, 18 Dec 2015 20:08:40 +0000 (20:08 +0000)]
Fix an unused variable warning from r256012.
llvm-svn: 256023
Changpeng Fang [Fri, 18 Dec 2015 20:04:28 +0000 (20:04 +0000)]
AMDGPU/SI: Test commit
Summary: This is just my first commit. Test!
Reviewers: none
Subscribers: none
Differential Revision: none
llvm-svn: 256022
Changpeng Fang [Fri, 18 Dec 2015 20:04:26 +0000 (20:04 +0000)]
Revert "AMDGPU/SI: Test commit"
This reverts commit
a493cb636e0152ad28210934a47c6c44b1437193.
llvm-svn: 256021
Changpeng Fang [Fri, 18 Dec 2015 19:57:41 +0000 (19:57 +0000)]
AMDGPU/SI: Test commit
Summary: This is just my first commit. Test!
Reviewers: none
Subscribers: none
Differential Revision: none
llvm-svn: 256020
Rafael Espindola [Fri, 18 Dec 2015 19:57:26 +0000 (19:57 +0000)]
Drop support for dematerializing.
It was only used on lib/Linker and the use was "dead" since it was used on a
function the IRMover had just moved.
llvm-svn: 256019
Alexey Samsonov [Fri, 18 Dec 2015 19:56:42 +0000 (19:56 +0000)]
[UBSan] Implement runtime suppressions (PR25066).
Summary:
Add the ability to suppress UBSan reports for files/functions/modules
at runtime. The user can now pass UBSAN_OPTIONS=suppressions=supp.txt
with the contents of the form:
signed-integer-overflow:file-with-known-overflow.cpp
alignment:function_doing_unaligned_access
vptr:shared_object_with_vptr_failures.so
Suppression categories match the arguments passed to -fsanitize=
flag (although, see below). There is no overhead if suppressions are
not provided. Otherwise there is extra overhead for symbolization.
Limitations:
1) sometimes suppressions need debug info / symbol table to function
properly (although sometimes frontend generates enough info to
do the match).
2) it's only possible to suppress recoverable UB kinds - if you've
built the code with -fno-sanitize-recover=undefined, suppressions
will not work.
3) categories are fine-grained check kinds, not groups like "undefined"
or "integer", so you can't write "undefined:file_with_ub.cc".
Reviewers: rsmith, kcc
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D15363
llvm-svn: 256018
Pete Cooper [Fri, 18 Dec 2015 19:45:38 +0000 (19:45 +0000)]
Revert "Improve DWARFDebugFrame::parse to also handle __eh_frame."
This reverts commit r256008.
Its breaking multiple buildbots, although works for me locally.
llvm-svn: 256013
Adrian Prantl [Fri, 18 Dec 2015 19:44:31 +0000 (19:44 +0000)]
Add a defensive check for a nullptr.
llvm-svn: 256012
Teresa Johnson [Fri, 18 Dec 2015 19:28:59 +0000 (19:28 +0000)]
Rename variables to reflect linker split (NFC)
Renamed variables to be more reflective of whether they are
an instance of Linker, IRLinker or ModuleLinker. Also fix a stale
comment.
llvm-svn: 256011
Eric Christopher [Fri, 18 Dec 2015 18:55:26 +0000 (18:55 +0000)]
Convert Arg, ArgList, and Option to dump() to dbgs() rather than errs().
Also add print() functions.
Patch by Justin Lebar!
llvm-svn: 256010
Eric Christopher [Fri, 18 Dec 2015 18:55:22 +0000 (18:55 +0000)]
Add a dump method for ArgList.
Patch by Justin Lebar!
llvm-svn: 256009
Pete Cooper [Fri, 18 Dec 2015 18:51:08 +0000 (18:51 +0000)]
Improve DWARFDebugFrame::parse to also handle __eh_frame.
LLVM MC has single methods which can handle the output of EH frame and DWARF CIE's and FDE's.
This code improves DWARFDebugFrame::parse to do the same for parsing.
This also allows llvm-objdump to support the --dwarf=frames option which objdump supports. This
option dumps the .eh_frame section using the new code in DWARFDebugFrame::parse.
http://reviews.llvm.org/D15535
Reviewed by Rafael Espindola.
llvm-svn: 256008
Krzysztof Parzyszek [Fri, 18 Dec 2015 18:47:27 +0000 (18:47 +0000)]
Recognize strings for Hexagon-specific variant kinds
llvm-svn: 256007
Todd Fiala [Fri, 18 Dec 2015 18:40:33 +0000 (18:40 +0000)]
mark TestGlobalVariables.py as XFAIL on OS X dwarf.
tracking bug:
https://llvm.org/bugs/show_bug.cgi?id=25872
llvm-svn: 256006
Andrew Kaylor [Fri, 18 Dec 2015 18:12:35 +0000 (18:12 +0000)]
[WinEH] Update LCSSA to handle catchswitch with handlers inside and outside a loop
Differential Revision: http://reviews.llvm.org/D15630
llvm-svn: 256005
Jun Bum Lim [Fri, 18 Dec 2015 18:08:30 +0000 (18:08 +0000)]
[AArch64] Promote loads from stores
This change promotes load instructions which directly read from stores by
replacing them with mov instructions. If the store is wider than the load,
the load will be replaced with a bitfield extract.
For example :
STRWui %W1, %X0, 1
%W0 = LDRHHui %X0, 3
becomes
STRWui %W1, %X0, 1
%W0 = UBFMWri %W1, 16, 31
llvm-svn: 256004
Teresa Johnson [Fri, 18 Dec 2015 17:51:37 +0000 (17:51 +0000)]
[ThinLTO/LTO] Don't link in unneeded metadata
Summary:
Third patch split out from http://reviews.llvm.org/D14752.
Only map in needed DISubroutine metadata (imported or otherwise linked
in functions and other DISubroutine referenced by inlined instructions).
This is supported for ThinLTO, LTO and llvm-link --only-needed, with
associated tests for each one.
Depends on D14838.
Reviewers: dexonsmith, joker.eph
Subscribers: davidxl, llvm-commits, joker.eph
Differential Revision: http://reviews.llvm.org/D14843
llvm-svn: 256003
Jonathan Peyton [Fri, 18 Dec 2015 16:19:35 +0000 (16:19 +0000)]
[STATS] Have CMake do real check for stats functionality
This change allows clang to build the stats library for every architecture
which supports __builtin_readcyclecounter(). CMake also checks for all
necessary features for stats and will error out if the platform does not
support it.
Patch by Hal Finkel and Johnny Peyton
llvm-svn: 256002
Rafael Espindola [Fri, 18 Dec 2015 16:07:17 +0000 (16:07 +0000)]
Handle archives with paths in the names.
We always create archives with just he filename as the member name, but
other archives can put a more complicated path in there.
This patches handles it by computing just the filename as we do when
adding a new member.
If storing the path is important for some reason, we should probably
have an orthogonal option for doing that and do it for both old and new
members.
Fixes pr25877.
llvm-svn: 256001
Tamas Berghammer [Fri, 18 Dec 2015 15:35:08 +0000 (15:35 +0000)]
Fix the emulation of arm strd instruction
The incorrect instruction emulation caused issues in the stack unwinding
code when strd was used to push 2 register to the stack with writeback.
llvm-svn: 256000
Rafael Espindola [Fri, 18 Dec 2015 14:06:34 +0000 (14:06 +0000)]
clang-format to reduce diff in another patch.
llvm-svn: 255999
Rafael Espindola [Fri, 18 Dec 2015 13:58:05 +0000 (13:58 +0000)]
Fix error handling in LLVMGetBitcodeModuleInContext.
It was not setting OutMessage.
llvm-svn: 255998
Kuba Brecka [Fri, 18 Dec 2015 13:52:08 +0000 (13:52 +0000)]
Revert r255996 ("[tsan] Add a DCHECK to verify __tsan_read* and __tsan_write function aren't called from ScopedInterceptor").
There are some test failures on the Linux buildbots.
llvm-svn: 255997
Kuba Brecka [Fri, 18 Dec 2015 13:08:15 +0000 (13:08 +0000)]
[tsan] Add a DCHECK to verify __tsan_read* and __tsan_write function aren't called from ScopedInterceptor
Interceptors using ScopedInteceptor should never call into user's code before the ScopedInterceptor is out of scope (and its destructor is called). Let's add a DCHECK to enforce that.
Differential Revision: http://reviews.llvm.org/D15381
llvm-svn: 255996
Kuba Brecka [Fri, 18 Dec 2015 11:16:24 +0000 (11:16 +0000)]
[tsan] Fix scoping of ScopedInteceptor in libdispatch support
Some interceptors in tsan_libdispatch_mac.cc currently wrongly use TSAN_SCOPED_INTERCEPTOR/ScopedInterceptor. Its constructor can start ignoring memory accesses, and the destructor the stops this -- however, e.g. dispatch_sync can call user's code, so the ignoring will extend to user's code as well. This is not expected and we should only limit the scope of ScopedInterceptor to TSan code. This patch introduces annotations that mark the beginning and ending of a callback into user's code.
Differential Revision: http://reviews.llvm.org/D15419
llvm-svn: 255995
Vaivaswatha Nagaraj [Fri, 18 Dec 2015 11:02:52 +0000 (11:02 +0000)]
GlobalsAA: Take advantage of ArgMemOnly, InaccessibleMemOnly and InaccessibleMemOrArgMemOnly attributes
Summary:
1. Modify AnalyzeCallGraph() to retain function info for external functions
if the function has [InaccessibleMemOr]ArgMemOnly flags.
2. When analyzing the use of a global is function parameter at a call site,
mark the callee also as modifying the global appropriately.
3. Add additional test cases.
Depends on D15499
Reviewers: hfinkel, jmolloy
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D15605
llvm-svn: 255994
Yaron Keren [Fri, 18 Dec 2015 10:30:12 +0000 (10:30 +0000)]
Replace SM.getFileEntryForID(Lexer->getFileID()) with Lexer->getFileEntry().
llvm-svn: 255993
Alexey Bataev [Fri, 18 Dec 2015 10:24:53 +0000 (10:24 +0000)]
[OPENMP] Remove explicit call for implicit barrier
#pragma omp parallel needs an implicit barrier that is currently done by an explicit call to __kmpc_barrier. However, the runtime already ensures a barrier in __kmpc_fork_call which currently leads to two barriers per region per thread.
Differential Revision: http://reviews.llvm.org/D15561
llvm-svn: 255992
Zlatko Buljan [Fri, 18 Dec 2015 08:59:37 +0000 (08:59 +0000)]
[mips][microMIPS][DSP] Implement PACKRL.PH, PICK.PH, PICK.QB, SHILO, SHILOV and WRDSP instructions
Differential Revision: http://reviews.llvm.org/D14429
llvm-svn: 255991
Alexey Bataev [Fri, 18 Dec 2015 07:58:25 +0000 (07:58 +0000)]
[OPENMP] Fix for llvm.org/PR25878: Error compiling an OpenMP program
OpenMP codegen tried to emit the code for its constructs even if it was detected as a dead-code. Added checks to ensure that the code is emitted if the code is not dead.
llvm-svn: 255990
Alexey Bataev [Fri, 18 Dec 2015 05:05:56 +0000 (05:05 +0000)]
[OPENMP 4.5] Parsing/sema analysis for 'depend(source)' clause in 'ordered' directive.
OpenMP 4.5 adds 'depend(source)' clause for 'ordered' directive to support cross-iteration dependence. Patch adds parsing and semantic analysis for this construct.
llvm-svn: 255986
Rafael Espindola [Fri, 18 Dec 2015 03:57:26 +0000 (03:57 +0000)]
Add a test for LLVMGetBitcodeModule.
llvm-svn: 255985
Philip Reames [Fri, 18 Dec 2015 03:53:28 +0000 (03:53 +0000)]
[RS4GC] Use an value handle to help isolate errors quickly
Inspired by the bug reported in 25846. Whatever we end up doing about that one, the value handle change is a generally good one since it will help catch this type of mistake more quickly.
Patch by: Manuel Jacob
llvm-svn: 255984
Rafael Espindola [Fri, 18 Dec 2015 03:04:52 +0000 (03:04 +0000)]
clang-format to reduce diff in another patch.
llvm-svn: 255981
Vedant Kumar [Fri, 18 Dec 2015 02:30:45 +0000 (02:30 +0000)]
Revert "[Option] Introduce Arg::print(raw_ostream&) and use llvm::dbgs"
This reverts commit r255977. This is part of
http://reviews.llvm.org/D15634.
llvm-svn: 255978
Vedant Kumar [Fri, 18 Dec 2015 02:27:52 +0000 (02:27 +0000)]
[Option] Introduce Arg::print(raw_ostream&) and use llvm::dbgs
llvm-svn: 255977
Jim Ingham [Fri, 18 Dec 2015 02:15:25 +0000 (02:15 +0000)]
Fix formatting for last commit.
llvm-svn: 255973
Jim Ingham [Fri, 18 Dec 2015 02:14:04 +0000 (02:14 +0000)]
Make the Language print the description of the Exception Breakpoint resolver. Also
have the breakpoint description print the precondition description if one exists.
No behavior change.
<rdar://problem/
22885189>
llvm-svn: 255972
Eric Christopher [Fri, 18 Dec 2015 01:46:52 +0000 (01:46 +0000)]
Reorganize the C API headers to improve build times.
Type specific declarations have been moved to Type.h and error handling
routines have been moved to ErrorHandling.h. Both are included in Core.h
so nothing should change for projects directly including the headers,
but transitive dependencies may be affected.
llvm-svn: 255965
Eric Fiselier [Fri, 18 Dec 2015 01:04:36 +0000 (01:04 +0000)]
Fix type in tuple test. Sorry for the noise
llvm-svn: 255944
Douglas Gregor [Fri, 18 Dec 2015 00:52:31 +0000 (00:52 +0000)]
ObjC properties: consider ownership of properties from protocols when synthesizing.
When determining whether ownership was explicitly written for a
property when it is being synthesized, also consider that the original
property might have come from a protocol. Fixes rdar://problem/
23931441.
llvm-svn: 255943
Jason Molenda [Fri, 18 Dec 2015 00:45:35 +0000 (00:45 +0000)]
The lldb side changes to go along with r255711 where a new
"thread-pcs" key is added to the T (questionmark) packet in
gdb-remote protocol so that lldb doesn't need to query the
pc values of every thread before it resumes a process.
The only odd part with this is that I'm sending the pc
values in big endian order, so we need to know the endianness
of the remote process before we can use them. All other
register values in gdb-remote protocol are sent in native-endian
format so this requirement doesn't exist. This addition is a
performance enhancement -- lldb will fall back to querying the
pc of each thread individually if it needs to -- so when
we don't have the byte order for the process yet, we don't
use these values. Practically speaking, the only way I've
been able to elicit this condition is for the first
T packet when we attach to a process.
<rdar://problem/
21963031>
llvm-svn: 255942
Eric Fiselier [Fri, 18 Dec 2015 00:36:55 +0000 (00:36 +0000)]
[libcxx] LWG2485: get() should be overloaded for const tuple&&. Patch from K-Ballo.
Review: http://reviews.llvm.org/D14839
llvm-svn: 255941
NAKAMURA Takumi [Fri, 18 Dec 2015 00:18:18 +0000 (00:18 +0000)]
BranchProbabilityTest.cpp: Suppress warnings. [-Wsign-compare]
llvm-svn: 255940
Eric Christopher [Thu, 17 Dec 2015 23:43:40 +0000 (23:43 +0000)]
Remove unused class variables.
llvm-svn: 255939
Xinliang David Li [Thu, 17 Dec 2015 23:37:30 +0000 (23:37 +0000)]
Fix typo in MSC path
llvm-svn: 255938
Richard Trieu [Thu, 17 Dec 2015 23:20:57 +0000 (23:20 +0000)]
Add a test for r255875 & r255929, comparisons on DynTypeNode wrapped QualType.
llvm-svn: 255937
Hans Wennborg [Thu, 17 Dec 2015 23:18:39 +0000 (23:18 +0000)]
[X86] Use push-pop for materializing small constants under 'minsize'
Use the 3-byte (4 with REX prefix) push-pop sequence for materializing
small constants. This is smaller than using a mov (5, 6 or 7 bytes
depending on size and REX prefix), but it's likely to be slower, so
only used for 'minsize'.
This is a follow-up to r255656.
Differential Revision: http://reviews.llvm.org/D15549
llvm-svn: 255936
Todd Fiala [Thu, 17 Dec 2015 22:42:50 +0000 (22:42 +0000)]
Revert "Disable test reruns on arm unless explicitly marked with --rerun-all-issues"
and
Revert "prevent rerun logic from kicking in on test runs including aarch64."
This reverts commits:
r255719
r255747
llvm-svn: 255935
Cong Hou [Thu, 17 Dec 2015 22:27:07 +0000 (22:27 +0000)]
[BranchProbability] Remove the restriction that known and unknown probabilities cannot coexist when being normalized.
The current BranchProbability::normalizeProbabilities() forbids known and
unknown probabilities to coexist in the list. This was once used to help
capture probability exceptions but has caused some reported build
failures (https://llvm.org/bugs/show_bug.cgi?id=25838).
This patch removes this restriction by evenly distributing the complement
of the sum of all known probabilities to unknown ones. We could still
treat this as an abnormal behavior, but it is better to emit warnings in
our future profile validator.
Differential revision: http://reviews.llvm.org/D15548
llvm-svn: 255934
Artem Belevich [Thu, 17 Dec 2015 22:25:22 +0000 (22:25 +0000)]
[CUDA] runtime wrapper header tweaks
* Pull in host-only implementations of few CUDA-specific math functions.
* #nclude <cmath> early to prevent its inclusion from CUDA headers after
they've messed with __THROW macro.
llvm-svn: 255933
Philip Reames [Thu, 17 Dec 2015 22:19:27 +0000 (22:19 +0000)]
[InstCombine] Extend peephole DSE to handle unordered atomics
This extends the same line of reasoning used in EarlyCSE w/http://reviews.llvm.org/D15352 to the DSE implementation in InstCombine.
Key points:
* We only remove unordered or simple stores.
* The loads producing values consumed by dead stores don't influence whether the store is dead.
Differential Revision: http://reviews.llvm.org/D15354
llvm-svn: 255932
JF Bastien [Thu, 17 Dec 2015 22:09:19 +0000 (22:09 +0000)]
Polish atomic pointers
Summary:
I didn't realize that we already allowed atomic load/store of pointers,
it was added in 2012 by r162146. This patch updates the documentation
and tightens the verifier by using DataLayout to make sure that the
stored size is byte-sized and power-of-two. DataLayout is also used for
integers, and while I'm here I updated the corresponding code for
cmpxchg and rmw.
See the following discussion for context and upcoming changes to
add floating-point and vector atomics:
https://groups.google.com/forum/#!topic/llvm-dev/Nh0P_E3CRoo/discussion
Reviewers: reames
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D15512
llvm-svn: 255931
Rafael Espindola [Thu, 17 Dec 2015 21:56:27 +0000 (21:56 +0000)]
Pass -m elf_x84_64 to gold invocations.
Fixes pr25868.
llvm-svn: 255930
Richard Trieu [Thu, 17 Dec 2015 21:56:22 +0000 (21:56 +0000)]
Fix r255875, use '<' instead of '==' for 'operator<'
Aaron Ballman pointed out a typo from the copy and paste in r255875. This will
preserve the strict weak ordering when comparing DynTypedNode.
llvm-svn: 255929
Matthew Simpson [Thu, 17 Dec 2015 21:29:47 +0000 (21:29 +0000)]
Revert "[AArch64] Add DAG combine for extract extend pattern"
This reverts commit r255895. The patch breaks internal tests. Reverting until a
fix is ready.
llvm-svn: 255928
Rafael Espindola [Thu, 17 Dec 2015 21:16:12 +0000 (21:16 +0000)]
Drop function that are deprecated since 2010.
These functions were deprecated in r97608.
llvm-svn: 255927
Dave Bartolomeo [Thu, 17 Dec 2015 20:54:16 +0000 (20:54 +0000)]
Test commit
llvm-svn: 255926
Dan Gohman [Thu, 17 Dec 2015 20:50:45 +0000 (20:50 +0000)]
[WebAssembly] Switch WebAssemblyMCAsmInfo.h from MCAsmInfo to MCAsmInfoELF.
llvm-svn: 255925
Vedant Kumar [Thu, 17 Dec 2015 20:49:48 +0000 (20:49 +0000)]
[docs] Motivate ninja in GettingStarted.rst
llvm-svn: 255924
Roman Gareev [Thu, 17 Dec 2015 20:47:10 +0000 (20:47 +0000)]
Fix of a comment.
llvm-svn: 255923
Roman Gareev [Thu, 17 Dec 2015 20:37:17 +0000 (20:37 +0000)]
Fix delinearization of fortran arrays
The patch fixes Bug 25759 produced by inappropriate handling of unsigned
maximum SCEV expressions by SCEVRemoveMax. Without a fix, we get an infinite
loop and a segmentation fault, if we try to process, for example,
'((-1 + (-1 * %b1)) umax {(-1 + (-1 * %yStart)),+,-1}<%.preheader>)'.
It also fixes a potential issue related to signed maximum SCEV expressions.
Tested-by: Roman Gareev <gareevroman@gmail.com>
Fixed-by: Tobias Grosser <tobias@grosser.es>
Differential Revision: http://reviews.llvm.org/D15563
llvm-svn: 255922
Sanjoy Das [Thu, 17 Dec 2015 20:28:46 +0000 (20:28 +0000)]
[SCEV] Add and use SCEVConstant::getAPInt; NFCI
llvm-svn: 255921
Weiming Zhao [Thu, 17 Dec 2015 19:53:41 +0000 (19:53 +0000)]
[InstCombine] Adding "\n" to debug output. NFC.
Summary:
[InstCombine] Adding '\n' to debug output. NFC.
Patch by Zhaoshi Zheng <zhaoshiz@codeaurora.org>
Reviewers: apazos, majnemer, weimingz
Subscribers: arsenm, llvm-commits
Differential Revision: http://reviews.llvm.org/D15403
llvm-svn: 255920
Adrian Prantl [Thu, 17 Dec 2015 19:33:56 +0000 (19:33 +0000)]
Hardcode the target in this testcase — it depends on the ABI.
This fixes a failure on Windows buildbots.
llvm-svn: 255919
Easwaran Raman [Thu, 17 Dec 2015 19:14:27 +0000 (19:14 +0000)]
Attach maximum function count to Module when using PGO mode.
This sets the maximum entry count among all functions in the program to the module using module flags. This allows the optimizer to use this information.
Differential Revision: http://reviews.llvm.org/D15163
llvm-svn: 255918
Todd Fiala [Thu, 17 Dec 2015 19:13:58 +0000 (19:13 +0000)]
ResultsFormatter: always lock on handle_event()
Some of the newer structures were not protected. Now that we have
a recursive lock, we just lock the whole handle_event() call.
llvm-svn: 255917
Chad Rosier [Thu, 17 Dec 2015 19:01:55 +0000 (19:01 +0000)]
[x86] Filecheck is case sensitive. Capitalize directives.
llvm-svn: 255916
Chad Rosier [Thu, 17 Dec 2015 18:54:42 +0000 (18:54 +0000)]
[x86] Filecheck is case sensitive. Capitalize directives.
llvm-svn: 255915
Philip Reames [Thu, 17 Dec 2015 18:50:50 +0000 (18:50 +0000)]
[EarlyCSE] DSE of atomic unordered stores
The rules for removing trivially dead stores are a lot less complicated than loads. Since we know the later store post dominates the former and the former dominates the later, unless the former has side effects other than the actual store, we can remove it. One slightly surprising thing is that we can freely remove atomic stores, even if the later one isn't atomic. There's no guarantee the atomic one was every visible.
For the moment, we don't handle DSE of ordered atomic stores. We could extend the same chain of reasoning to them, but the catch is we'd then have to model the ordering effect without a store instruction. Since our fences are a stronger than our operation orderings, simple using a fence isn't an obvious win. This arguable calls for a refinement in our fence specification, but that's (much) later work.
Differential Revision: http://reviews.llvm.org/D15352
llvm-svn: 255914
Adrian Prantl [Thu, 17 Dec 2015 18:34:37 +0000 (18:34 +0000)]
make this test less whitespace-sensitive.
llvm-svn: 255913
Adrian Prantl [Thu, 17 Dec 2015 18:25:51 +0000 (18:25 +0000)]
Rewrite test to use llvm-dwarfdump instead of checking for asm comments.
llvm-svn: 255912
Artem Belevich [Thu, 17 Dec 2015 18:12:36 +0000 (18:12 +0000)]
[CUDA] Make vtable construction aware of host/device side of CUDA compilation.
C++ emits vtables for classes that have key function present in the
current TU. While we compile CUDA the fact that key function was found
in this TU does not mean that we are going to generate code for it. E.g.
vtable for a class with host-only methods should not (and can not) be
generated on device side, because we'll never generate code for them
during device-side compilation.
This patch adds an extra CUDA-specific check during key method computation
and filters out potential key methods that are not suitable for this side
of CUDA compilation.
When we codegen vtable, entries for unsuitable methods are set to null.
Differential Revision: http://reviews.llvm.org/D15309
llvm-svn: 255911
Jonathan Peyton [Thu, 17 Dec 2015 17:27:51 +0000 (17:27 +0000)]
[STATS] Properly guard the tick_time() function and its uses
llvm-svn: 255910
Teresa Johnson [Thu, 17 Dec 2015 17:14:09 +0000 (17:14 +0000)]
[ThinLTO] Metadata linking for imported functions
Summary:
Second patch split out from http://reviews.llvm.org/D14752.
Maps metadata as a post-pass from each module when importing complete,
suturing up final metadata to the temporary metadata left on the
imported instructions.
This entails saving the mapping from bitcode value id to temporary
metadata in the importing pass, and from bitcode value id to final
metadata during the metadata linking postpass.
Depends on D14825.
Reviewers: dexonsmith, joker.eph
Subscribers: davidxl, llvm-commits, joker.eph
Differential Revision: http://reviews.llvm.org/D14838
llvm-svn: 255909
Tom Stellard [Thu, 17 Dec 2015 17:05:09 +0000 (17:05 +0000)]
AMDGPU/SI: Reserve appropriate number of sgprs for flat scratch init.
Reviewers: tstellarAMD
Subscribers: arsenm, llvm-commits
Differential Revision: http://reviews.llvm.org/D15583
Patch by: Changpeng Fang
llvm-svn: 255908
Jonathan Peyton [Thu, 17 Dec 2015 16:58:26 +0000 (16:58 +0000)]
[STATS] replace __cpuid() intrinsic with already existing __kmp_x86_cpuid() function
llvm-svn: 255907
Nicolai Haehnle [Thu, 17 Dec 2015 16:46:42 +0000 (16:46 +0000)]
AMDGPU: Fix off-by-one in SIRegisterInfo::eliminateFrameIndex
Summary:
The method insertNOPs expected the number of wait states to be passed as
parameter, while eliminateFrameIndex passed the immediate argument for the
S_NOP, leading to an off-by-one error. Rename the method to make the
meaning of its parameter clearer. The number of 4 / 5 wait states (which
is what the method has always _tried_ to do according to the comment) is
correct according to the hardware docs.
I stumbled upon this while trying to track down the cause of
https://bugs.freedesktop.org/show_bug.cgi?id=93264. While clearly needed,
this patch unfortunately does not fix that bug...
Reviewers: arsenm, tstellarAMD
Subscribers: arsenm, llvm-commits
Differential Revision: http://reviews.llvm.org/D15542
llvm-svn: 255906