Zoran Jovanovic [Mon, 10 Nov 2014 17:27:56 +0000 (17:27 +0000)]
[mips][microMIPS] Fix issue with delay slot filler and microMIPS
Differential Revision: http://reviews.llvm.org/D6193
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221612
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Mon, 10 Nov 2014 16:31:06 +0000 (16:31 +0000)]
Fix variable names and comment style. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221608
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Sanders [Mon, 10 Nov 2014 15:57:53 +0000 (15:57 +0000)]
[mips] Fix sret arguments for N32/N64 which were accidentally broken in r221534.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221604
91177308-0d34-0410-b5e6-
96231b3b80d8
Manuel Klimek [Mon, 10 Nov 2014 15:29:29 +0000 (15:29 +0000)]
Mark test using python as REQUIRES: python27.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221598
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Mon, 10 Nov 2014 15:04:26 +0000 (15:04 +0000)]
[CMake] llvm-c-test: Use libLLVM.so if it is available.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221592
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Mon, 10 Nov 2014 15:04:02 +0000 (15:04 +0000)]
[CMake] Let llvm-shlib work on Linux with --whole-archive.
FIXME: It should work on not only Linux but elf-targeting gnu ld.
For example if LLVM_DYLIB_COMPONENTS is "BitWriter Support", CMake emits the command line like;
-Wl,--whole-archive
lib/libLLVMBitWriter.a
lib/libLLVMSupport.a *1
-Wl,--no-whole-archive
lib/libLLVMCore.a
lib/libLLVMSupport.a *2
-lrt -ldl -ltinfo -lpthread -lm
It works since symbols in LLVMCore is resolved with not *2 but *1.
Unfortunately, --gc-sections is not powerful in this case to prune unused "visibility(default)" entries.
I am still experimenting other way not to rely on --whole-archive.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221591
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Mon, 10 Nov 2014 15:03:02 +0000 (15:03 +0000)]
[CMake] Move llvm-shlib in prior to other tools.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221590
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Sat, 8 Nov 2014 14:12:30 +0000 (14:12 +0000)]
[CMake] llvm-shlib: Add possibly missing BitReader and MCDisassembler for llvm-c.
FYI, 3 modules below are redundant in trunk;
AsmPrinter
MC
SelectionDAG
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221579
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Sat, 8 Nov 2014 00:02:57 +0000 (00:02 +0000)]
R600/SI: Fix broken check prefixes in test
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221565
91177308-0d34-0410-b5e6-
96231b3b80d8
Saleem Abdulrasool [Sat, 8 Nov 2014 00:00:50 +0000 (00:00 +0000)]
Transforms: address some late comments
We already use the llvm namespace. Remove the unnecessary prefix. Use the
StringRef::equals method to compare with C strings rather than instantiating
std::strings.
Addresses late review comments from David Majnemer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221564
91177308-0d34-0410-b5e6-
96231b3b80d8
Saleem Abdulrasool [Sat, 8 Nov 2014 00:00:47 +0000 (00:00 +0000)]
Transforms: sort source files in build
Sort target sources. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221563
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Fri, 7 Nov 2014 22:39:11 +0000 (22:39 +0000)]
SelectionDAG: Assert if we truncate SDNode's NumOperands or NumValues
No functionality change intended, this just stops us early if we created
a bad SDNode.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221560
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Fri, 7 Nov 2014 22:12:57 +0000 (22:12 +0000)]
[Reassociate] Better preserve NSW/NUW flags.
Part of PR12985.
Phabricator Revision: http://reviews.llvm.org/D6172
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221555
91177308-0d34-0410-b5e6-
96231b3b80d8
Saleem Abdulrasool [Fri, 7 Nov 2014 22:09:52 +0000 (22:09 +0000)]
Transforms: use typedef rather than using aliases
Visual Studio 2012 apparently does not support using alias declarations. Use
the more traditional typedef approach. This should let the Windows buildbots
pass. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221554
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 7 Nov 2014 21:33:09 +0000 (21:33 +0000)]
Remove unused variable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221549
91177308-0d34-0410-b5e6-
96231b3b80d8
Saleem Abdulrasool [Fri, 7 Nov 2014 21:32:08 +0000 (21:32 +0000)]
Transform: add SymbolRewriter pass
This introduces the symbol rewriter. This is an IR->IR transformation that is
implemented as a CodeGenPrepare pass. This allows for the transparent
adjustment of the symbols during compilation.
It provides a clean, simple, elegant solution for symbol inter-positioning. This
technique is often used, such as in the various sanitizers and performance
analysis.
The control of this is via a custom YAML syntax map file that indicates source
to destination mapping, so as to avoid having the compiler to know the exact
details of the source to destination transformations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221548
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael J. Spencer [Fri, 7 Nov 2014 21:30:36 +0000 (21:30 +0000)]
Fix style.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221547
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Fri, 7 Nov 2014 20:45:00 +0000 (20:45 +0000)]
R600: Remove unused define
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221543
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 7 Nov 2014 18:07:04 +0000 (18:07 +0000)]
Don't redeclare a pure virtual method.
I.E., there is no value is having
void foo() override = 0;
If it is override it is already present in a base class. Since it is pure,
some other class will have to implement it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221537
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 7 Nov 2014 17:59:05 +0000 (17:59 +0000)]
Use StringRefMemoryObject in llvm-mc. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221536
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Sanders [Fri, 7 Nov 2014 16:54:21 +0000 (16:54 +0000)]
[mips] Promote i32 arguments to i64 for the N32/N64 ABI and fix <64-bit structs...
Summary:
... and after all that refactoring, it's possible to distinguish softfloat
floating point values from integers so this patch no longer breaks softfloat to
do it.
Remove direct handling of i32's in the N32/N64 ABI by promoting them to
i64. This more closely reflects the ABI documentation and also fixes
problems with stack arguments on big-endian targets.
We now rely on signext/zeroext annotations (already generated by clang) and
the Assert[SZ]ext nodes to avoid the introduction of unnecessary sign/zero
extends.
It was not possible to convert three tests to use signext/zeroext. These tests
are bswap.ll, ctlz-v.ll, ctlz-v.ll. It's not possible to put signext on a
vector type so we just accept the sign extends here for now. These tests don't
pass the vectors the same way clang does (clang puts multiple elements in the
same argument, these map 1 element to 1 argument) so we don't need to worry too
much about it.
With this patch, all known N32/N64 bugs should be fixed and we now pass the
first 10,000 tests generated by ABITest.py.
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D6117
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221534
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Fri, 7 Nov 2014 16:08:19 +0000 (16:08 +0000)]
[CMake] LLVMSupport: Give system_libs PRIVATE scope when LLVMSupport is built as SHARED. Users of LLVMSupport won't inherit ${system_libs}.
unittests/SupporTests is another user of libpthreads. Apply LLVM_SYSTEM_LIBS for him explicitly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221531
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 7 Nov 2014 15:33:56 +0000 (15:33 +0000)]
Pass PRIVATE to target_link_libraries if using shared libraries.
A shared library (unlike a .a), has its dependencies recorded in the library and
we can pass PRIVATE to target_link_libraries.
This patch then removes some bogus dependencies when using
BUILD_SHARED_LIBS=ON. For example, we go from
build lib/CodeGen/CMakeFiles/LLVMCodeGen.dir/AggressiveAntiDepBreaker.cpp.o:
CXX_COMPILER /home/espindola/llvm/llvm/lib/CodeGen/AggressiveAntiDepBreaker.cpp
|| include/llvm/IR/intrinsics_gen lib/libLLVMSupport.so
lib/libLLVMCore.so lib/libLLVMBitReader.so
lib/libLLVMTransformUtils.so lib/libLLVMInstCombine.so
lib/libLLVMScalarOpts.so lib/libLLVMipa.so lib/libLLVMAnalysis.so
lib/libLLVMMCParser.so lib/libLLVMMC.so lib/libLLVMObject.so
lib/libLLVMTarget.so lib/libLLVMProfileData.so
to
build lib/CodeGen/CMakeFiles/LLVMCodeGen.dir/AggressiveAntiDepBreaker.cpp.o:
CXX_COMPILER /home/espindola/llvm/llvm/lib/CodeGen/AggressiveAntiDepBreaker.cpp
|| include/llvm/IR/intrinsics_gen lib/libLLVMSupport.so
lib/libLLVMCore.so lib/libLLVMTransformUtils.so
lib/libLLVMScalarOpts.so lib/libLLVMAnalysis.so lib/libLLVMMC.so
lib/libLLVMTarget.so
In fact, build.ninja goes from
5231028 bytes to
4896759 bytes.
With this, old verisons of bfd ld (2.24 is OK, 2.23 warns) will print a bogus
warning when building with BUILD_SHARED_LIBS.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221530
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Sanders [Fri, 7 Nov 2014 15:33:08 +0000 (15:33 +0000)]
[mips] Removed the remainder of MipsCC. NFC.
Summary:
One of the calls to AllocateStack (the one in LowerCall) doesn't look like
it should be there but it was there before and removing it breaks the
frame size calculation.
Reviewers: vmedic, theraven
Reviewed By: theraven
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D6116
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221529
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Sanders [Fri, 7 Nov 2014 15:03:53 +0000 (15:03 +0000)]
[mips] Remove MipsCC::reservedArgArea() in favour of MipsABIInfo::GetCalleeAllocdArgSizeInBytes(). NFC.
Summary:
Reviewers: theraven, vmedic
Reviewed By: vmedic
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D6115
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221528
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Fri, 7 Nov 2014 14:56:31 +0000 (14:56 +0000)]
MipsCCState.h: Use LLVM_DELETED_FUNCTION for msc17.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221527
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Fri, 7 Nov 2014 14:50:10 +0000 (14:50 +0000)]
llvm/test/tools/llvm-symbolizer/ppc64.test: Avoid subshell.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221526
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Sanders [Fri, 7 Nov 2014 14:24:31 +0000 (14:24 +0000)]
[mips] Move MipsCCState to a separate file and clang-formatted it.
Summary: Depends on D6113
Reviewers: theraven, vmedic
Reviewed By: vmedic
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D6114
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221525
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Sanders [Fri, 7 Nov 2014 12:43:01 +0000 (12:43 +0000)]
[mips] Fix unused variable warnings introduced in r221521
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221522
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Sanders [Fri, 7 Nov 2014 12:21:37 +0000 (12:21 +0000)]
[mips] Remove remaining use of MipsCC::intArgRegs() in favour of MipsABIInfo::GetByValArgRegs() and MipsABIInfo::GetVarArgRegs()
Summary: Depends on D6112
Reviewers: theraven, vmedic
Reviewed By: vmedic
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D6113
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221521
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Sanders [Fri, 7 Nov 2014 12:02:59 +0000 (12:02 +0000)]
[mips] Remove MipsCC::getRegVT(). NFC
Summary: It's no longer used.
Reviewers: vmedic, theraven
Reviewed By: theraven
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D6112
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221519
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Sanders [Fri, 7 Nov 2014 11:43:49 +0000 (11:43 +0000)]
[mips] Remove MipsCC::analyzeCallOperands in favour of CCState::AnalyzeCallOperands. NFC
Summary:
In addition to the usual f128 workaround, it was also necessary to provide
a means of accessing ArgListEntry::IsFixed.
Reviewers: theraven, vmedic
Reviewed By: vmedic
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D6111
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221518
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Sanders [Fri, 7 Nov 2014 11:10:48 +0000 (11:10 +0000)]
[mips] Move SpecialCallingConv to MipsCCState and use it from tablegen-erated code. NFC
Summary:
In the long run, it should probably become a calling convention in its own
right but for now just move it out of
MipsISelLowering::analyzeCallOperands() so that we can drop this function
in favour of CCState::AnalyzeCallOperands().
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D6085
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221517
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Sanders [Fri, 7 Nov 2014 10:45:16 +0000 (10:45 +0000)]
[mips] Removed IsVarArg from MipsISelLowering::analyzeCallOperands(). NFC.
Summary:
CCState objects already carry this information in their isVarArg() method.
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D6084
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221516
91177308-0d34-0410-b5e6-
96231b3b80d8
Jay Foad [Fri, 7 Nov 2014 09:08:39 +0000 (09:08 +0000)]
llvm-symbolizer: teach it about PowerPC64 ELF function descriptors
Summary:
Teach llvm-symbolizer about PowerPC64 ELF function descriptors. Symbols in the .opd section point to function descriptors, the first word of which is a pointer to the real function. For the purposes of symbolizing we pretend that the symbol points directly to the function.
This is enough to get decent function names in stack traces for unoptimized binaries, which fixes the sanitizer print-stack-trace test on PowerPC64 Linux.
Reviewers: kcc, willschm, samsonov
Reviewed By: samsonov
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D6110
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221514
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Fri, 7 Nov 2014 08:54:19 +0000 (08:54 +0000)]
SCCP: overdefined calls cannot become constant
We would attempt to fold away a call instruction which had been marked
overdefined. However, it's not valid to transition to constant from
overdefined.
This fixes PR21512.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221513
91177308-0d34-0410-b5e6-
96231b3b80d8
Justin Hibbits [Fri, 7 Nov 2014 04:46:10 +0000 (04:46 +0000)]
Add Position-independent Code model Module API.
Summary:
This makes PIC levels a Module flag attribute, which can be queried by the
backend. The flag is named `PIC Level`, and can have a value of:
0 - Backend-default
1 - Small-model (-fpic)
2 - Large-model (-fPIC)
These match the `-pic-level' command line argument for clang, and the value of the
preprocessor macro `__PIC__'.
Test Plan:
New flags tests specific for the 'PIC Level' module flag.
Tests to be added as part of a future commit for PowerPC, which will use this new API.
Reviewers: rafael, echristo
Reviewed By: rafael, echristo
Subscribers: rafael, llvm-commits
Differential Revision: http://reviews.llvm.org/D5882
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221510
91177308-0d34-0410-b5e6-
96231b3b80d8
Ahmed Bougacha [Fri, 7 Nov 2014 02:50:00 +0000 (02:50 +0000)]
[AArch64] Keep flags on condition vreg when instantiating a CB branch.
Reversing a CB* instruction used to drop the flags on the condition. On the
included testcase, this lead to a read from an undefined vreg.
Using addOperand keeps the flags, here <undef>.
Differential Revision: http://reviews.llvm.org/D6159
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221507
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 7 Nov 2014 01:09:51 +0000 (01:09 +0000)]
Use a StringRefMemoryObject. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221503
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 7 Nov 2014 00:52:15 +0000 (00:52 +0000)]
Use StringRefMemoryObject. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221502
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Fri, 7 Nov 2014 00:31:14 +0000 (00:31 +0000)]
LoopVectorize: Don't assume pointees are sized
A pointer's pointee might not be sized: the pointee could be a function.
Report this as IK_NoInduction when calculating isInductionVariable.
This fixes PR21508.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221501
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Thu, 6 Nov 2014 23:23:30 +0000 (23:23 +0000)]
InstCombine: Rely on cmpxchg's return code when it's strong
Comparing the result of a cmpxchg instruction can be replaced with an
extractvalue of the cmpxchg success indicator.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221498
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 6 Nov 2014 23:16:57 +0000 (23:16 +0000)]
Remove unused variable. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221497
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 6 Nov 2014 22:57:10 +0000 (22:57 +0000)]
Don't repeat names in comments. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221495
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Atanasyan [Thu, 6 Nov 2014 22:46:24 +0000 (22:46 +0000)]
[ELF][yaml2obj] Handle additional MIPS specific st_other field flags
The ELF symbol `st_other` field might contain additional flags besides
visibility ones. This patch implements support for some MIPS specific
flags.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221491
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 6 Nov 2014 22:39:16 +0000 (22:39 +0000)]
Factor out call to push_back. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221490
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Thu, 6 Nov 2014 22:15:41 +0000 (22:15 +0000)]
[X86][SSE] Vector integer/float conversion memory folding (cvttps2dq / cvttpd2dq)
Fixed an issue with the (v)cvttps2dq and (v)cvttpd2dq instructions being incorrectly put in the 2 source operand folding tables instead of the 1 source operand and added the missing SSE/AVX versions.
Also added missing (v)cvtps2dq and (v)cvtpd2dq instructions to the folding tables.
Differential Revision: http://reviews.llvm.org/D6001
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221489
91177308-0d34-0410-b5e6-
96231b3b80d8
Ahmed Bougacha [Thu, 6 Nov 2014 22:04:15 +0000 (22:04 +0000)]
[X86] Add VFMADDSUB cases for the 213->231 custom inserter.
Also add tests for vfmadd/vfmsub.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221488
91177308-0d34-0410-b5e6-
96231b3b80d8
Ahmed Bougacha [Thu, 6 Nov 2014 21:58:11 +0000 (21:58 +0000)]
[X86] Add missing FMA3 VFMADDSUB in the emitter.
Also reuse the fma4 intrinsic test to cover fma3 instructions too.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221487
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Thu, 6 Nov 2014 21:46:55 +0000 (21:46 +0000)]
Object, COFF: Don't consider AuxFunctionDefinition for getSymbolSize
mingw lies about the size of a function's AuxFunctionDefinition. Ignore
the field and rely on our heuristic to determine the symbol's size.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221485
91177308-0d34-0410-b5e6-
96231b3b80d8
Ahmed Bougacha [Thu, 6 Nov 2014 21:46:23 +0000 (21:46 +0000)]
[X86] Split FMA4 RM tests into a separate file. NFC.
While there, remove useless comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221484
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 6 Nov 2014 20:01:34 +0000 (20:01 +0000)]
Base check on the section name, not the variable name.
The variable is private, so the name should not be relied on. Also, the
linker uses the sections, so asan should too when trying to avoid causing
the linker problems.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221480
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Thu, 6 Nov 2014 19:24:18 +0000 (19:24 +0000)]
[RegAlloc] Remove reference to the trivial spiller in test case.
This test case was never actually testing the trivial spiller: the -spiller
option has not been hooked up for a while now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221475
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Thu, 6 Nov 2014 19:12:38 +0000 (19:12 +0000)]
[RegAlloc] Kill off the trivial spiller - nobody is using it any more.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221474
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Liao [Thu, 6 Nov 2014 19:05:57 +0000 (19:05 +0000)]
Indentation fixes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221472
91177308-0d34-0410-b5e6-
96231b3b80d8
Frederic Riss [Thu, 6 Nov 2014 19:00:47 +0000 (19:00 +0000)]
Try to appease MSVC buildbots after r221466.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221471
91177308-0d34-0410-b5e6-
96231b3b80d8
Kevin Enderby [Thu, 6 Nov 2014 19:00:13 +0000 (19:00 +0000)]
Plumb in the ARM thumb symbolizer in llvm-objdump’s Mach-O disassembler and
add the code and test cases for 32-bit ARM symbolizer.
Also fixed the printing of data in code as it was not using the table correctly
and needed to fix one of the test cases too.
This will break lld’s test/mach-o/arm-interworking-movw.yaml till the tweak
for that is made. Which I’ll be committing immediately after this commit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221470
91177308-0d34-0410-b5e6-
96231b3b80d8
Frederic Riss [Thu, 6 Nov 2014 17:46:55 +0000 (17:46 +0000)]
Change DIBuilder::createImportedDeclaration from taking a DIScope to a DIDescriptor.
Imported declarations can be DIGlobalVariables which aren't a DIScope. Today
clang (unknowingly I believe) shoehorns these into a DIScope and it all works
just because we never access the fields.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221466
91177308-0d34-0410-b5e6-
96231b3b80d8
Colin LeMahieu [Thu, 6 Nov 2014 17:05:51 +0000 (17:05 +0000)]
[Hexagon] Adding basic Hexagon ELF object emitter.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221465
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Bendersky [Thu, 6 Nov 2014 17:05:49 +0000 (17:05 +0000)]
Clean up NVPTXLowerStructArgs.cpp. NFC
* Remove unnecessary const_casts and C-style casts
* Simplify attribute access code
* Simplify ArrayRef creation
* 80-col and clang-format
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221464
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Sanders [Thu, 6 Nov 2014 16:48:57 +0000 (16:48 +0000)]
[mips] Removed IsSoftFloat from MipsISelLowering::analyzeCallOperands(). NFC
Summary:
It isn't used anymore.
Depends on D6081
Reviewers: vmedic
Reviewed By: vmedic
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D6083
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221463
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Thu, 6 Nov 2014 16:46:37 +0000 (16:46 +0000)]
[Reassociate] Don't reassociate when mixing regular and fast-math FP
instructions. Inlining might cause such cases and it's not valid to
reassociate floating-point instructions without the unsafe algebra flag.
Patch by Mehdi Amini <mehdi_amini@apple.com>!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221462
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Sanders [Thu, 6 Nov 2014 16:36:30 +0000 (16:36 +0000)]
[mips] Removed MipsISelLowering::analyzeFormalArguments() in favour of CCState::AnalyzeFormalArguments()
Summary:
As with returns, we must be able to identify f128 arguments despite them
being lowered away. We do this with a pre-analyze step that builds a
vector and then we use this vector from the tablegen-erated code.
Reviewers: vmedic
Reviewed By: vmedic
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D6081
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221461
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 6 Nov 2014 15:05:51 +0000 (15:05 +0000)]
Use FileCheck in a few tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221459
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 6 Nov 2014 14:39:49 +0000 (14:39 +0000)]
Compute the correct jump table entries on 32 bit windows.
On 32 bit windows we use label differences and .set does not suppress
rolocations, a combination that was not used before r220256.
This fixes PR21497.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221456
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrea Di Biagio [Thu, 6 Nov 2014 14:36:45 +0000 (14:36 +0000)]
[X86] When commuting SSE immediate blend, make sure that the new blend mask is a valid imm8.
Example:
define <4 x i32> @test(<4 x i32> %a, <4 x i32> %b) {
%shuffle = shufflevector <4 x i32> %a, <4 x i32> %b, <4 x i32> <i32 4, i32 5, i32 6, i32 3>
ret <4 x i32> %shuffle
}
Before llc (-mattr=+sse4.1), produced the following assembly instruction:
pblendw $
4294967103, %xmm1, %xmm0
After
pblendw $63, %xmm1, %xmm0
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221455
91177308-0d34-0410-b5e6-
96231b3b80d8
Aaron Ballman [Thu, 6 Nov 2014 14:32:30 +0000 (14:32 +0000)]
Fixing some -Wcast-qual warnings; NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221454
91177308-0d34-0410-b5e6-
96231b3b80d8
Toma Tabacu [Thu, 6 Nov 2014 14:25:42 +0000 (14:25 +0000)]
[mips] Tolerate the use of the %z inline asm operand modifier with non-immediates.
Summary:
Currently, we give an error if %z is used with non-immediates, instead of continuing as if the %z isn't there.
For example, you use the %z operand modifier along with the "Jr" constraints ("r" makes the operand a register, and "J" makes it an immediate, but only if its value is 0).
In this case, you want the compiler to print "$0" if the inline asm input operand turns out to be an immediate zero and you want it to print the register containing the operand, if it's not.
We give an error in the latter case, and we shouldn't (GCC also doesn't).
Reviewers: dsanders
Reviewed By: dsanders
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D6023
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221453
91177308-0d34-0410-b5e6-
96231b3b80d8
Sasa Stankovic [Thu, 6 Nov 2014 13:20:12 +0000 (13:20 +0000)]
[mips] Add the following MIPS options that control gp-relative addressing of
small data items: -mgpopt, -mlocal-sdata, -mextern-sdata. Implement gp-relative
addressing for constants.
Differential Revision: http://reviews.llvm.org/D4903
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221450
91177308-0d34-0410-b5e6-
96231b3b80d8
Toma Tabacu [Thu, 6 Nov 2014 10:02:45 +0000 (10:02 +0000)]
[mips] Improve error/warning messages and testing for the .cpload assembler directive.
Summary:
Improved warning message when using .cpload inside a reorder section and added an error message for using .cpload with Mips16 enabled.
Modified the tests to fit with the changes mentioned above, added a test-case for the N32 ABI in cpload.s and did some reformatting to make the tests easier to read.
Reviewers: dsanders
Reviewed By: dsanders
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D5465
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221447
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Sanders [Thu, 6 Nov 2014 09:53:05 +0000 (09:53 +0000)]
[JIT] Fix more missing endian conversions (opcodes for AArch64, ARM, and Mips stub functions, and ARM target in general)
Summary:
Fixed all of the missing endian conversions that Lang Hames and I identified in
RuntimeDyldMachOARM.h.
Fixed the opcode emission in RuntimeDyldImpl::createStubFunction() for AArch64,
ARM, Mips when the host endian doesn't match the target endian.
PowerPC will need changing if it's opcodes are affected by endianness but I've
left this for now since I'm unsure if this is the case and it's the only path
that specifies the target endian.
This patch fixes MachO_ARM_PIC_relocations.s on a big-endian Mips host. This
is the last of the known issues on this host.
Reviewers: lhames
Reviewed By: lhames
Subscribers: aemerson, llvm-commits
Differential Revision: http://reviews.llvm.org/D6130
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221446
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Thu, 6 Nov 2014 08:10:41 +0000 (08:10 +0000)]
Object, COFF: Infer symbol sizes from adjacent symbols
Use the position of the subsequent symbol in the object file to infer
the size of it's predecessor. I hope to eventually remove whatever COFF
specific details from this little algorithm so that we can unify this
logic with what Mach-O does.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221444
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Thu, 6 Nov 2014 08:10:37 +0000 (08:10 +0000)]
X86, MC: Tidy up some whitespace in GetRelocType
No functionality change intended.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221443
91177308-0d34-0410-b5e6-
96231b3b80d8
Justin Bogner [Thu, 6 Nov 2014 06:55:02 +0000 (06:55 +0000)]
GCOV: Make sure that function idents in the .gcda and .gcno match
When generating gcov compatible profiling, we sometimes skip emitting
data for functions for one reason or another. However, this was
emitting different function IDs in the .gcno and .gcda files, because
the .gcno case was using the loop index before skipping functions and
the .gcda the array index after. This resulted in completely invalid
gcov data.
This fixes the problem by making the .gcno loop track the ID
separately from the loop index.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221441
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 6 Nov 2014 05:01:21 +0000 (05:01 +0000)]
Add three other sections when L symbols are allowed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221436
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 6 Nov 2014 02:42:03 +0000 (02:42 +0000)]
Allow L symbols in no_dead_strip sections.
If a section cannot be dead stripped, it is safe to use L symbols, since
the linker will keep all of it in the end.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221431
91177308-0d34-0410-b5e6-
96231b3b80d8
Quentin Colombet [Thu, 6 Nov 2014 02:25:03 +0000 (02:25 +0000)]
[X86] Lower VSELECT into SHRUNKBLEND when we shrink the bits used into the
condition to match a blend.
This prevents optimizations that work on VSELECT to perform invalid
transformations. Indeed, the optimized condition does not match the vector
boolean content that is expected and bad things may happen.
This patch yields the exact same code on the whole test-suite + specs (-O3 and
-O3 -march=core-avx2), it improves one test case (vector-blend.ll) and fixes a
bug reduced in vselect-avx.ll.
<rdar://problem/
18819506>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221429
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Thu, 6 Nov 2014 01:13:27 +0000 (01:13 +0000)]
Remove unnecessary .c_str() when implicitly converting to Twine
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221422
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Thu, 6 Nov 2014 00:31:04 +0000 (00:31 +0000)]
[Docs][JIT] Update the clang++ invocation lines in the kaleidoscope docs.
The old examples had missing/incorrect flags that were causing failures on newer
versions of clang and the tutorial code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221419
91177308-0d34-0410-b5e6-
96231b3b80d8
Petar Jovanovic [Wed, 5 Nov 2014 22:42:31 +0000 (22:42 +0000)]
[mips64] Fix MIPS64 exception personality encoding
Remove dynamic relocations of __gxx_personality_v0 from the .eh_frame.
The MIPS64 follow-up of the MIPS32 fix (rL209907).
Patch by Vladimir Stefanovic.
Differential Revision: http://reviews.llvm.org/D6141
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221408
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Wed, 5 Nov 2014 22:28:25 +0000 (22:28 +0000)]
[X86][SSE] Vector integer to float conversion memory folding
Added missing memory folding for the (V)CVTDQ2PS instructions - we can safely fold these (but not the (V)CVTDQ2PD versions which have a register/memory size discrepancy in the source operand). I've added a test case demonstrating that stack folding now works.
Differential Revision: http://reviews.llvm.org/D5981
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221407
91177308-0d34-0410-b5e6-
96231b3b80d8
Sean Silva [Wed, 5 Nov 2014 22:17:18 +0000 (22:17 +0000)]
[docs] Document usage of Inputs/ for extra test files.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221406
91177308-0d34-0410-b5e6-
96231b3b80d8
Sean Silva [Wed, 5 Nov 2014 21:33:34 +0000 (21:33 +0000)]
[Linker] Add some test coverage for llvm.ident merging
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221403
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Ilseman [Wed, 5 Nov 2014 21:28:24 +0000 (21:28 +0000)]
Fix heap-use-after-free bug in expandSDiv when the operands are
constants, as discovered by ASAN.
Patch by Mehdi Amini!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221401
91177308-0d34-0410-b5e6-
96231b3b80d8
Steven Wu [Wed, 5 Nov 2014 21:02:55 +0000 (21:02 +0000)]
Remove obsolete ARM intrinsics vclz and vcnt
Both of the intrinsics get autoupgraded to target independent
intrinsics.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221396
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Atanasyan [Wed, 5 Nov 2014 20:47:35 +0000 (20:47 +0000)]
Add accessor to get 'visibility' part of st_other field
This new `getVisibility()` function will also be used in the LLD code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221392
91177308-0d34-0410-b5e6-
96231b3b80d8
Derek Schuff [Wed, 5 Nov 2014 20:02:05 +0000 (20:02 +0000)]
Fix test breakage from r221386
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221389
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Wed, 5 Nov 2014 19:35:00 +0000 (19:35 +0000)]
R600/SI: Fix omod display for VOP3b
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221387
91177308-0d34-0410-b5e6-
96231b3b80d8
Derek Schuff [Wed, 5 Nov 2014 19:27:21 +0000 (19:27 +0000)]
[x86 fast-isel] Materialize allocas with the correct-sized lea for ILP32
Summary:
X86FastISel::fastMaterializeAlloca was incorrectly conditioning its
opcode selection on subtarget bitness rather than pointer size.
Differential Revision: http://reviews.llvm.org/D6136
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221386
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Wed, 5 Nov 2014 19:01:22 +0000 (19:01 +0000)]
R600/SI: Add testcase I forgot to commit from months ago
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221384
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Wed, 5 Nov 2014 19:01:19 +0000 (19:01 +0000)]
R600/SI: Move all rsrc building functions to SIISelLowering
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221383
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Wed, 5 Nov 2014 19:01:17 +0000 (19:01 +0000)]
R600/SI: Remove SI_ADDR64_RSRC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221382
91177308-0d34-0410-b5e6-
96231b3b80d8
Justin Holewinski [Wed, 5 Nov 2014 18:19:30 +0000 (18:19 +0000)]
[NVPTX] Add NVPTXLowerStructArgs pass
This works around the limitation that PTX does not allow .param space
loads/stores with arbitrary pointers.
If a function has a by-val struct ptr arg, say foo(%struct.x *byval %d), then
add the following instructions to the first basic block :
%temp = alloca %struct.x, align 8
%tt1 = bitcast %struct.x * %d to i8 *
%tt2 = llvm.nvvm.cvt.gen.to.param %tt2
%tempd = bitcast i8 addrspace(101) * to %struct.x addrspace(101) *
%tv = load %struct.x addrspace(101) * %tempd
store %struct.x %tv, %struct.x * %temp, align 8
The above code allocates some space in the stack and copies the incoming
struct from param space to local space. Then replace all occurences of %d
by %temp.
Fixes PR21465.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221377
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Wed, 5 Nov 2014 18:16:03 +0000 (18:16 +0000)]
IR: MDNode => Value: NamedMDNode::getOperator()
Change `NamedMDNode::getOperator()` from returning `MDNode *` to
returning `Value *`. To reduce boilerplate at some call sites, add a
`getOperatorAsMDNode()` for named metadata that's expected to only
return `MDNode` -- for now, that's everything, but debug node named
metadata (such as llvm.dbg.cu and llvm.dbg.sp) will soon change. This
is part of PR21433.
Note that there's a follow-up patch to clang for the API change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221375
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Wed, 5 Nov 2014 18:00:07 +0000 (18:00 +0000)]
remove extra breaks; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221374
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Wed, 5 Nov 2014 17:56:28 +0000 (17:56 +0000)]
IR: MDNode => Value: AsmWriter SlotTracker API
Change `SlotTracker::CreateMetadataSlot()` and
`SlotTracker::getMetadataSlot()` to use `Value` instead of `MDNode`.
Part of PR21433.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221373
91177308-0d34-0410-b5e6-
96231b3b80d8
Tilmann Scheller [Wed, 5 Nov 2014 17:45:04 +0000 (17:45 +0000)]
[ARM] Remove more dead code.
Dead code identified by the Clang static analyzer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221372
91177308-0d34-0410-b5e6-
96231b3b80d8
Zoran Jovanovic [Wed, 5 Nov 2014 17:43:00 +0000 (17:43 +0000)]
ps][microMIPS] Implement CodeGen support for ANDI16 instruction
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221371
91177308-0d34-0410-b5e6-
96231b3b80d8
Colin LeMahieu [Wed, 5 Nov 2014 17:38:48 +0000 (17:38 +0000)]
[Hexagon] [NFC] Alphabetizing cmake files.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221370
91177308-0d34-0410-b5e6-
96231b3b80d8
Zoran Jovanovic [Wed, 5 Nov 2014 17:38:31 +0000 (17:38 +0000)]
ps][microMIPS] Implement CodeGen support for SLL16 and SRL16 instructions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221369
91177308-0d34-0410-b5e6-
96231b3b80d8