Sean Silva [Wed, 9 Mar 2016 22:30:05 +0000 (22:30 +0000)]
[lto] Add saving the LTO .o file to -save-temps.
Summary:
This implements another part of -save-temps.
After this, the only remaining part is dumping the optimized bitcode. But
currently LLD's LTO doesn't have a non-intrusive place to put this.
Eventually we probably will and it will make sense to add it then.
Reviewers: ruiu, rafael
Subscribers: joker.eph, Bigcheese, llvm-commits
Differential Revision: http://reviews.llvm.org/D18009
llvm-svn: 263070
Sanjay Patel [Wed, 9 Mar 2016 22:23:33 +0000 (22:23 +0000)]
[x86] fix cost model inaccuracy for vector memory ops
The irony of this patch is that one CPU that is affected is AMD Jaguar, and Jaguar
has a completely double-pumped AVX implementation. But getting the cost model to
reflect that is a much bigger problem. The small goal here is simply to improve on
the lie that !AVX2 == SandyBridge.
Differential Revision: http://reviews.llvm.org/D18000
llvm-svn: 263069
Derek Schuff [Wed, 9 Mar 2016 22:14:33 +0000 (22:14 +0000)]
[WebAssembly] Update known gcc test failures
llvm-svn: 263068
Sanjay Patel [Wed, 9 Mar 2016 22:12:08 +0000 (22:12 +0000)]
[x86, AVX] optimize masked loads with constant masks
Instead of a variable-blend instruction, form a blend with immediate because those are always cheaper.
Differential Revision: http://reviews.llvm.org/D17899
llvm-svn: 263067
Ted Woodward [Wed, 9 Mar 2016 22:05:17 +0000 (22:05 +0000)]
Fix "ninja check-lldb" crash in IRExecutionUnit.cpp
Summary:
From Adrian McCarthy:
"Running ninja check-lldb now has one crash in a Python process, due to deferencing a null pointer in IRExecutionUnit.cpp: candidate_sc.symbol is null, which leads to a call with a null this pointer."
Reviewers: zturner, spyffe, amccarth
Subscribers: ted, jingham, lldb-commits
Differential Revision: http://reviews.llvm.org/D17860
llvm-svn: 263066
Xinliang David Li [Wed, 9 Mar 2016 21:45:37 +0000 (21:45 +0000)]
Fix test failure on darwin-i386
llvm-svn: 263065
Jan Vesely [Wed, 9 Mar 2016 21:38:04 +0000 (21:38 +0000)]
ELF: link with BitWriter module
Fixes build broken by r263055.
llvm-svn: 263064
Rafael Espindola [Wed, 9 Mar 2016 21:37:22 +0000 (21:37 +0000)]
ELF: Remove non-standard ELF features from AMDGPU target.
Patch by Tom Stellard!
llvm-svn: 263063
Philip Reames [Wed, 9 Mar 2016 21:31:47 +0000 (21:31 +0000)]
[ValueTracking] Extract isKnownPositive [NFCI]
Extract out a generic interface from a recently landed patch and document a TODO in case compile time becomes a problem.
llvm-svn: 263062
Rui Ueyama [Wed, 9 Mar 2016 21:15:17 +0000 (21:15 +0000)]
Simplify. NFC.
In this context, MBRef.getBufferIdentifier() == Path.
llvm-svn: 263061
Davide Italiano [Wed, 9 Mar 2016 21:09:51 +0000 (21:09 +0000)]
[modules] Simplify code logic. NFC.
llvm-svn: 263060
Philip Reames [Wed, 9 Mar 2016 21:05:07 +0000 (21:05 +0000)]
[InstCombine] (icmp sgt smin(PosA, B) 0) -> (icmp sgt B 0)
When checking whether an smin is positive, we can move the comparison to one of the inputs if the other is known positive. If the known positive one is the min, then the other can't be negative. If the other is the min, then we compute the min.
Differential Revision: http://reviews.llvm.org/D17873
llvm-svn: 263059
Adam Nemet [Wed, 9 Mar 2016 20:47:55 +0000 (20:47 +0000)]
[LLE] Add missing check for unit stride
I somehow missed this. The case in GCC (global_alloc) was similar to
the new testcase except it had an array of structs rather than a two
dimensional array.
Fixes RP26885.
llvm-svn: 263058
Sean Silva [Wed, 9 Mar 2016 20:06:24 +0000 (20:06 +0000)]
Update for Rui's comments on D18006
Somehow I missed them.
llvm-svn: 263057
Tim Northover [Wed, 9 Mar 2016 20:06:10 +0000 (20:06 +0000)]
ARM & AArch64: fix IR-converted tests.
My script was converting %a0 to [[A]]0 if it had seen %a defined before %a0.
Oops.
llvm-svn: 263056
Sean Silva [Wed, 9 Mar 2016 20:01:08 +0000 (20:01 +0000)]
[lto] Add beginning of -save-temps option.
Summary:
This is useful for debugging issues with LTO.
The option follows the analogous option in ld64 and the gold plugin (per
Rafael's suggestion).
For starters, this only dumps the combined bitcode file.
In a future patch I will add dumping for the .o file.
The naming of the output follows ld64's convention which is slightly more
consistent IMO (consistent `.lto.<extension>` for all the files).
Reviewers: rafael, ruiu
Subscribers: joker.eph, Bigcheese, llvm-commits
Differential Revision: http://reviews.llvm.org/D18006
llvm-svn: 263055
Evandro Menezes [Wed, 9 Mar 2016 19:56:38 +0000 (19:56 +0000)]
[AArch64] Minor reformatting (NFC).
llvm-svn: 263054
Dmitry Polukhin [Wed, 9 Mar 2016 19:39:16 +0000 (19:39 +0000)]
NFC fix documentation build by rL263015
This time I hope it will fix the build for real.
llvm-svn: 263052
Kit Barton [Wed, 9 Mar 2016 19:28:31 +0000 (19:28 +0000)]
[PPC] FE support for generating VSX [negated] absolute value instructions
Includes new built-in, conversion of built-in to target-independent intrinsic
and update in the header file. Tests are also updated. There is a second part in
the backend for which I will post a separate code-review. BACKEND PART SHOULD BE
COMMITTED FIRST.
Phabricator: http://reviews.llvm.org/D17816
llvm-svn: 263051
Hemant Kulkarni [Wed, 9 Mar 2016 19:16:13 +0000 (19:16 +0000)]
[llvm-readobj] Enable GNU style section group print
Differential Revision: http://reviews.llvm.org/D17822
llvm-svn: 263050
Jim Ingham [Wed, 9 Mar 2016 18:59:13 +0000 (18:59 +0000)]
Add an "offset" option to "break set -n" and "break set -f -l".
That way you can set offset breakpoints that will move as the function they are
contained in moves (which address breakpoints can't do...)
I don't align the new address to instruction boundaries yet, so you have to get
this right yourself for now.
<rdar://problem/
13365575>
llvm-svn: 263049
Tim Northover [Wed, 9 Mar 2016 18:54:42 +0000 (18:54 +0000)]
ARM & AArch64: convert asm tests to LLVM IR and restrict optimizations.
This is mostly a one-time autoconversion of tests that checked assembly after
"-Owhatever" compiles to only run "opt -mem2reg" and check the assembly. This
should make them much more stable to changes in LLVM so they won't break on
unrelated changes.
"opt -mem2reg" is a compromise designed to increase the readability of tests
that check dataflow, while minimizing dependency on LLVM. Hopefully mem2reg is
stable enough that no surpises will come along.
Should address http://llvm.org/PR26815.
llvm-svn: 263048
Matthias Braun [Wed, 9 Mar 2016 18:47:11 +0000 (18:47 +0000)]
InstCombine: Restrict computeKnownBits() on all Values to OptLevel > 2
As part of r251146 InstCombine was extended to call computeKnownBits on
every value in the function to determine whether it happens to be
constant. This increases typical compiletime by 1-3% (5% in irgen+opt
time) in my measurements. On the other hand this case did not trigger
once in the whole llvm-testsuite.
This patch introduces the notion of ExpensiveCombines which are only
enabled for OptLevel > 2. I removed the check in InstructionSimplify as
that is called from various places where the OptLevel is not known but
given the rarity of the situation I think a check in InstCombine is
enough.
Differential Revision: http://reviews.llvm.org/D16835
llvm-svn: 263047
Matthias Braun [Wed, 9 Mar 2016 18:47:05 +0000 (18:47 +0000)]
MachineRegisterInfo: Correct comment
llvm-svn: 263046
Sean Silva [Wed, 9 Mar 2016 18:38:40 +0000 (18:38 +0000)]
[lto] Don't lazy load metadata for now.
Summary:
At the very least we hit
Assertion failed: (((Flags & RF_HaveUnmaterializedMetadata) || Node->isResolved()) && "Unexpected unresolved node"), function MapMetadataImpl, file /Users/Sean/pg/llvm/lib/Transforms/Utils/ValueMapper.cpp, line 375.
on the included test case.
We currently do things like parse the module twice to keep the
implementation minimal. I think it makes sense to add start with eager
loading for similar reasons.
Reviewers: rafael
Subscribers: ruiu, Bigcheese, llvm-commits, joker.eph
Differential Revision: http://reviews.llvm.org/D17982
llvm-svn: 263045
Chris Dewhurst [Wed, 9 Mar 2016 18:20:21 +0000 (18:20 +0000)]
This change adds co-processor condition branching and conditional traps to the Sparc back-end.
This will allow inline assembler code to utilize these features, but no automatic lowering is provided, except for the previously provided @llvm.trap, which lowers to "ta 5".
The change also separates out the different assembly language syntaxes for V8 and V9 Sparc. Previously, only V9 Sparc assembly syntax was provided.
The change also corrects the selection order of trap disassembly, allowing, e.g. "ta %g0 + 15" to be rendered, more readably, as "ta 15", ignoring the %g0 register. This is per the sparc v8 and v9 manuals.
Check-in includes many extra unit tests to check this works correctly on both V8 and V9 Sparc processors.
Code Reviewed at http://reviews.llvm.org/D17960.
llvm-svn: 263044
Marshall Clow [Wed, 9 Mar 2016 18:09:07 +0000 (18:09 +0000)]
Update status to mark 2579 complete
llvm-svn: 263043
Marshall Clow [Wed, 9 Mar 2016 18:08:29 +0000 (18:08 +0000)]
Implement LWG#2579: Inconsistency wrt Allocators in basic_string assignment vs. basic_string::assign
llvm-svn: 263042
Aaron Ballman [Wed, 9 Mar 2016 18:07:17 +0000 (18:07 +0000)]
Use an explicit instantiation to work around delayed template parsing for MSVC-built bots.
llvm-svn: 263041
George Rimar [Wed, 9 Mar 2016 18:05:34 +0000 (18:05 +0000)]
Fixed "not all control paths return a value" warning. NFC.
llvm-svn: 263040
George Rimar [Wed, 9 Mar 2016 18:01:45 +0000 (18:01 +0000)]
[ELF] - Issue an error if trying to link object that uses splitstacks.
Each object file compiled in split stack mode will have an empty
section with a special name: .note.GNU-split-stack
We don't support this in linker now, so patch just adds an error out for that.
Differential revision: http://reviews.llvm.org/D17918
llvm-svn: 263039
Tim Northover [Wed, 9 Mar 2016 18:00:06 +0000 (18:00 +0000)]
AArch64: remove a couple more tests already covered elsewhere.
llvm-svn: 263038
Sanjay Patel [Wed, 9 Mar 2016 17:53:28 +0000 (17:53 +0000)]
add a test RUN to show unexpected behavior
llvm-svn: 263037
Marshall Clow [Wed, 9 Mar 2016 17:51:43 +0000 (17:51 +0000)]
Implement LWG#2583: There is no way to supply an allocator for basic_string(str, pos)
llvm-svn: 263036
Kit Barton [Wed, 9 Mar 2016 17:48:01 +0000 (17:48 +0000)]
[PPC] backend changes to generate xvabs[s,d]p and xvnabs[s,d]p instructions
This has to be committed before the FE changes
Phabricator: http://reviews.llvm.org/D17837
llvm-svn: 263035
Aaron Ballman [Wed, 9 Mar 2016 17:34:16 +0000 (17:34 +0000)]
Speculative fix for this test case (the test doesn't run on my typical build environment).
llvm-svn: 263034
Adrian Prantl [Wed, 9 Mar 2016 17:32:56 +0000 (17:32 +0000)]
Don't crash when compiling inline assembler containing .file directives.
Removing the assertion is safe to do because any module level inline
assembly is always emitted first via AsmPrinter::doInitialization().
http://reviews.llvm.org/D16101
rdar://
22690666
llvm-svn: 263033
Chad Rosier [Wed, 9 Mar 2016 17:29:48 +0000 (17:29 +0000)]
[AArch64] Move helper functions into TII, so they can be reused elsewhere. NFC.
llvm-svn: 263032
Hans Wennborg [Wed, 9 Mar 2016 17:26:46 +0000 (17:26 +0000)]
ReleaseNotes: update 'you may prefer' link to 3.8
llvm-svn: 263031
Hans Wennborg [Wed, 9 Mar 2016 17:25:34 +0000 (17:25 +0000)]
ReleaseNotes: update 'you may prefer' link to 3.8
llvm-svn: 263030
Marshall Clow [Wed, 9 Mar 2016 17:19:07 +0000 (17:19 +0000)]
Add some more tests for the containers type requirements
llvm-svn: 263029
Xinliang David Li [Wed, 9 Mar 2016 17:13:18 +0000 (17:13 +0000)]
Fix a minor bug in test
llvm-svn: 263028
Aaron Ballman [Wed, 9 Mar 2016 17:11:51 +0000 (17:11 +0000)]
Adding new AST matchers for: addrLabelExpr, atomicExpr, binaryConditionalOperator, designatedInitExpr, designatorCountIs, hasSyntacticForm, implicitValueInitExpr, labelDecl, opaqueValueExpr, parenListExpr, predefinedExpr, requiresZeroInitialization, and stmtExpr.
Patch by Aleksei Sidorin.
llvm-svn: 263027
Valery Pykhtin [Wed, 9 Mar 2016 17:08:19 +0000 (17:08 +0000)]
[AMDGPU] add AMDGPU target support to ELFObjectFile.h header
Differential Revision: http://reviews.llvm.org/D17144
llvm-svn: 263026
Aaron Ballman [Wed, 9 Mar 2016 16:48:08 +0000 (16:48 +0000)]
Implement support for [[maybe_unused]] in C++1z that is based off existing support for unused, and treat it as an extension pre-C++1z. This also means extending the existing unused attribute so that it can be placed on an enum and enumerator, in addition to the other subjects.
llvm-svn: 263025
Chad Rosier [Wed, 9 Mar 2016 16:46:48 +0000 (16:46 +0000)]
[AArch64] Minor cleanup/remove redundant code. NFC.
llvm-svn: 263024
Dmitry Polukhin [Wed, 9 Mar 2016 16:19:04 +0000 (16:19 +0000)]
NFC fix documentation build by rL263015
llvm-svn: 263023
Tom Stellard [Wed, 9 Mar 2016 16:02:52 +0000 (16:02 +0000)]
SelectionDAG: Fix a crash on inline asm when output register supports multiple types
Summary:
The code in SelectionDAG did not handle the case where the
register type and output types were different, but had the same size.
Reviewers: arsenm, echristo
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D17940
llvm-svn: 263022
Chad Rosier [Wed, 9 Mar 2016 16:00:35 +0000 (16:00 +0000)]
[TII] Allow getMemOpBaseRegImmOfs() to accept negative offsets. NFC.
http://reviews.llvm.org/D17967
llvm-svn: 263021
Ben Craig [Wed, 9 Mar 2016 15:49:59 +0000 (15:49 +0000)]
Split locale management out of locale_win32. NFCI
For the locale refactor, the locale management functions (newlocale,
freelocale, uselocale) are needed in a separate header from the various _l
functions. This is because some platforms implement the _l functions in terms
of a locale switcher RAII helper, and the locale switcher RAII helper needs
the locale management functions. This patch helps pave the way by getting all
the functions in the right files, so that later diffs aren't completely
horrible.
Unfortunately, the Windows, Cygwin, and MinGW builds seemed to have
bit-rotted, so I wasn't able to test this completely. I don't think I made
things any worse than they already are though.
http://reviews.llvm.org/D17419
llvm-svn: 263020
Samuel Antao [Wed, 9 Mar 2016 15:46:05 +0000 (15:46 +0000)]
[OpenMP] Add support for multidimensional array sections in map clause SEMA.
Summary: In some cases it can be proved statically that multidimensional array section refer to contiguous storage and can therefore be allowed in a map clause. This patch adds support for those cases in SEMA.
Reviewers: hfinkel, carlo.bertolli, arpith-jacob, kkwli0, ABataev
Subscribers: cfe-commits, fraggamuffin, caomhin
Differential Revision: http://reviews.llvm.org/D17547
llvm-svn: 263019
Filipe Cabecinhas [Wed, 9 Mar 2016 15:39:49 +0000 (15:39 +0000)]
[test/sanitizer-common] Linux/sanitizer_set_death_callback_test.cc -> Posix/sanitizer_set_death_callback_test.cc
llvm-svn: 263018
Filipe Cabecinhas [Wed, 9 Mar 2016 15:39:43 +0000 (15:39 +0000)]
[test/sanitizer-common] Move getpass.cc from Linux into Posix
llvm-svn: 263017
Ben Craig [Wed, 9 Mar 2016 15:39:39 +0000 (15:39 +0000)]
Reorganize _LIBCPP_LOCALE__L_EXTENSIONS
Instead of checking _LIBCPP_LOCALE_L_EXTENSIONS all over, instead check it
once, and define the various *_l symbols once. The private redirector symbol
names are all prefixed with _libcpp_* so that they won't conflict with user
symbols, and so they won't conflict with future C library symbols. In
particular, glibc likes providing private symbols such as __locale_t, so we
should follow a different naming pattern (like _libcpp_*) to avoid problems
on that front.
Tested on Linux with glibc. Hoping for the best on OSX and the various BSDs.
http://reviews.llvm.org/D17456
llvm-svn: 263016
Dmitry Polukhin [Wed, 9 Mar 2016 15:30:53 +0000 (15:30 +0000)]
[GCC] PR23529 Sema part of attrbute abi_tag support
Original patch by Stefan Bühler http://reviews.llvm.org/D12834
Difference between original and this one:
- fixed all comments in original code review
- added more tests, all new diagnostics now covered by tests
- moved abi_tag on re-declaration checks to Sema::mergeDeclAttributes
where they actually may work as designed
- clang-format + other stylistic changes
Mangle part will be sent for review as a separate patch.
Differential Revision: http://reviews.llvm.org/D17567
llvm-svn: 263015
Teresa Johnson [Wed, 9 Mar 2016 14:58:23 +0000 (14:58 +0000)]
Fix build error due to unsigned compare >= 0 in r263008 (NFC)
Fixes error from building with clang:
/usr/local/google/home/tejohnson/llvm/llvm_15/lib/Target/AMDGPU/InstPrinter/AMDGPUInstPrinter.cpp:407:12:
error: comparison of unsigned expression >= 0 is always true
[-Werror,-Wtautological-compare]
if ((Imm >= 0x000) && (Imm <= 0x0ff)) {
~~~ ^ ~~~~~
llvm-svn: 263014
Rafael Espindola [Wed, 9 Mar 2016 14:31:18 +0000 (14:31 +0000)]
Simplify: SHN_ABS is >= SHN_LORESERVE.
llvm-svn: 263012
Petar Jovanovic [Wed, 9 Mar 2016 14:12:47 +0000 (14:12 +0000)]
Reland r262337 "calculate builtin_object_size if arg is a removable pointer"
Original commit message:
calculate builtin_object_size if argument is a removable pointer
This patch fixes calculating correct value for builtin_object_size function
when pointer is used only in builtin_object_size function call and never
after that.
Patch by Strahinja Petrovic.
Differential Revision: http://reviews.llvm.org/D17337
Reland the original change with a small modification (first do a null check
and then do the cast) to satisfy ubsan.
llvm-svn: 263011
Logan Chien [Wed, 9 Mar 2016 13:20:17 +0000 (13:20 +0000)]
Add ARM EHABI support to gcc_personality_v0.
Until now the only exception APIs supported by gcc_personality_v0
are DWARF EH and SJLJ. This adds support for ARM EHABI as well.
This is achieved by
a) changing the function signature on ARM EHABI,
b) unwinding the stack before returning _URC_CONTINUE_UNWIND.
See "Exception Handling ABI for the ARM Architecture" for details
(http://infocenter.arm.com/help/topic/com.arm.doc.ihi0038b/IHI0038B_ehabi.pdf).
Patch by Timon Van Overveldt.
llvm-svn: 263010
Silviu Baranga [Wed, 9 Mar 2016 12:39:06 +0000 (12:39 +0000)]
Update comments following the addition of PredicatedScalarEvolution. NFC.
We changed several functions in LoopAccessAnalysis to use PSE instead of
taking SE and a SCEV predicate as arguments, but didn't update the comments.
This also fixes a comment in ScalarEvolution, where we refered to Preds
when the argument name was A.
llvm-svn: 263009
Sam Kolton [Wed, 9 Mar 2016 12:29:31 +0000 (12:29 +0000)]
[AMDGPU] Assembler: Support DPP instructions.
Supprot DPP syntax as used in SP3 (except several operands syntax).
Added dpp-specific operands in td-files.
Added DPP flag to TSFlags to determine if instruction is dpp in InstPrinter.
Support for VOP2 DPP instructions in td-files.
Some tests for DPP instructions.
ToDo:
- VOP2bInst:
- vcc is considered as operand
- AsmMatcher doesn't apply mnemonic aliases when parsing operands
- v_mac_f32
- v_nop
- disable instructions with 64-bit operands
- change dpp_ctrl assembler representation to conform sp3
Review: http://reviews.llvm.org/D17804
llvm-svn: 263008
Michael Zuckerman [Wed, 9 Mar 2016 11:26:45 +0000 (11:26 +0000)]
Fixing wrong header title name.
Differential Revision: http://reviews.llvm.org/D17917
llvm-svn: 263007
Nikolay Haustov [Wed, 9 Mar 2016 11:03:21 +0000 (11:03 +0000)]
[AMDGPU] Assembler: Support abs() syntax.
Support legacy SP3 abs(v1) syntax. InstPrinter still uses |v1|.
Add tests.
Differential Revision: http://reviews.llvm.org/D17887
llvm-svn: 263006
Nikolay Haustov [Wed, 9 Mar 2016 10:56:19 +0000 (10:56 +0000)]
[AMDGPU] Assembler: Fix s_setpc_b64
s_setpc_b64 has just one 64-bit source which is the address of instruction to jump to.
Differential Revision: http://reviews.llvm.org/D17888
llvm-svn: 263005
Manuel Klimek [Wed, 9 Mar 2016 10:06:45 +0000 (10:06 +0000)]
Pacify gcc's parenthesis warning, which doesn't realize that parens don't matter here.
llvm-svn: 263004
Alexey Bataev [Wed, 9 Mar 2016 09:49:09 +0000 (09:49 +0000)]
[OPENMP 4.5] Codegen for data members in 'linear' clause
OpenMP 4.5 allows privatization of non-static data members in OpenMP
constructs. Patch adds proper codegen support for data members in
'linear' clause
llvm-svn: 263003
Alexey Bataev [Wed, 9 Mar 2016 09:49:00 +0000 (09:49 +0000)]
[OPENMP 4.5] Codegen for data members in 'linear' clause.
OpenMP 4.5 allows to use data members in private clauses. Patch adds
codegen support for 'linear' clause.
llvm-svn: 263002
Mohit K. Bhakkad [Wed, 9 Mar 2016 08:00:37 +0000 (08:00 +0000)]
[DFSan] Fix test_inet_pton for big endian archs
Reviewers: samsonov
Subscribers: ed, jaydeep, sagar, llvm-commits
Differential Revision: http://reviews.llvm.org/D17751
llvm-svn: 263001
Mohit K. Bhakkad [Wed, 9 Mar 2016 07:57:20 +0000 (07:57 +0000)]
[Compiler-rt][MIPS] Defining macros for MIPS archs
Reviewers: samsonov
Subscribers: filcab, jaydeep, sagar, llvm-commits
Differential Revision: http://reviews.llvm.org/D17881
llvm-svn: 263000
Richard Trieu [Wed, 9 Mar 2016 06:31:25 +0000 (06:31 +0000)]
Fix uninitialized member bool. Detected by ASan.
llvm-svn: 262999
Adam Nemet [Wed, 9 Mar 2016 05:33:21 +0000 (05:33 +0000)]
[LoopDataPrefetch] Add stats and debug output
llvm-svn: 262998
Adam Nemet [Wed, 9 Mar 2016 05:33:19 +0000 (05:33 +0000)]
[LAA] Improve comment for isStridedPtr
llvm-svn: 262997
Peter Zotov [Wed, 9 Mar 2016 05:18:16 +0000 (05:18 +0000)]
Accept absolute paths in the -fuse-ld option.
This patch extends the -fuse-ld option to accept a full path to an executable
and use it verbatim to invoke the linker. There are generally two reasons
to desire this.
The first reason relates to the sad truth is that Clang is retargetable,
Binutils are not.
While any Clang from a binary distribution is sufficient to compile code
for a wide range of architectures and prefixed BFD linkers (e.g.
installed as /usr/bin/arm-none-linux-gnueabi-ld) as well as cross-compiled
libc's (for non-bare-metal targets) are widely available, including on all
Debian derivatives, it is impossible to use them together because
the -fuse-ld= option allows to specify neither a linker prefix nor
a full path to one.
The second reason is linker development, both when porting existing linkers
to new architectures and when working on a new linker such as LLD.
Differential Revision: http://reviews.llvm.org/D17952
llvm-svn: 262996
Dan Gohman [Wed, 9 Mar 2016 04:17:36 +0000 (04:17 +0000)]
[WebAssembly] Update comments about irreducible control flow.
llvm-svn: 262995
Sean Silva [Wed, 9 Mar 2016 04:05:28 +0000 (04:05 +0000)]
Use lto_bool_t instead of a raw `bool` (fixup for r262977).
Hopefully this should bring
llvm-clang-lld-x86_64-scei-ps4-windows10pro-fast back to life.
llvm-svn: 262994
Mehdi Amini [Wed, 9 Mar 2016 04:04:40 +0000 (04:04 +0000)]
Fix ThinLTO test: depends on the X86 backend
From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 262993
Sean Silva [Wed, 9 Mar 2016 03:42:39 +0000 (03:42 +0000)]
[lto] Avoid duplicate symbol error for appending linkage.
Summary:
Is there any other code needed for correctly handling appending linkage?
Do we need to do something more with @llvm.global_ctors in
SymbolTable.cpp:addBitcodeFile; otherwise the combined bitcode module
won't have all the global ctors.
Reviewers: rafael
Subscribers: Bigcheese, llvm-commits, joker.eph
Differential Revision: http://reviews.llvm.org/D17975
llvm-svn: 262992
Argyrios Kyrtzidis [Wed, 9 Mar 2016 02:53:12 +0000 (02:53 +0000)]
[index] Add a message for the assertion, NFC.
llvm-svn: 262991
Mehdi Amini [Wed, 9 Mar 2016 02:36:09 +0000 (02:36 +0000)]
void foo() is not a valid C prototype, one has to write void foo(void)
Remove a warning introduced in r262977
From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 262990
Sanjoy Das [Wed, 9 Mar 2016 02:34:19 +0000 (02:34 +0000)]
Return StringRef instead of a naked char*; NFC
llvm-svn: 262989
Sanjoy Das [Wed, 9 Mar 2016 02:34:15 +0000 (02:34 +0000)]
[IRCE] Reflow comments; NFC
llvm-svn: 262988
Mehdi Amini [Wed, 9 Mar 2016 02:34:13 +0000 (02:34 +0000)]
Fix library dependency for llvm-lto after r262977
It is a transitive dependency, so static build are OK but not build
with individual DSO for each LLVM library.
From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 262987
Enrico Granata [Wed, 9 Mar 2016 02:27:57 +0000 (02:27 +0000)]
Last round of preliminary cleanup in my refactoring of aliases.
The next step is to actually turn CommandAlias into a full-blown CommandObject citizen.
This is tricky given the current architecture of the CommandInterpreter but I think I have found a reasonable path forward.
The current plan is to make class CommandAlias : public CommandObject, and have all the several GetCommand calls not actually traverse through the alias to the underlying command object
The only times that an alias will be traversed are:
a) execution; when time comes to run an alias, I will just grab the underlying command and options, and make the interpreter execute that according to its current algorithm
b) subcommand traversal; if one has an alias to a multiword command, grabbing a subcommand will see through to the subcommand
Other operations, e.g. command listing, command names, command helps, ..., will all use the alias directly. This will, in turn, lead to the removal of the separate alias dictionary, and just mix user commands and aliases in one map
llvm-svn: 262986
Argyrios Kyrtzidis [Wed, 9 Mar 2016 02:12:46 +0000 (02:12 +0000)]
[index] libclang: Make sure to treat forward ObjC protocols as ObjCProtocolRef declarations, and fix related crash.
rdar://
25035376
llvm-svn: 262985
Argyrios Kyrtzidis [Wed, 9 Mar 2016 02:12:40 +0000 (02:12 +0000)]
[index] Fix assertion hit when indexing re-declarations of built-in functions.
llvm-svn: 262984
Sean Silva [Wed, 9 Mar 2016 02:02:26 +0000 (02:02 +0000)]
Avoid unnecessary qualification.
Thanks to Rui for spotting this.
llvm-svn: 262983
Dan Gohman [Wed, 9 Mar 2016 02:01:14 +0000 (02:01 +0000)]
[WebAssembly] Implement irreducible control flow.
This implements a very simple conservative transformation that doesn't
require more than linear code size growth. There's room for much more
optimization in this space.
llvm-svn: 262982
Mehdi Amini [Wed, 9 Mar 2016 01:55:15 +0000 (01:55 +0000)]
Fix GOLD plugin build after r262976
From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 262981
Sanjoy Das [Wed, 9 Mar 2016 01:51:44 +0000 (01:51 +0000)]
Remove trailing newline from test case; NFC
llvm-svn: 262980
Sanjoy Das [Wed, 9 Mar 2016 01:51:02 +0000 (01:51 +0000)]
[SCEV] Slightly generalize getRangeViaFactoring
Building on the previous change, this generalizes
ScalarEvolution::getRangeViaFactoring to work with
{Ext(C?A:B)+k0,+,Ext(C?A:B)+k1} where Ext can be a zero extend, sign
extend or truncate operation, and k0 and k1 are constants.
llvm-svn: 262979
Sanjoy Das [Wed, 9 Mar 2016 01:50:57 +0000 (01:50 +0000)]
[SCEV] Slightly generalize getRangeViaFactoring
This change generalizes ScalarEvolution::getRangeViaFactoring to work
with {Ext(C?A:B),+,Ext(C?A:B)} where Ext can be a zero extend, sign
extend or truncate operation.
llvm-svn: 262978
Mehdi Amini [Wed, 9 Mar 2016 01:37:22 +0000 (01:37 +0000)]
libLTO: add a ThinLTOCodeGenerator on the model of LTOCodeGenerator.
This is intended to provide a parallel (threaded) ThinLTO scheme
for linker plugin use through the libLTO C API.
The intent of this patch is to provide a first implementation as a
proof-of-concept and allows linker to start supporting ThinLTO by
definiing the libLTO C API. Some part of the libLTO API are left
unimplemented yet. Following patches will add support for these.
The current implementation can link all clang/llvm binaries.
Differential Revision: http://reviews.llvm.org/D17066
From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 262977
Mehdi Amini [Wed, 9 Mar 2016 01:37:14 +0000 (01:37 +0000)]
FunctionIndex is not optional for renameModuleForThinLTO(), make it a reference (NFC)
From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 262976
Sean Silva [Wed, 9 Mar 2016 00:47:47 +0000 (00:47 +0000)]
[lto] Record whether a variable is TLS.
Summary:
Reviewers: rafael
Subscribers: Bigcheese, llvm-commits, joker.eph
Differential Revision: http://reviews.llvm.org/D17974
llvm-svn: 262975
Rafael Espindola [Wed, 9 Mar 2016 00:31:06 +0000 (00:31 +0000)]
Assume GV is not null for now.
It will come back when we add support for inline asm in .bc files.
llvm-svn: 262972
Richard Smith [Wed, 9 Mar 2016 00:12:38 +0000 (00:12 +0000)]
Readd testcase accidentally removed in r262888.
llvm-svn: 262971
Siva Chandra [Wed, 9 Mar 2016 00:02:00 +0000 (00:02 +0000)]
[TestRegisterVariables] Adjust compiler range in expected failure decorator.
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D17972
llvm-svn: 262970
Davide Italiano [Tue, 8 Mar 2016 23:58:08 +0000 (23:58 +0000)]
[Modules] Modernize, use range-based loops.
llvm-svn: 262969
Sean Silva [Tue, 8 Mar 2016 23:50:56 +0000 (23:50 +0000)]
[lto] Don't add variables with private linkage to the symbol table.
Summary:
This causes the issue in PR26872 to go away now that we aren't creating
symbols for the string literals, but that may just be concealing a
deeper problem, so best to keep that PR open.
Reviewers: rafael
Subscribers: Bigcheese, llvm-commits, joker.eph
Differential Revision: http://reviews.llvm.org/D17971
llvm-svn: 262968
Richard Smith [Tue, 8 Mar 2016 23:17:35 +0000 (23:17 +0000)]
Fix crash in access check for aggregate initialization of base classes. It's
not obvious how to access-check these, so pick a conservative rule until we get
feedback from CWG.
llvm-svn: 262966