Davide Italiano [Sat, 19 Dec 2015 22:09:40 +0000 (22:09 +0000)]
[llvm-objdump] Fail early if we can't parse the object header.
llvm-svn: 256108
Rafael Espindola [Sat, 19 Dec 2015 21:42:07 +0000 (21:42 +0000)]
Delete APIs that have been deprecated since 2010.
llvm-svn: 256107
Paul Robinson [Sat, 19 Dec 2015 20:04:03 +0000 (20:04 +0000)]
The PS4 baton passes.
llvm-svn: 256106
Rafael Espindola [Sat, 19 Dec 2015 20:03:23 +0000 (20:03 +0000)]
Assert that we have all use/users in the getters.
An error that is pretty easy to make is to use the lazy bitcode reader
and then do something like
if (V.use_empty())
The problem is that uses in unmaterialized functions are not accounted
for.
This patch adds asserts that all uses are known.
llvm-svn: 256105
Paul Robinson [Sat, 19 Dec 2015 19:41:48 +0000 (19:41 +0000)]
Driver part of debugger tuning.
Adds driver options named -glldb and -gsce to mean -g plus tuning for
lldb and SCE debuggers respectively; the existing -ggdb option does
the same for gdb. Existing options -ggdb0, -ggdb1 etc. unpack into
-ggdb -g<N>. (There will not be -glldb<N> or -gsce<N> options.) The
tuning gets a target-specific default in the driver, and is passed
into cc1 with the new -debugger-tuning option.
As fallout, fixes where '-gsplit-dwarf -g0' would ignore the -g0 part
on Linux.
Differential Revision: http://reviews.llvm.org/D15651
llvm-svn: 256104
Xinliang David Li [Sat, 19 Dec 2015 19:16:32 +0000 (19:16 +0000)]
[PGO] Fix build failure with MSVC
llvm-svn: 256103
JF Bastien [Sat, 19 Dec 2015 18:55:18 +0000 (18:55 +0000)]
WebAssembly: add vtable test
The test will mainly be useful to check that the .s file assembles and relocates properly because vtables reference functions in their data section.
llvm-svn: 256102
Manuel Jacob [Sat, 19 Dec 2015 18:38:42 +0000 (18:38 +0000)]
Remove unnecessary casts. NFC.
llvm-svn: 256101
Manuel Jacob [Sat, 19 Dec 2015 18:26:53 +0000 (18:26 +0000)]
Remove double blanks. NFC.
llvm-svn: 256100
Xinliang David Li [Sat, 19 Dec 2015 18:20:09 +0000 (18:20 +0000)]
Improve InstrProfSymtab test coverage
llvm-svn: 256099
Matt Arsenault [Sat, 19 Dec 2015 17:18:43 +0000 (17:18 +0000)]
SelectionDAG: Cleanup integer bin op promotion functions.
SDIV and UDIV had special handling, but this is the same handling
that min/max need.
llvm-svn: 256098
Vedant Kumar [Sat, 19 Dec 2015 09:54:27 +0000 (09:54 +0000)]
[unittests] ThreadPool: Remove redundant loop, NFC
llvm-svn: 256097
Vedant Kumar [Sat, 19 Dec 2015 09:49:09 +0000 (09:49 +0000)]
[unittests] ThreadPool: Guard updates to MainThreadReady
llvm-svn: 256096
Vedant Kumar [Sat, 19 Dec 2015 08:52:49 +0000 (08:52 +0000)]
Re-reapply "[IR] Move optional data in llvm::Function into a hungoff uselist"
Make personality functions, prefix data, and prologue data hungoff
operands of Function.
This is based on the email thread "[RFC] Clean up the way we store
optional Function data" on llvm-dev.
Thanks to sanjoyd, majnemer, rnk, loladiro, and dexonsmith for feedback!
Includes a fix to scrub value subclass data in dropAllReferences. Does not
use binary literals.
Differential Revision: http://reviews.llvm.org/D13829
llvm-svn: 256095
Vedant Kumar [Sat, 19 Dec 2015 08:48:43 +0000 (08:48 +0000)]
Revert "Reapply "[IR] Move optional data in llvm::Function into a hungoff uselist""
This reverts commit r256093.
This broke lld-x86_64-win7 because of -Werror,-Wc++1y-extensions.
llvm-svn: 256094
Vedant Kumar [Sat, 19 Dec 2015 08:29:51 +0000 (08:29 +0000)]
Reapply "[IR] Move optional data in llvm::Function into a hungoff uselist"
Make personality functions, prefix data, and prologue data hungoff
operands of Function.
This is based on the email thread "[RFC] Clean up the way we store
optional Function data" on llvm-dev.
Thanks to sanjoyd, majnemer, rnk, loladiro, and dexonsmith for feedback!
Includes a fix to scrub value subclass data in dropAllReferences.
Differential Revision: http://reviews.llvm.org/D13829
llvm-svn: 256093
Xinliang David Li [Sat, 19 Dec 2015 07:44:57 +0000 (07:44 +0000)]
[PGO] Add hash to name mapping in InstrProfSymtab
Creator and lookup interfaces are added to this symtab class.
The new interfaces will be used by InstrProf Readers and writer.
A unit test is also added for the new APIs.
llvm-svn: 256092
Vedant Kumar [Sat, 19 Dec 2015 07:30:44 +0000 (07:30 +0000)]
Revert "[IR] Move optional data in llvm::Function into a hungoff uselist"
This reverts commit r256090.
This broke llvm-clang-lld-x86_64-debian-fast.
llvm-svn: 256091
Vedant Kumar [Sat, 19 Dec 2015 07:08:56 +0000 (07:08 +0000)]
[IR] Move optional data in llvm::Function into a hungoff uselist
Make personality functions, prefix data, and prologue data hungoff
operands of Function.
This is based on the email thread "[RFC] Clean up the way we store
optional Function data" on llvm-dev.
Thanks to sanjoyd, majnemer, rnk, loladiro, and dexonsmith for feedback!
Differential Revision: http://reviews.llvm.org/D13829
llvm-svn: 256090
Simon Atanasyan [Sat, 19 Dec 2015 05:51:49 +0000 (05:51 +0000)]
[ELF] Allow target to configure ELF header flags in the output file
The patch configure ELF header flags for MIPS target. For now the flags
are hard coded. In fact they depends on ELF flags of input object files
and selected emulation.
Differential Revision: http://reviews.llvm.org/D15575
llvm-svn: 256089
Chris Bieneman [Sat, 19 Dec 2015 05:47:50 +0000 (05:47 +0000)]
Revert "[CMake] Support a simple case for bootstrap builds to generate PGO data"
This reverts commit r256069, which was an unintentional tag along on
another commit.
llvm-svn: 256088
Mehdi Amini [Sat, 19 Dec 2015 05:12:07 +0000 (05:12 +0000)]
ThreadPool unittest: reimplement concurrency test, deterministically this time.
Follow-up to r256056.
From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 256087
Kostya Serebryany [Sat, 19 Dec 2015 03:42:16 +0000 (03:42 +0000)]
[libFuzzer] deprecate -save_minimized_corpus, -merge can be used instead
llvm-svn: 256086
Kostya Serebryany [Sat, 19 Dec 2015 03:35:30 +0000 (03:35 +0000)]
[libFuzzer] split the tests to run them in parallel, remove one redundant test
llvm-svn: 256085
Keno Fischer [Sat, 19 Dec 2015 03:32:23 +0000 (03:32 +0000)]
Hopefully fix debug-info-blocks.ll test on win32 bot
llc_dwarf adds an mtriple, which forces this to use COFF, causing
the test to fail. Hopefully using regular llc without the triple
will work fine everywhere
llvm-svn: 256084
Richard Smith [Sat, 19 Dec 2015 03:12:14 +0000 (03:12 +0000)]
Test for diagnostic quality improvement in r256049.
llvm-svn: 256083
Tom Stellard [Sat, 19 Dec 2015 02:54:15 +0000 (02:54 +0000)]
AMDGPU/SI: Fix implemenation of isSourceOfDivergence() for graphics shaders
Summary:
The analysis of shader inputs was completely wrong. We were passing the
wrong index to AttributeSet::hasAttribute() and the logic for which
inputs where in SGPRs was wrong too.
Reviewers: arsenm
Subscribers: arsenm, llvm-commits
Differential Revision: http://reviews.llvm.org/D15608
llvm-svn: 256082
Kostya Serebryany [Sat, 19 Dec 2015 02:49:09 +0000 (02:49 +0000)]
[libFuzzer] make CrossOver just one of the other mutations
llvm-svn: 256081
Richard Smith [Sat, 19 Dec 2015 02:40:19 +0000 (02:40 +0000)]
Fix crash-on-invalid if a :: is followed by two or more open parentheses (and then something else).
llvm-svn: 256080
Philip Reames [Sat, 19 Dec 2015 02:38:22 +0000 (02:38 +0000)]
[RS4GC] Remove an overly strong assertion
As shown by the included test case, it's reasonable to end up with constant references during base pointer calculation. The code actually handled this case just fine, we only had the assert to help isolate problems under the belief that constant references shouldn't be present in IR generated by managed frontends. This turned out to be wrong on two fronts: 1) Manual Jacobs is working on a language with constant references, and b) we found a case where the optimizer does create them in practice.
llvm-svn: 256079
Paul Robinson [Sat, 19 Dec 2015 02:24:10 +0000 (02:24 +0000)]
Recommit CC1 part of debugger tuning; pass through setting from driver to LLVM.
Reapplies r256063, except instead of frugally re-using an LLVM enum,
we define a Clang enum, to avoid exposing too much LLVM interface.
Differential Revision: http://reviews.llvm.org/D15650
llvm-svn: 256078
Keno Fischer [Sat, 19 Dec 2015 02:02:44 +0000 (02:02 +0000)]
Clean up the processing of dbg.value in various places
Summary:
First up is instcombine, where in the dbg.declare -> dbg.value conversion,
the llvm.dbg.value needs to be called on the actual loaded value, rather
than the address (since the whole point of this transformation is to be
able to get rid of the alloca). Further, now that that's cleaned up, we
can remove a hack in the backend, that would add an implicit OP_deref if
the argument to dbg.value was an alloca. This stems from before the
existence of DIExpression and is no longer necessary since the deref can
be expressed explicitly.
Now, in order to make sure that the tests pass with this change, we need to
correct the printing of DEBUG_VALUE comments to take into account the
expression, which wasn't taken into account before.
Unfortunately, for both these changes, there were a number of incorrect
test cases (mostly the wrong number of DW_OP_derefs, but also a couple
where the test itself was broken more badly). aprantl and I have gone
through and adjusted these test case in order to make them pass with
these fixes and in some cases to make sure they're actually testing
what they are meant to test.
Reviewers: aprantl
Subscribers: dsanders
Differential Revision: http://reviews.llvm.org/D14186
llvm-svn: 256077
Eric Christopher [Sat, 19 Dec 2015 01:48:43 +0000 (01:48 +0000)]
Use a command line alias to remove the need to rewrite a subtarget
feature for command line compatibility.
llvm-svn: 256076
Matt Arsenault [Sat, 19 Dec 2015 01:46:41 +0000 (01:46 +0000)]
AMDGPU: Switch barrier intrinsics to using convergent
noduplicate prevents unrolling of small loops that happen to have
barriers in them. If a loop has a barrier in it, it is OK to duplicate
it for the unroll.
llvm-svn: 256075
Matt Arsenault [Sat, 19 Dec 2015 01:39:48 +0000 (01:39 +0000)]
Fix broken type legalization of min/max
This was using an anyext when promoting the type
when zext/sext is required.
llvm-svn: 256074
Nicolai Haehnle [Sat, 19 Dec 2015 01:36:26 +0000 (01:36 +0000)]
AMDGPU/SI: use S_MOV_B64 for larger copies in copyPhysReg
Reviewers: arsenm, tstellarAMD
Subscribers: arsenm, llvm-commits
Differential Revision: http://reviews.llvm.org/D15629
llvm-svn: 256073
Nicolai Haehnle [Sat, 19 Dec 2015 01:16:06 +0000 (01:16 +0000)]
AMDGPU: fix overlapping copies in copyPhysReg
Summary:
When copying aggregate registers within the same register class, there may
be an overlap between source and destination that forces us to do the copy
backwards.
Do the simplest possible thing that guarantees the correct order of moves
when there are overlaps, and does whatever when there is no overlap. (The
last part forces some trivial adjustments to test cases.)
Together with r255906, this fixes a VM fault in Unreal Elemental Demo.
While at it, change the generation of kill and def flags to something that
looks more reasonable. This method is used very late during compilation, so
it probably doesn't matter in practice, and to be honest, I don't know if
this change is actually correct because the semantics in connection with
aggregate registers vs. sub-registers are not clear to me.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=93264
Reviewers: arsenm, tstellarAMD
Subscribers: arsenm, llvm-commits
Differential Revision: http://reviews.llvm.org/D15622
llvm-svn: 256072
Kostya Serebryany [Sat, 19 Dec 2015 01:09:49 +0000 (01:09 +0000)]
[libFuzzer] print successfull mutations sequences
llvm-svn: 256071
Chris Bieneman [Sat, 19 Dec 2015 00:56:12 +0000 (00:56 +0000)]
[CMake] Fixing a typo in a flag
Turns out cc1's flag has 1 - not 2...
llvm-svn: 256070
Chris Bieneman [Sat, 19 Dec 2015 00:56:10 +0000 (00:56 +0000)]
[CMake] Support a simple case for bootstrap builds to generate PGO data
Summary:
This patch adds support for the clang multi-stage bootstrapping to support PGO profdata generation, and can build a 2 or 3 stage compiler.
With this patch applied you can configure your build directory with the following invocation of CMake:
cmake -G <generator> -C <path_to_clang>/cmake/caches/PGO.cmake <source dir>
After configuration the following additional targets will be generated:
stage2-instrumented:
Builds a stage1 x86 compiler, runtime, and required tools (llvm-config, llvm-profdata) then uses that compiler to build an instrumented stage2 compiler.
stage2-instrumented-generate-profdata:
Depends on "stage2-instrumented" and will use the instrumented compiler to generate profdata based on the training files in <clang>/utils/perf-training
stage2:
Depends on "stage2-instrumented-generate-profdata" and will use the stage1 compiler with the stage2 profdata to build a PGO-optimized compiler.
stage2-check-llvm:
Depends on stage2 and runs check-llvm using the stage3 compiler.
stage2-check-clang:
Depends on stage2 and runs check-clang using the stage3 compiler.
stage2-check-all:
Depends on stage2 and runs check-all using the stage3 compiler.
stage2-test-suite:
Depends on stage2 and runs the test-suite using the stage3 compiler (requires in-tree test-suite).
Reviewers: bogner, silvas, chandlerc
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D15584
llvm-svn: 256069
James Y Knight [Sat, 19 Dec 2015 00:53:22 +0000 (00:53 +0000)]
Possibly fix MSVC compilation after r256054.
I don't have any way to test MSVC compilation, but maybe this will fix
the error:
llvm/Support/TrailingObjects.h(286) : error C3210: 'TrailingObjectsBase' : access declaration can only be applied to a base class member
llvm/Support/TrailingObjects.h(337) : see reference to class template instantiation 'llvm::TrailingObjects<BaseTy,TrailingTys...>' being compiled
llvm/Support/TrailingObjects.h(286) : error C2602: 'llvm::trailing_objects_internal::TrailingObjectsBase::OverloadToken' is not a member of a base class of 'llvm::TrailingObjects<BaseTy,TrailingTys...>'
llvm/Support/TrailingObjects.h(91) : see declaration of 'llvm::trailing_objects_internal::TrailingObjectsBase::OverloadToken'
llvm-svn: 256068
Siva Chandra [Sat, 19 Dec 2015 00:52:29 +0000 (00:52 +0000)]
[TestCPPAuto] On linux, we need -fno-limit-debug-info.
Summary: Also xfailed for GCC as there is an problem with debug info generation.
Reviewers: granata.enrico
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D15657
llvm-svn: 256067
Paul Robinson [Sat, 19 Dec 2015 00:23:11 +0000 (00:23 +0000)]
Revert r256063, it's killing clang-tools-extra
llvm-svn: 256066
Rafael Espindola [Fri, 18 Dec 2015 23:46:42 +0000 (23:46 +0000)]
Deprecate a few C APIs.
This deprecates:
* LLVMParseBitcode
* LLVMParseBitcodeInContext
* LLVMGetBitcodeModuleInContext
* LLVMGetBitcodeModule
They are replaced with the functions with a 2 suffix which do not record
a diagnostic.
llvm-svn: 256065
Pete Cooper [Fri, 18 Dec 2015 23:43:17 +0000 (23:43 +0000)]
Regenerated test according to the example assembly at the top. NFC.
The assembly at the top of this file contained more relocations than
the YAML. I regenerated it so that we'd have complete relocation testing.
Also added detailed explanations of the relocations in the file so that
future people don't have to try decode them when something goes wrong.
llvm-svn: 256064
Paul Robinson [Fri, 18 Dec 2015 23:41:11 +0000 (23:41 +0000)]
CC1 part of debugger tuning; pass through setting from driver to LLVM.
Differential Revision: http://reviews.llvm.org/D15650
llvm-svn: 256063
Todd Fiala [Fri, 18 Dec 2015 23:22:15 +0000 (23:22 +0000)]
Xcode: remove --test-subdir test reduction from previous check-in
That was not meant to go in, as it was for testing my last change.
llvm-svn: 256062
Jonathan Peyton [Fri, 18 Dec 2015 23:20:36 +0000 (23:20 +0000)]
Prevent monitor thread creation when KMP_BLOCKTIME="infinite"
When users sets envirable KMP_BLOCKTIME to "infinite" (the time one busy-waits
at barrieres, etc.), the monitor thread is not useful and can be ignored. This
change prevents the creation of the monitor thread when the users sets
KMP_BLOCKTIME to "infinite".
Differential Revision: http://reviews.llvm.org/D15628
llvm-svn: 256061
Jonathan Peyton [Fri, 18 Dec 2015 23:15:35 +0000 (23:15 +0000)]
Remove some extra spaces
llvm-svn: 256060
Todd Fiala [Fri, 18 Dec 2015 23:12:19 +0000 (23:12 +0000)]
Xcode build: pass in vt100 to the Python test runner.
Some of the Green Dragon tests were failing because they didn't
have a TERM set.
llvm-svn: 256059
Xinliang David Li [Fri, 18 Dec 2015 23:06:37 +0000 (23:06 +0000)]
[PGO] Cleanup: Move large member functions out of line (NFC)
llvm-svn: 256058
Chris Bieneman [Fri, 18 Dec 2015 23:00:57 +0000 (23:00 +0000)]
[CMake] PGO training data
Adding in a few more lit substitutions for cc1 and the test exec path.
llvm-svn: 256057
Teresa Johnson [Fri, 18 Dec 2015 22:59:35 +0000 (22:59 +0000)]
Remove possibility of failures to due race in ThreadPool unittest
Remove all checks that required main thread to run faster than tasks in
ThreadPool, and yields which are now unnecessary. This should fix some
bot failures.
llvm-svn: 256056
Zachary Turner [Fri, 18 Dec 2015 22:58:42 +0000 (22:58 +0000)]
Fix invalid enum comparison.
llvm-svn: 256055
James Y Knight [Fri, 18 Dec 2015 22:54:37 +0000 (22:54 +0000)]
Rewrite the TrailingObjects template to provide two new features:
- Automatic alignment of the base type for the alignment requirements
of the trailing types.
- Support for an arbitrary numbers of trailing types, instead of only
1 or 2, by using a variadic template implementation.
Upcoming commits to clang will take advantage of both of these features.
Differential Revision: http://reviews.llvm.org/D12439
llvm-svn: 256054
Enrico Granata [Fri, 18 Dec 2015 22:46:58 +0000 (22:46 +0000)]
__ne__ is the actual Python operator; __neq__ is a typo
llvm-svn: 256053
Rafael Espindola [Fri, 18 Dec 2015 22:44:07 +0000 (22:44 +0000)]
Delete dead code: only functions are materializable.
llvm-svn: 256052
Enrico Granata [Fri, 18 Dec 2015 22:41:25 +0000 (22:41 +0000)]
Add support for seeing through clang::AutoType in ClangASTContext
This allows LLDB to deal correctly with expression result variables declared via the C++11 'auto' keyword
rdar://problem/
23960490
llvm-svn: 256051
Rafael Espindola [Fri, 18 Dec 2015 22:40:27 +0000 (22:40 +0000)]
Use a lambda to reduce code duplication.
llvm-svn: 256050
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