Peter Zotov [Tue, 5 Nov 2013 12:55:37 +0000 (12:55 +0000)]
[llvm-c] (PR16190) Add LLVMIsA* functions for ConstantDataSequential and subclasses
Original patch by David Monniaux
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194074
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Zotov [Tue, 5 Nov 2013 12:14:04 +0000 (12:14 +0000)]
[OCaml] (PR10016) Add a few missing line in OCamlLangImpl2.rst
Original patch by Damien Schoof
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194067
91177308-0d34-0410-b5e6-
96231b3b80d8
Reed Kotler [Tue, 5 Nov 2013 12:04:37 +0000 (12:04 +0000)]
Remove the word "thumb" from comments. Remove also an incorrect
command regarding the porting from the ARM version (was an old comment).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194066
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Zotov [Tue, 5 Nov 2013 11:56:20 +0000 (11:56 +0000)]
[OCaml] (PR16318) Add missing argument to Llvm.const_intcast
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194065
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Zotov [Tue, 5 Nov 2013 11:56:13 +0000 (11:56 +0000)]
[OCaml] (PR11717) Make declare_qualified_global respect address argument
Original patch by Jonathan Ragan-Kelley
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194064
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Tue, 5 Nov 2013 10:34:42 +0000 (10:34 +0000)]
X86 Disassembler: remove unused bool typedef-name
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194062
91177308-0d34-0410-b5e6-
96231b3b80d8
Alp Toker [Tue, 5 Nov 2013 09:33:43 +0000 (09:33 +0000)]
Suppress OS crash dialog in llvm-rtdyld
All other tools have this -- it's needed to avoid hanging lit on Windows in
case of a crash.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194060
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Zotov [Tue, 5 Nov 2013 09:13:46 +0000 (09:13 +0000)]
[OCaml] Properly tag the custom operations of Llvm.llbuilder
All other custom operations tags have LLVM prefix.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194058
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Zotov [Tue, 5 Nov 2013 09:13:39 +0000 (09:13 +0000)]
[OCaml] Llvm_linker: do not use external in module interface
Workaround for an OCaml bug:
http://caml.inria.fr/mantis/view.php?id=4166
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194057
91177308-0d34-0410-b5e6-
96231b3b80d8
Reed Kotler [Tue, 5 Nov 2013 08:14:14 +0000 (08:14 +0000)]
Fix r194019 as requested by Eric Christopher.
Submit the basic port of the rest of ARM constant islands code to Mips.
Two test cases are added which reflect the next level of functionality:
constants getting moved to water areas that are out of range from the
initial placement at the end of the function and basic blocks being split to
create water when none exists that can be used. There is a bunch of this
code that is not complete and has been marked with IN_PROGRESS. I will
finish cleaning this all up during the next week or two and submit the
rest of the test cases. I have elminated some code for dealing with
inline assembly because to me it unecessarily complicates things and
some of the newer features of llvm like function attributies and builtin
assembler give me better tools to solve the alignment issues created
there. Also, for Mips16 I even have the option of not doing constant
islands in the present of inline assembler if I chose. When everything
has been completed I will summarize the port and notify people that
are knowledgable regarding the ARM Constant Islands code so they can
review it in it's entirety if they wish.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194053
91177308-0d34-0410-b5e6-
96231b3b80d8
Alp Toker [Tue, 5 Nov 2013 07:27:18 +0000 (07:27 +0000)]
Fix symbol defines in config.h.cmake
These were incorrectly pointing to HAVE_LOG despite being checked for
correctly in config-ix.cmake.
Patch by James Lyon!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194051
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Tue, 5 Nov 2013 06:31:43 +0000 (06:31 +0000)]
Lift alignment restrictions on load folding for a significant portion of AVX instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194048
91177308-0d34-0410-b5e6-
96231b3b80d8
Hao Liu [Tue, 5 Nov 2013 03:39:32 +0000 (03:39 +0000)]
Implement AArch64 post-index vector load/store multiple N-element structure class SIMD(lselem-post).
Including following 14 instructions:
4 ld1 insts: post-index load multiple 1-element structure to sequential 1/2/3/4 registers.
ld2/ld3/ld4: post-index load multiple N-element structure to sequential N registers (N=2,3,4).
4 st1 insts: post-index store multiple 1-element structure from sequential 1/2/3/4 registers.
st2/st3/st4: post-index store multiple N-element structure from sequential N registers (N = 2,3,4).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194043
91177308-0d34-0410-b5e6-
96231b3b80d8
Kevin Qin [Tue, 5 Nov 2013 02:03:59 +0000 (02:03 +0000)]
Implemented aarch64 neon intrinsic vcopy_lane with float type.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194041
91177308-0d34-0410-b5e6-
96231b3b80d8
Yuchen Wu [Tue, 5 Nov 2013 01:56:29 +0000 (01:56 +0000)]
Revert "llvm-cov: Added command-line option to change dir."
This reverts commit
d8acf0078cf363252727acff00f85ae8074f95b3.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194040
91177308-0d34-0410-b5e6-
96231b3b80d8
Yuchen Wu [Tue, 5 Nov 2013 01:56:26 +0000 (01:56 +0000)]
Revert "Added basic unit test for llvm-cov."
This reverts commit
9cacd131c22b888303cb88e9a3235b2d7b2f19a1.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194039
91177308-0d34-0410-b5e6-
96231b3b80d8
Yuchen Wu [Tue, 5 Nov 2013 01:56:23 +0000 (01:56 +0000)]
Added basic unit test for llvm-cov.
This test compares the output of llvm-cov against a coverage file
generated by gcov.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194038
91177308-0d34-0410-b5e6-
96231b3b80d8
Yuchen Wu [Tue, 5 Nov 2013 01:20:41 +0000 (01:20 +0000)]
llvm-cov: Added command-line option to change dir.
This will allow for much easier testing when the input files are in a
different folder from the test script.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194034
91177308-0d34-0410-b5e6-
96231b3b80d8
Yuchen Wu [Tue, 5 Nov 2013 01:11:58 +0000 (01:11 +0000)]
Support for reading run counts in llvm-cov.
This patch enables llvm-cov to correctly output the run count stored in
the GCDA file. GCOVProfiling currently does not generate this
information, so the GCDA run data had to be hacked on from a GCDA file
generated by gcc. This is corrected by a subsequent patch.
With the run and program data included, both llvm-cov and gcov produced
the same output.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194033
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 5 Nov 2013 01:07:06 +0000 (01:07 +0000)]
Fix MSVC build by not putting an error_code directly in a union.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194032
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 5 Nov 2013 00:28:01 +0000 (00:28 +0000)]
Simplify ErrorOr.
ErrorOr had quiet a bit of complexity and indirection to be able to hold a user
type with the error.
That feature is not used anymore. This patch removes it, it will live in svn
history if we ever need it again.
If we do need it again, IMHO there is one thing that should be done
differently: Holding extra info in the error is not a property a function also
returning a value or not. The ability to hold extra info should be in the error
type and ErrorOr templated over it so that we don't need the funny looking
ErrorOr<void>.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194030
91177308-0d34-0410-b5e6-
96231b3b80d8
Hal Finkel [Tue, 5 Nov 2013 00:08:03 +0000 (00:08 +0000)]
Add a runtime unrolling parameter to the LoopUnroll pass constructor
As with the other loop unrolling parameters (the unrolling threshold, partial
unrolling, etc.) runtime unrolling can now also be controlled via the
constructor. This will be necessary for moving non-trivial unrolling late in
the pass manager (after loop vectorization).
No functionality change intended.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194027
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Mon, 4 Nov 2013 23:14:36 +0000 (23:14 +0000)]
Revert r194019 to r194021, "Submit the basic port of the rest of ARM constant islands code to Mips."
It broke -Asserts build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194026
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Mon, 4 Nov 2013 23:04:15 +0000 (23:04 +0000)]
ARM: remove unnecessary state-tracking during frame lowering.
ResolveFrameIndex had what appeared to be a very nasty hack for when the
frame-index referred to a callee-saved register. In this case it "adjusted" the
offset so that the address was correct if (and only if) the MachineInstr
immediately followed the respective push.
This "worked" for all forms of GPR & DPR but was only ever used to set the
frame pointer itself, and once this was put in a more sensible location the
entire state-tracking machinery it relied on became redundant. So I stripped
it.
The only wrinkle is that "add r7, sp, #0" might theoretically be slower (need
an actual ALU slot) compared to "mov r7, sp" so I added a micro-optimisation
that also makes emitARMRegUpdate and emitT2RegUpdate also work when NumBytes ==
0.
No test changes since there shouldn't be any functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194025
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Mon, 4 Nov 2013 23:04:07 +0000 (23:04 +0000)]
AArch64: use default asm operand printing when modifier inapplicable
If an inline assembly operand has multiple constraints (e.g. "Ir" for immediate
or register) and an operand modifier (E.g. "w" for "print register as wN") then
we need to decide behaviour when the modifier doesn't apply to the constraint.
Previousely produced some combination of an assertion failure and a fatal
error. GCC's behaviour appears to be to ignore the modifier and print the
operand in the default way. This patch should implement that.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194024
91177308-0d34-0410-b5e6-
96231b3b80d8
Reed Kotler [Mon, 4 Nov 2013 22:42:17 +0000 (22:42 +0000)]
Make sure we don't get a warning from this variable that is only used
when compiling with DEBUG.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194021
91177308-0d34-0410-b5e6-
96231b3b80d8
Reed Kotler [Mon, 4 Nov 2013 22:13:41 +0000 (22:13 +0000)]
Add the test case that goes with the previous submission for constant
islands. I forgot to add it to svn on that patch. Ooops.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194020
91177308-0d34-0410-b5e6-
96231b3b80d8
Reed Kotler [Mon, 4 Nov 2013 22:11:25 +0000 (22:11 +0000)]
Submit the basic port of the rest of ARM constant islands code to Mips.
Two test cases are added which reflect the next level of functionality:
constants getting moved to water areas that are out of range from the
initial placement at the end of the function and basic blocks being split to
create water when none exists that can be used. There is a bunch of this
code that is not complete and has been marked with IN_PROGRESS. I will
finish cleaning this all up during the next week or two and submit the
rest of the test cases. I have elminated some code for dealing with
inline assembly because to me it unecessarily complicates things and
some of the newer features of llvm like function attributies and builtin
assembler give me better tools to solve the alignment issues created
there. Also, for Mips16 I even have the option of not doing constant
islands in the present of inline assembler if I chose.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194019
91177308-0d34-0410-b5e6-
96231b3b80d8
Shuxin Yang [Mon, 4 Nov 2013 21:44:01 +0000 (21:44 +0000)]
Remove dead code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194017
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Mon, 4 Nov 2013 21:41:21 +0000 (21:41 +0000)]
Check for both styles of clobbers, those produced by dragonegg and
those produced by clang for the inline asm bswap conversion.
Modified from a patch by Chris Smowton.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194016
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Mon, 4 Nov 2013 21:34:55 +0000 (21:34 +0000)]
SLPVectorizer: Use properlyDominates to satisfy the irreflexivity of a strict weak ordering.
STL debug mode checks this.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194015
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Mon, 4 Nov 2013 20:46:52 +0000 (20:46 +0000)]
Fix another constant folding address space place I missed.
This fixes an assertion failure with a different sized address space.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194014
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Mon, 4 Nov 2013 20:36:06 +0000 (20:36 +0000)]
Scalarize select vector arguments when extracted.
When the elements are extracted from a select on vectors
or a vector select, do the select on the extracted scalars
from the input if there is only one use.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194013
91177308-0d34-0410-b5e6-
96231b3b80d8
Sean Silva [Mon, 4 Nov 2013 19:43:36 +0000 (19:43 +0000)]
[docs] Add link to 32-bit ARM ELF supplement.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194011
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakub Staszak [Mon, 4 Nov 2013 19:22:50 +0000 (19:22 +0000)]
Use startswith_lower() where possible.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194007
91177308-0d34-0410-b5e6-
96231b3b80d8
Cameron McInally [Mon, 4 Nov 2013 19:14:56 +0000 (19:14 +0000)]
Add support for AVX512 masked vector blend intrinsics.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194006
91177308-0d34-0410-b5e6-
96231b3b80d8
Manman Ren [Mon, 4 Nov 2013 18:52:06 +0000 (18:52 +0000)]
Rename testing case to use - instead of _.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194001
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Mon, 4 Nov 2013 16:16:24 +0000 (16:16 +0000)]
Change BitcodeReader to use error_code instead of bool + string.
In order to create an ObjectFile implementation that uses bitcode files, we
need to propagate the bitcode errors to the ObjectFile interface, so we need
to convert it to use the same error handling as ObjectFile: error_code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193996
91177308-0d34-0410-b5e6-
96231b3b80d8
Zoran Jovanovic [Mon, 4 Nov 2013 14:53:22 +0000 (14:53 +0000)]
Support for microMIPS branch instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193992
91177308-0d34-0410-b5e6-
96231b3b80d8
Elena Demikhovsky [Mon, 4 Nov 2013 11:48:23 +0000 (11:48 +0000)]
AVX-512: fixed a typo in builtin name
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193988
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Mon, 4 Nov 2013 10:29:20 +0000 (10:29 +0000)]
X86: Add a description for AMD bdver3 aka Steamroller.
This is just bdver2 + FSGSBase.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193984
91177308-0d34-0410-b5e6-
96231b3b80d8
Filip Pizlo [Mon, 4 Nov 2013 02:22:25 +0000 (02:22 +0000)]
Make the pretty stack trace be an opt-in, rather than opt-out, facility. Enable pretty
stack traces by default if you use PrettyStackTraceProgram, so that existing LLVM-based
tools will continue to get it without any changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193971
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Zotov [Mon, 4 Nov 2013 01:39:42 +0000 (01:39 +0000)]
[OCaml] implement Llvm_passmgr_builder, bindings for PassManagerBuilder
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193968
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Zotov [Mon, 4 Nov 2013 01:39:31 +0000 (01:39 +0000)]
[OCaml] Documentation
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193967
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Zotov [Mon, 4 Nov 2013 01:39:26 +0000 (01:39 +0000)]
[OCaml] Implement missing LLVMCore APIs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193966
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Zotov [Mon, 4 Nov 2013 01:39:18 +0000 (01:39 +0000)]
[OCaml] Formatting
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193965
91177308-0d34-0410-b5e6-
96231b3b80d8
Elena Demikhovsky [Sun, 3 Nov 2013 13:46:31 +0000 (13:46 +0000)]
AVX-512: added VPCONFLICT instruction and intrinsics,
added EVEX_KZ to tablegen
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193959
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sun, 3 Nov 2013 12:54:32 +0000 (12:54 +0000)]
SLPVectorizer: Add a missing pair of parens. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193958
91177308-0d34-0410-b5e6-
96231b3b80d8
Venkatraman Govindaraju [Sun, 3 Nov 2013 12:28:40 +0000 (12:28 +0000)]
[SparcV9] Handle i64 <-> float conversions in sparcv9 mode.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193957
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sun, 3 Nov 2013 12:27:52 +0000 (12:27 +0000)]
SLPVectorizer: When CSEing generated gathers only scan blocks containing them.
Instead of doing a RPO traversal of the whole function remember the blocks
containing gathers (typically <= 2) and scan them in dominator-first order.
The actual CSE is still quadratic, but I'm not confident that adding a
scoped hash table here is worth it as we're only looking at the generated
instructions and not arbitrary code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193956
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Sun, 3 Nov 2013 12:22:13 +0000 (12:22 +0000)]
Revert "Inliner: Handle readonly attribute per argument when adding memcpy"
This reverts commit r193356, it caused PR17781.
A reduced test case covering this regression has been added to the test suite.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193955
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Sun, 3 Nov 2013 11:09:39 +0000 (11:09 +0000)]
Spell "Actual" correctly
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193954
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Zotov [Sun, 3 Nov 2013 08:27:45 +0000 (08:27 +0000)]
[OCaml] Implement Llvm.MemoryBuffer.{of_string,as_string}
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193953
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Zotov [Sun, 3 Nov 2013 08:27:37 +0000 (08:27 +0000)]
[OCaml] Fix ABI incompatibility
OCaml's type unit is not compatible with C's type void.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193952
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Zotov [Sun, 3 Nov 2013 08:27:32 +0000 (08:27 +0000)]
[OCaml] Implement Llvm_linker, bindings for the IR linker
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193951
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Zotov [Sun, 3 Nov 2013 08:27:22 +0000 (08:27 +0000)]
[OCaml] Implement Llvm_vectorize bindings
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193950
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Zotov [Sun, 3 Nov 2013 08:27:13 +0000 (08:27 +0000)]
[OCaml] Refactor Llvm_target tests
Llvm_target tests did not check for return values. This actually
caused them to miss a bug.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193949
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Zotov [Sun, 3 Nov 2013 08:27:08 +0000 (08:27 +0000)]
[OCaml] Llvm_target: fix typo (Int_val instead of Int64_val)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193948
91177308-0d34-0410-b5e6-
96231b3b80d8
Venkatraman Govindaraju [Sun, 3 Nov 2013 08:00:19 +0000 (08:00 +0000)]
[Sparc] Expand FP_TO_UINT, UINT_TO_FP for fp128.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193947
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Zotov [Sun, 3 Nov 2013 07:54:17 +0000 (07:54 +0000)]
[OCaml] Llvm_scalar_opts: add missing transforms
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193946
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Zotov [Sun, 3 Nov 2013 07:54:08 +0000 (07:54 +0000)]
[OCaml] Llvm_ipo: add missing transforms
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193945
91177308-0d34-0410-b5e6-
96231b3b80d8
Bob Wilson [Sun, 3 Nov 2013 06:48:38 +0000 (06:48 +0000)]
Convert calls to __sinpi and __cospi into __sincospi_stret
This adds an SimplifyLibCalls case which converts the special __sinpi and
__cospi (float & double variants) into a __sincospi_stret where appropriate to
remove duplicated work.
Patch by Tim Northover
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193943
91177308-0d34-0410-b5e6-
96231b3b80d8
Bob Wilson [Sun, 3 Nov 2013 06:14:38 +0000 (06:14 +0000)]
Enable optimization of sin / cos pair into call to __sincos_stret for iOS7+.
rdar://
12856873
Patch by Evan Cheng, with a fix for rdar://
13209539 by Tilmann Scheller
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193942
91177308-0d34-0410-b5e6-
96231b3b80d8
Venkatraman Govindaraju [Sun, 3 Nov 2013 05:59:07 +0000 (05:59 +0000)]
[SparcV9] Add ctpop instruction for i64. Also, expand ctlz, cttz and bswap.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193941
91177308-0d34-0410-b5e6-
96231b3b80d8
Bob Wilson [Sun, 3 Nov 2013 05:49:36 +0000 (05:49 +0000)]
Configure with --enable-terminfo=no for Apple's llvmCore builds.
Patch by Pete Cooper.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193940
91177308-0d34-0410-b5e6-
96231b3b80d8
Filip Pizlo [Sun, 3 Nov 2013 04:38:31 +0000 (04:38 +0000)]
Add a comment to note that LLVMDisablePrettyStackTrace() is likely not a good long-term solution.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193939
91177308-0d34-0410-b5e6-
96231b3b80d8
Filip Pizlo [Sun, 3 Nov 2013 00:29:47 +0000 (00:29 +0000)]
When LLVM is embedded in a larger application, it's not OK for LLVM to intercept crashes. LLVM already has
the ability to disable this functionality. This patch exposes it via the C API.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193937
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Sat, 2 Nov 2013 21:16:09 +0000 (21:16 +0000)]
move getSymbolNMTypeChar to the one program that needs it: nm.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193933
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Sat, 2 Nov 2013 20:10:07 +0000 (20:10 +0000)]
Convert another use of getSymbolNMTypeChar.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193932
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Sat, 2 Nov 2013 18:07:48 +0000 (18:07 +0000)]
Avoid some getSymbolNMTypeChar uses in COFFObjectFile.cpp itself.
This is a fixed version of 193928 which keeps these uses in sync.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193931
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Sat, 2 Nov 2013 17:12:49 +0000 (17:12 +0000)]
Revert "Don't use getSymbolNMTypeChar for implementing COFFObjectFile::getSymbolFileOffset."
Investigating a bot failure.
This reverts commit r193928.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193929
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Sat, 2 Nov 2013 16:55:21 +0000 (16:55 +0000)]
Don't use getSymbolNMTypeChar for implementing COFFObjectFile::getSymbolFileOffset.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193928
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sat, 2 Nov 2013 14:46:27 +0000 (14:46 +0000)]
SLPVectorizer: Remove duplicated function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193927
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sat, 2 Nov 2013 13:39:00 +0000 (13:39 +0000)]
LoopVectorize: Remove quadratic behavior the local CSE.
Doing this with a hash map doesn't change behavior and avoids calling
isIdenticalTo O(n^2) times. This should probably eventually move into a utility
class shared with EarlyCSE and the limited CSE in the SLPVectorizer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193926
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Sat, 2 Nov 2013 06:00:09 +0000 (06:00 +0000)]
A better fix that also works on ppc: add a target tripple.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193915
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Sat, 2 Nov 2013 05:29:22 +0000 (05:29 +0000)]
Fix this test to pass on darwin now that llvm-nm is working.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193914
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Sat, 2 Nov 2013 05:03:24 +0000 (05:03 +0000)]
Fix llvm-nm to mach OS X's nm on some tests.
There is still a long way to go for llvm-nm, but at least we now match
nm's letter output in the cases we test for.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193912
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Liao [Sat, 2 Nov 2013 00:10:02 +0000 (00:10 +0000)]
Fix PR17764
- When selecting BLEND from vselect, the operands need swapping as due to the
difference between vselect and SSE/AVX's BLEND insn
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193900
91177308-0d34-0410-b5e6-
96231b3b80d8
Yuchen Wu [Sat, 2 Nov 2013 00:09:17 +0000 (00:09 +0000)]
Added command-line option to output llvm-cov to file.
Added -o option to llvm-cov. If no output file is specified, it defaults
to STDOUT.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193899
91177308-0d34-0410-b5e6-
96231b3b80d8
Arnold Schwaighofer [Fri, 1 Nov 2013 23:28:54 +0000 (23:28 +0000)]
LoopVectorizer: Move cse code into its own function
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193895
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Fri, 1 Nov 2013 23:14:17 +0000 (23:14 +0000)]
Comment some and reformat for clarity beginFunction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193894
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Fri, 1 Nov 2013 22:29:28 +0000 (22:29 +0000)]
DebugInfo: regenerate test case from Clang to adjust for fixes/improvements
I hit some problems with future work due to the member subprogram of
'a_b's type having a subprogram (an implicit default ctor, !52 in the
pre-commit source) with no name. Clang now generates a name for such a
function but in this case doesn't even emit debug info for it as it is
unused (Clang never emits the body of the ctor, instead just emitting
memset if needed).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193892
91177308-0d34-0410-b5e6-
96231b3b80d8
Arnold Schwaighofer [Fri, 1 Nov 2013 22:18:19 +0000 (22:18 +0000)]
LoopVectorizer: Perform redundancy elimination on induction variables
When the loop vectorizer was part of the SCC inliner pass manager gvn would
run after the loop vectorizer followed by instcombine. This way redundancy
(multiple uses) were removed and instcombine could perform scalarization on the
induction variables. Having moved the loop vectorizer to later we no longer run
any form of redundancy elimination before we perform instcombine. This caused
vectorized induction variables to survive that did not before.
On a recent iMac this helps linpack back from 6000Mflops to 7000Mflops.
This should also help lpbench and paq8p.
I ran a Release (without Asserts) build over the test-suite and did not see any
negative impact on compile time.
radar://
15339680
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193891
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Fri, 1 Nov 2013 20:59:53 +0000 (20:59 +0000)]
DebugInfo: Improve readability of test case added in r193878
The point is to ensure that the attribute in question
(DW_AT_data_member_location) is associated with the prior tag, so ensure
that we don't see another tag starting between the intended tag and the
desired attribute.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193884
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Fri, 1 Nov 2013 18:25:55 +0000 (18:25 +0000)]
DebugInfo: add a test case for data member locations (coverage for r193835)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193878
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Fri, 1 Nov 2013 18:18:16 +0000 (18:18 +0000)]
Fix a test case broken by r193872
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193876
91177308-0d34-0410-b5e6-
96231b3b80d8
Manman Ren [Fri, 1 Nov 2013 18:06:25 +0000 (18:06 +0000)]
Add comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193874
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Fri, 1 Nov 2013 17:53:30 +0000 (17:53 +0000)]
DebugInfo: Make pubnames header printing similar to unit header printing
In a failed attempt to allow the gnu-public-names.ll test case to not
hardcode the size of the unit that the pubnames section referred to I've
at least managed to have unit headers and pubnames headers print out in
a similar style.
This failed to achieve the desired goal because the header in a unit
specifies the length of the unit without the length element of the
header whereas the length in the pubnames includes this element, so the
numbers are off by 4 bytes. I don't know of any arithmetic powers in
FileCheck so the test case can't simply say "CU_LENGTH + 4".
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193872
91177308-0d34-0410-b5e6-
96231b3b80d8
Juergen Ributzka [Fri, 1 Nov 2013 17:53:27 +0000 (17:53 +0000)]
[Stackmap] Remove erroneous assert.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193871
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Fri, 1 Nov 2013 17:39:26 +0000 (17:39 +0000)]
Use isa<> instead of dyn_cast<> with unused value
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193869
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Fri, 1 Nov 2013 17:13:44 +0000 (17:13 +0000)]
[AArch64] Simplify a few of the instruction patterns. No functional change intended.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193867
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Fri, 1 Nov 2013 17:13:42 +0000 (17:13 +0000)]
[AArch64] Fix assembly string formatting and other coding standard violations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193866
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 1 Nov 2013 17:09:14 +0000 (17:09 +0000)]
Remove linkonce_odr_auto_hide.
linkonce_odr_auto_hide was in incomplete attempt to implement a way
for the linker to hide symbols that are known to be available in every
TU and whose addresses are not relevant for a particular DSO.
It was redundant in that it all its uses are equivalent to
linkonce_odr+unnamed_addr. Unlike those, it has never been connected
to clang or llvm's optimizers, so it was effectively dead.
Given that nothing produces it, this patch just nukes it
(other than the llvm-c enum value).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193865
91177308-0d34-0410-b5e6-
96231b3b80d8
Aaron Ballman [Fri, 1 Nov 2013 15:12:23 +0000 (15:12 +0000)]
Commenting out this assert because it is causing the build bots to fail. This effectively reverts r193861, but needs to be fixed as part of r193769.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193862
91177308-0d34-0410-b5e6-
96231b3b80d8
Aaron Ballman [Fri, 1 Nov 2013 14:53:14 +0000 (14:53 +0000)]
Fixing an order of evaluation error in an assert.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193861
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Fri, 1 Nov 2013 14:09:50 +0000 (14:09 +0000)]
LoopVectorize: Look for consecutive acces in GEPs with trailing zero indices
If we have a pointer to a single-element struct we can still build wide loads
and stores to it (if there is no padding).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193860
91177308-0d34-0410-b5e6-
96231b3b80d8
Bradley Smith [Fri, 1 Nov 2013 13:27:35 +0000 (13:27 +0000)]
[ARM] Add Virtualization subtarget feature and more build attributes in this area
Add a Virtualization ARM subtarget feature along with adding proper build
attribute emission for Tag_Virtualization_use (encodes Virtualization and
TrustZone) and Tag_MPextension_use.
Also rework test/CodeGen/ARM/2010-10-19-mc-elf-objheader.ll testcase to
something that is more maintainable. This changes the focus of this
testcase away from testing CPU defaults (which is tested elsewhere), onto
specifically testing that attributes are encoded correctly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193859
91177308-0d34-0410-b5e6-
96231b3b80d8
Bradley Smith [Fri, 1 Nov 2013 11:21:16 +0000 (11:21 +0000)]
[ARM] Fix Tag_ABI_HardFP_use build attribute
Fix Tag_ABI_HardFP_use build attribute to handle single precision FP,
replace deprecated Tag_ABI_HardFP_use value of 3 with 0 and also add
some tests for Tag_ABI_VFP_args.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193856
91177308-0d34-0410-b5e6-
96231b3b80d8
Hal Finkel [Fri, 1 Nov 2013 10:58:22 +0000 (10:58 +0000)]
Consider (x == -1) unlikely in BranchProbabilityInfo
This adds another heuristic to BPI, similar to the existing heuristic that
considers (x == 0) unlikely to be true. As suggested in the PACT'98 paper by
Deitrich, Cheng, and Hwu, -1 is often used to indicate an invalid index, and
equality comparisons with -1 are also unlikely to succeed. Local
experimentation supports this hypothesis: This yields a 1-2% speedup in the
test-suite sqlite benchmark on the PPC A2 core, with no significant
regressions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193855
91177308-0d34-0410-b5e6-
96231b3b80d8
Arnold Schwaighofer [Fri, 1 Nov 2013 03:05:07 +0000 (03:05 +0000)]
LoopVectorizer: If dependency checks fail try runtime checks
When a dependence check fails we can still try to vectorize loops with runtime
array bounds checks.
This helps linpack to vectorize a loop in dgefa. And we are back to 2x of the
scalar performance on a corei7-avx.
radar://
15339680
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193853
91177308-0d34-0410-b5e6-
96231b3b80d8