Chad Rosier [Tue, 21 Jul 2015 17:47:56 +0000 (17:47 +0000)]
Follow up to r242810. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242812
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Tue, 21 Jul 2015 17:42:04 +0000 (17:42 +0000)]
[AArch64] Simplify the passing of arguments. NFC.
This is setup for future work planned for the AArch64 Load/Store Opt pass.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242810
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Tue, 21 Jul 2015 17:40:14 +0000 (17:40 +0000)]
Re-land 242726 to use RAII to do cleanup
The LooksLikeCodeInBug11395() codepath was returning without clearing
the ProcessedAllocas cache.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242809
91177308-0d34-0410-b5e6-
96231b3b80d8
Philip Reames [Tue, 21 Jul 2015 17:18:03 +0000 (17:18 +0000)]
[RewriteStatepointsForGC] Hoist some code out of a loop
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242808
91177308-0d34-0410-b5e6-
96231b3b80d8
Arnold Schwaighofer [Tue, 21 Jul 2015 17:07:07 +0000 (17:07 +0000)]
MergeFunc: Transfer the callee's attributes when replacing a direct caller
We insert a bitcast which obfuscates the getCalledFunction for the utility
function which looks up attributes from the called function. Loosing ABI
changing parameter attributes is a bad thing.
rdar://
21516488
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242807
91177308-0d34-0410-b5e6-
96231b3b80d8
Alex Lorenz [Tue, 21 Jul 2015 16:59:53 +0000 (16:59 +0000)]
MIR Serialization: Serialize the external symbol machine operands.
Reviewers: Duncan P. N. Exon Smith
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242806
91177308-0d34-0410-b5e6-
96231b3b80d8
Philip Reames [Tue, 21 Jul 2015 16:51:17 +0000 (16:51 +0000)]
[RewriteStatepointsForGC] Delete trivial code
A bit more code cleanup: delete some a trivial true assertion and supporting code, remove a redundant cast, and use count in assertions where feasible.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242805
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 21 Jul 2015 16:50:57 +0000 (16:50 +0000)]
Remove dead code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242804
91177308-0d34-0410-b5e6-
96231b3b80d8
Alex Lorenz [Tue, 21 Jul 2015 16:50:35 +0000 (16:50 +0000)]
IR: Extract a function 'printLLVMNameWithoutPrefix' from 'PrintLLVMName'. NFC.
This commit extracts the code that prints out a name of an LLVM value without a
prefix from a function 'PrintLLVMName' into a publicly accessible function named
'printLLVMNameWithoutPrefix'.
This change would be useful for MIR serialization, as it would allow the MIR
printer to reuse this function to print out the names of the external symbol
machine operands.
Reviewers: Duncan P. N. Exon Smith
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242803
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 21 Jul 2015 16:42:01 +0000 (16:42 +0000)]
Remove always false parameter.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242802
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 21 Jul 2015 16:40:14 +0000 (16:40 +0000)]
Use range loop. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242801
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 21 Jul 2015 16:26:21 +0000 (16:26 +0000)]
Replace the last uses of ELF::getSymbolName in llvm-readobj.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242798
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Tue, 21 Jul 2015 16:09:58 +0000 (16:09 +0000)]
fix formatting; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242796
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 21 Jul 2015 16:05:53 +0000 (16:05 +0000)]
Use helper function. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242795
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 21 Jul 2015 16:02:10 +0000 (16:02 +0000)]
llvm-readobj: use the associated string table to print symbols. NFI.
This just removes some cases that require ELFFile to eagerly parse the ELF
file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242794
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Bieneman [Tue, 21 Jul 2015 15:53:09 +0000 (15:53 +0000)]
[CMake] Projects supported via LLVM_EXTERNAL_*_SOURCE_DIR need to be explicitly specified.
One part of my refactoring from r242705 is untenable due to how CMake caches variables. There is no way other than caching to allow variables to be set in one directory and globally readable, but we really don't want to cache the temporary value marking that a directory has already been included.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242793
91177308-0d34-0410-b5e6-
96231b3b80d8
Nico Weber [Tue, 21 Jul 2015 15:48:53 +0000 (15:48 +0000)]
Revert 242726, it broke ASan on OS X.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242792
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 21 Jul 2015 14:45:56 +0000 (14:45 +0000)]
Remove unused variable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242789
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 21 Jul 2015 13:48:41 +0000 (13:48 +0000)]
Simplify printing the soname. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242786
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 21 Jul 2015 13:42:38 +0000 (13:42 +0000)]
Add missing c++ marker to .h file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242784
91177308-0d34-0410-b5e6-
96231b3b80d8
Karthik Bhat [Tue, 21 Jul 2015 08:52:23 +0000 (08:52 +0000)]
Constfold trunc,rint,nearbyint,ceil and floor using APFloat
A patch by Chakshu Grover!
This patch allows constfolding of trunc,rint,nearbyint,ceil and floor intrinsics using APFloat class.
Differential Revision: http://reviews.llvm.org/D11144
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242763
91177308-0d34-0410-b5e6-
96231b3b80d8
Igor Breger [Tue, 21 Jul 2015 07:11:28 +0000 (07:11 +0000)]
AVX512 : Implemented VPMADDUBSW and VPMADDWD instruction ,
Added tests for intrinsics and encoding.
Differential Revision: http://reviews.llvm.org/D11351
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242761
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Fiselier [Tue, 21 Jul 2015 04:25:13 +0000 (04:25 +0000)]
[LIT] Fix discovery.py test once again
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242758
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Tue, 21 Jul 2015 01:42:02 +0000 (01:42 +0000)]
[ARM] Define subtarget feature "reserve-r9", which is used to decide
whether register r9 should be reserved.
This recommits r242737, which broke bots because the number of subtarget
features went over the limit of 64.
This change is needed because we cannot use a backend option to set
cl::opt "arm-reserve-r9" when doing LTO.
Out-of-tree projects currently using cl::opt option "-arm-reserve-r9" to
reserve r9 should make changes to add subtarget feature "reserve-r9" to
the IR.
rdar://problem/
21529937
Differential Revision: http://reviews.llvm.org/D11320
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242756
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Tue, 21 Jul 2015 01:39:22 +0000 (01:39 +0000)]
Bump the size of FeatureBitset up to 96-bits.
This should avoid exceeding the maximum size when I add another subtarget
feature to ARM's subtarget.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242754
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 21 Jul 2015 01:01:29 +0000 (01:01 +0000)]
Don't do a walk over the dynamic table just to find DT_SONAME.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242752
91177308-0d34-0410-b5e6-
96231b3b80d8
Philip Reames [Tue, 21 Jul 2015 00:49:55 +0000 (00:49 +0000)]
[RewriteStatepointsForGC] Minor code cleanup [NFC]
We can use builders to simplify part of the code and we only check for the existance of the metadata value; this enables us to delete some redundant code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242751
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Wilkins [Tue, 21 Jul 2015 00:46:23 +0000 (00:46 +0000)]
[cmake] pass GO_EXECUTABLE to llgo-go
Summary:
When calling llgo-go from the llvm_add_go_executable
cmake function, specify $GO_EXECUTABLE as the go
command to call. Without this, llgo-go searches $PATH
which may be inconsistent with $GO_EXECUTABLE.
Reviewers: pcc
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D11290
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242749
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Bieneman [Tue, 21 Jul 2015 00:44:47 +0000 (00:44 +0000)]
[CMake] Fixing inconsistency caused by copy-pasta.
This will actually fix the PR 24194.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242748
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Tue, 21 Jul 2015 00:40:08 +0000 (00:40 +0000)]
AMDGPU: Set isMoveImm on s_movk_i32
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242747
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Bieneman [Tue, 21 Jul 2015 00:39:53 +0000 (00:39 +0000)]
[CMake] Fixing a problem with external projects that aren't getting enabled properly.
This should address PR 24194, and some builedbot failures.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242746
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthias Braun [Tue, 21 Jul 2015 00:19:01 +0000 (00:19 +0000)]
ARMLoadStoreOpt: Merge subs/adds into LDRD/STRD; Factor out common code
Re-apply of r241928 which had to be reverted because of the r241926
revert.
This commit factors out common code from MergeBaseUpdateLoadStore() and
MergeBaseUpdateLSMultiple() and introduces a new function
MergeBaseUpdateLSDouble() which merges adds/subs preceding/following a
strd/ldrd instruction into an strd/ldrd instruction with writeback where
possible.
Differential Revision: http://reviews.llvm.org/D10676
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242743
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthias Braun [Tue, 21 Jul 2015 00:18:59 +0000 (00:18 +0000)]
ARMLoadStoreOptimizer: Create LDRD/STRD on thumb2
Re-apply r241926 with an additional check that r13 and r15 are not used
for LDRD/STRD. See http://llvm.org/PR24190. This also already includes
the fix from r241951.
Differential Revision: http://reviews.llvm.org/D10623
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242742
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Mon, 20 Jul 2015 23:51:12 +0000 (23:51 +0000)]
Revert r242737.
This caused builds to fail with the following error message:
error:Too many subtarget features! Bump MAX_SUBTARGET_FEATURES.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242740
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Mon, 20 Jul 2015 23:21:30 +0000 (23:21 +0000)]
[ARM] Define subtarget feature "reserve-r9", which is used to decide
whether register r9 should be reserved.
This change is needed because we cannot use a backend option to set
cl::opt "arm-reserve-r9" when doing LTO.
Out-of-tree projects currently using cl::opt option "-arm-reserve-r9" to
reserve r9 should make changes to add subtarget feature "reserve-r9" to
the IR.
rdar://problem/
21529937
Differential Revision: http://reviews.llvm.org/D11320
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242737
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthias Braun [Mon, 20 Jul 2015 23:17:20 +0000 (23:17 +0000)]
Revert "ARMLoadStoreOptimizer: Create LDRD/STRD on thumb2"
This reverts commit r241926. This caused http://llvm.org/PR24190
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242735
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthias Braun [Mon, 20 Jul 2015 23:17:16 +0000 (23:17 +0000)]
Revert "ARMLoadStoreOpt: Merge subs/adds into LDRD/STRD; Factor out common code"
This reverts commit r241928. This caused http://llvm.org/PR24190
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242734
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthias Braun [Mon, 20 Jul 2015 23:17:14 +0000 (23:17 +0000)]
Revert "ARM: Use SpecificBumpPtrAllocator to fix leak introduced in r241920"
This reverts commit r241951. It caused http://llvm.org/PR24190
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242733
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthias Braun [Mon, 20 Jul 2015 23:11:42 +0000 (23:11 +0000)]
AArch64: Restrict macroop fusion heuristics to cyclone.
Even though this is just some hinting for the scheduler it doesn't make
sense to do that unless you know the target can perform the fusion.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242732
91177308-0d34-0410-b5e6-
96231b3b80d8
JF Bastien [Mon, 20 Jul 2015 22:51:32 +0000 (22:51 +0000)]
Targets: commonize some stack realignment code
This patch does the following:
* Fix FIXME on `needsStackRealignment`: it is now shared between multiple targets, implemented in `TargetRegisterInfo`, and isn't `virtual` anymore. This will break out-of-tree targets, silently if they used `virtual` and with a build error if they used `override`.
* Factor out `canRealignStack` as a `virtual` function on `TargetRegisterInfo`, by default only looks for the `no-realign-stack` function attribute.
Multiple targets duplicated the same `needsStackRealignment` code:
- Aarch64.
- ARM.
- Mips almost: had extra `DEBUG` diagnostic, which the default implementation now has.
- PowerPC.
- WebAssembly.
- x86 almost: has an extra `-force-align-stack` option, which the default implementation now has.
The default implementation of `needsStackRealignment` used to just return `false`. My current patch changes the behavior by simply using the above shared behavior. This affects:
- AMDGPU
- BPF
- CppBackend
- MSP430
- NVPTX
- Sparc
- SystemZ
- XCore
- Out-of-tree targets
This is a breaking change! `make check` passes.
The only implementation of the `virtual` function (besides the slight different in x86) was Hexagon (which did `MF.getFrameInfo()->getMaxAlignment() > 8`), and potentially some out-of-tree targets. Hexagon now uses the default implementation.
`needsStackRealignment` was being overwritten in `<Target>GenRegisterInfo.inc`, to return `false` as the default also did. That was odd and is now gone.
Reviewers: sunfish
Subscribers: aemerson, llvm-commits, jfb
Differential Revision: http://reviews.llvm.org/D11160
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242727
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Mon, 20 Jul 2015 22:49:44 +0000 (22:49 +0000)]
Don't try to instrument allocas used by outlined SEH funclets
Summary:
Arguments to llvm.localescape must be static allocas. They must be at
some statically known offset from the frame or stack pointer so that
other functions can access them with localrecover.
If we ever want to instrument these, we can use more indirection to
recover the addresses of these local variables. We can do it during
clang irgen or with the asan module pass.
Reviewers: eugenis
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D11307
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242726
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Mon, 20 Jul 2015 22:41:44 +0000 (22:41 +0000)]
Remove duplicated code.
Both ELFObjectFile and ELFFile had an implementation of getLoadName.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242725
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthias Braun [Mon, 20 Jul 2015 22:34:47 +0000 (22:34 +0000)]
AArch64: Add aditional Cyclone macroop fusion opportunities
Related to rdar://
19205407
Differential Revision: http://reviews.llvm.org/D10746
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242724
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthias Braun [Mon, 20 Jul 2015 22:34:44 +0000 (22:34 +0000)]
MachineScheduler: Restrict macroop fusion to data-dependent instructions.
Before creating a schedule edge to encourage MacroOpFusion check that:
- The predecessor actually writes a register that the branch reads.
- The predecessor has no successors in the ScheduleDAG so we can
schedule it in front of the branch.
This avoids skewing the scheduling heuristic in cases where macroop
fusion cannot happen.
Differential Revision: http://reviews.llvm.org/D10745
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242723
91177308-0d34-0410-b5e6-
96231b3b80d8
Dimitry Andric [Mon, 20 Jul 2015 22:24:40 +0000 (22:24 +0000)]
Avoid early pipefail exits due to grep failures in stage comparisons.
If objects or executables did not contain any RPATH, grep would return
nonzero, and the whole stage comparison loop would unexpectedly exit.
Fix this by checking the grep result explicitly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242722
91177308-0d34-0410-b5e6-
96231b3b80d8
Dimitry Andric [Mon, 20 Jul 2015 22:07:27 +0000 (22:07 +0000)]
Since BSD cmp(1) does not support the --ignore-initial option, use the
more portable 3rd and 4th arguments to skip the first 16 bytes during
the comparison of Phase2 and Phase3 objects.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242721
91177308-0d34-0410-b5e6-
96231b3b80d8
Krzysztof Parzyszek [Mon, 20 Jul 2015 22:05:38 +0000 (22:05 +0000)]
Add 'const' to a few more functions in MachineFrameInfo
Reviewer: Eric Christopher
http://reviews.llvm.org/D11372
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242720
91177308-0d34-0410-b5e6-
96231b3b80d8
Geoff Berry [Mon, 20 Jul 2015 22:03:52 +0000 (22:03 +0000)]
Fix comment typo (test commit). NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242719
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Mon, 20 Jul 2015 21:45:56 +0000 (21:45 +0000)]
Simplify now that we can iterate backwards. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242715
91177308-0d34-0410-b5e6-
96231b3b80d8
Quentin Colombet [Mon, 20 Jul 2015 21:42:14 +0000 (21:42 +0000)]
[ARM] Refactor the prologue/epilogue emission to be more robust.
This is the first step toward supporting shrink-wrapping for this target.
The changes could be summarized by these items:
- Expand the tail-call return as part of the expand pseudo pass.
- Get rid of the assumptions that the epilogue is the exit block:
* Do not assume which registers are free in the epilogue. (This indirectly
improve the lowering of the code for the segmented stacks, see the test
cases.)
* Take into account that the basic block can be empty.
Related to <rdar://problem/
20821730>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242714
91177308-0d34-0410-b5e6-
96231b3b80d8
Jingyue Wu [Mon, 20 Jul 2015 21:28:54 +0000 (21:28 +0000)]
[NVPTX] make load on global readonly memory to use ldg
Summary:
[NVPTX] make load on global readonly memory to use ldg
Summary:
As describe in [1], ld.global.nc may be used to load memory by nvcc when
__restrict__ is used and compiler can detect whether read-only data cache
is safe to use.
This patch will try to check whether ldg is safe to use and use them to
replace ld.global when possible. This change can improve the performance
by 18~29% on affected kernels (ratt*_kernel and rwdot*_kernel) in
S3D benchmark of shoc [2].
Patched by Xuetian Weng.
[1] http://docs.nvidia.com/cuda/kepler-tuning-guide/#read-only-data-cache
[2] https://github.com/vetter/shoc
Test Plan: test/CodeGen/NVPTX/load-with-non-coherent-cache.ll
Reviewers: jholewinski, jingyue
Subscribers: jholewinski, llvm-commits
Differential Revision: http://reviews.llvm.org/D11314
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242713
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Mon, 20 Jul 2015 21:23:29 +0000 (21:23 +0000)]
Simplify iterating over the dynamic section and report broken ones.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242712
91177308-0d34-0410-b5e6-
96231b3b80d8
Krzysztof Parzyszek [Mon, 20 Jul 2015 21:23:25 +0000 (21:23 +0000)]
[Hexagon] Generate MUX from conditional transfers when dot-new not possible
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242711
91177308-0d34-0410-b5e6-
96231b3b80d8
Aaron Ballman [Mon, 20 Jul 2015 21:14:14 +0000 (21:14 +0000)]
Suppress two warnings from MSVC 2015 that are triggered under /W4. Since we turn off exceptions in the code base, C4577 is moot. C4091 triggers on system headers and is a benign construct.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242708
91177308-0d34-0410-b5e6-
96231b3b80d8
Alex Lorenz [Mon, 20 Jul 2015 20:51:18 +0000 (20:51 +0000)]
MIR Serialization: Initial serialization of machine constant pools.
This commit implements the initial serialization of machine constant pools and
the constant pool index machine operands. The constant pool is serialized using
a YAML sequence of YAML mappings that represent the constant values.
The target-specific constant pool items aren't serialized by this commit.
Reviewers: Duncan P. N. Exon Smith
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242707
91177308-0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Mon, 20 Jul 2015 20:36:21 +0000 (20:36 +0000)]
test-release.sh: don't include /usr/local prefix in the tarball
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242706
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Bieneman [Mon, 20 Jul 2015 20:36:06 +0000 (20:36 +0000)]
[CMake] Cleanup tools/CMakeLists.txt to take advantage of the auto-registration that was already partially working.
Re-landing r242059 which re-landed r241621... I'm really bad at this.
Summary (r242059):
This change re-lands r241621, with an additional fix that was required to allow tool sources to live outside the llvm checkout. It also no longer renames LLVM_EXTERNAL_*_SOURCE_DIR. This change was reverted in r241663, because it renamed several variables of the format LLVM_EXTERNAL_*_* to LLVM_TOOL_*_*.
Summary (r241621):
The tools CMakeLists file already had implicit tool registration, but there were a few things off about it that needed to be altered to make it work. This change addresses all that. The changes in this patch are:
* factored out canonicalizing tool names from paths to CMake variables * removed the LLVM_IMPLICIT_PROJECT_IGNORE mechanism in favor of LLVM_EXTERNAL_${nameUPPER}_BUILD which I renamed to LLVM_TOOL_${nameUPPER}_BUILD because it applies to internal and external tools
* removed ignore_llvm_tool_subdirectory() in favor of just setting LLVM_TOOL_${nameUPPER}_BUILD to Off
* Added create_llvm_tool_options() to resolve a bug in add_llvm_external_project() - the old LLVM_EXTERNAL_${nameUPPER}_BUILD would not work on a clean CMake directory because the option could be created after it was set in code.
* Removed all but the minimum required calls to add_llvm_external_project from tools/CMakeLists.txt
Differential Revision: http://reviews.llvm.org/D10665
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242705
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjoy Das [Mon, 20 Jul 2015 20:31:39 +0000 (20:31 +0000)]
[ImplicitNullChecks] Work with implicit defs.
Summary:
This change generalizes the implicit null checks pass to work with
instructions that don't have any explicit register defs. This lets us
use X86's `cmp` against memory as faulting load instructions.
Reviewers: reames, JosephTremoulet
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D11286
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242703
91177308-0d34-0410-b5e6-
96231b3b80d8
Alex Lorenz [Mon, 20 Jul 2015 20:31:01 +0000 (20:31 +0000)]
MIR Parser: Add support for quoted named global value operands.
This commit extends the machine instruction lexer and implements support for
the quoted global value tokens. With this change the syntax for the global value
identifier tokens becomes identical to the syntax for the global identifier
tokens from the LLVM's assembly language.
Reviewers: Duncan P. N. Exon Smith
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242702
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Mon, 20 Jul 2015 20:07:50 +0000 (20:07 +0000)]
Remove Elf_Rela_Iter and Elf_Rel_Iter.
Use just the pointers and check for invalid relocation sections.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242700
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Mon, 20 Jul 2015 19:42:08 +0000 (19:42 +0000)]
[lit] Implement 'env' in the internal shell
The MSys 2 version of 'env' cannot be used to set 'TZ' in the
environment due to some portability hacks in the process spawning
compatibility layer[1]. This affects test/Object/archive-toc.test, which
tries to set TZ in the environment.
Other than that, this saves a subprocess invocation of a small unix
utility, which is makes the tests faster.
The internal shell does not support shell variable expansion, so this
idiom in the ASan tests isn't supported yet:
RUN: env ASAN_OPTIONS=$ASAN_OPTIONS:opt=1 ...
[1] https://github.com/Alexpux/MSYS2-packages/issues/294
Differential Revision: http://reviews.llvm.org/D11350
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242696
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Mon, 20 Jul 2015 18:42:27 +0000 (18:42 +0000)]
[AArch64] Change EON pattern to match more often.
Phabricator: http://reviews.llvm.org/D11359
Patch by Geoff Berry <gberry@codeaurora.org>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242694
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Berlin [Mon, 20 Jul 2015 18:26:23 +0000 (18:26 +0000)]
Miscellaneous Fixes for SparseBitVector
Summary:
1. Fix return value in `SparseBitVector::operator&=`.
2. Add checks if SBV is being assigned is invoking SBV.
Reviewers: dberlin
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D11342
Committed on behalf of sl@
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242693
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Schmidt [Mon, 20 Jul 2015 15:43:21 +0000 (15:43 +0000)]
Add missing test for r242296 (vec_sld)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242680
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Mon, 20 Jul 2015 14:45:03 +0000 (14:45 +0000)]
Report errors an invalid virtual addresses.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242676
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Mon, 20 Jul 2015 14:29:00 +0000 (14:29 +0000)]
Remove unnecessary code.
We were locating the dynamic string table via both the section and segment
headers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242674
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Mon, 20 Jul 2015 14:28:41 +0000 (14:28 +0000)]
AMDGPU/SI: Add VI patterns to select FLAT instructions for global memory ops
Summary:
The MUBUF addr64 bit has been removed on VI, so we must use FLAT
instructions when the pointer is stored in VGPRs.
Reviewers: arsenm
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D11067
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242673
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Mon, 20 Jul 2015 14:15:38 +0000 (14:15 +0000)]
Simplify the search for which segment has a virtual address. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242672
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Mon, 20 Jul 2015 13:35:33 +0000 (13:35 +0000)]
Simplify iterating over program headers and detect corrupt ones.
We now use a simple pointer and have range loops.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242669
91177308-0d34-0410-b5e6-
96231b3b80d8
Vasileios Kalintiris [Mon, 20 Jul 2015 12:28:56 +0000 (12:28 +0000)]
[mips] Added support for the ERETNC instruction.
Summary: This required adding the instruction predicate HasMips32r5.
Patch by Scott Egerton.
Reviewers: dsanders, vkalintiris
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D11136
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242666
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Mon, 20 Jul 2015 03:38:17 +0000 (03:38 +0000)]
llvm-readobj: Handle invalid references to the string table.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242658
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Mon, 20 Jul 2015 03:31:25 +0000 (03:31 +0000)]
Move CHECKs closer to the RUN line.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242657
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Mon, 20 Jul 2015 03:23:55 +0000 (03:23 +0000)]
llvm-readobj: call exit(1) on error.
llvm-readobj exists for testing llvm. We can safely stop the program
the first time we know the input in corrupted.
This is in preparation for making it handle a few more broken files.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242656
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Mon, 20 Jul 2015 03:01:49 +0000 (03:01 +0000)]
Refactor duplicated code. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242655
91177308-0d34-0410-b5e6-
96231b3b80d8
Arnold Schwaighofer [Sun, 19 Jul 2015 19:30:43 +0000 (19:30 +0000)]
Revert "MergeFuncs: Transfer the function parameter attributes to the call site"
It is okay to not transfer parameter attributes.
This reverts commit r242558.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242646
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Sun, 19 Jul 2015 17:09:43 +0000 (17:09 +0000)]
[X86][SSE] Tidied up vector CTLZ/CTTZ. NFCI.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242645
91177308-0d34-0410-b5e6-
96231b3b80d8
Yaron Keren [Sun, 19 Jul 2015 15:48:07 +0000 (15:48 +0000)]
Narrow Callee scope, suggestion from David Blaikie.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242644
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Sun, 19 Jul 2015 15:36:12 +0000 (15:36 +0000)]
[X86][SSE] Reordered cast vectorization costs. NFCI.
Reordered the data tables at the top and placed the lookups after. The first stage in the yak shaving necessary to get more accurate costs for a variety of targets given the recent improvements to SINT_TO_FP/UINT_TO_FP/SIGN_EXTEND vector lowering.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242643
91177308-0d34-0410-b5e6-
96231b3b80d8
Yaron Keren [Sun, 19 Jul 2015 11:52:02 +0000 (11:52 +0000)]
De-duplicate CS.getCalledFunction() expression.
Not sure if the optimizer will save the call as getCalledFunction()
is not a trivial access function but the code is clearer this way.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242641
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Sun, 19 Jul 2015 11:31:40 +0000 (11:31 +0000)]
[DAGCombiner] Fixed minor typo that was missed in D9097.
We don't bitcast the UNDEFs - that is done in visitVECTOR_SHUFFLE, and the getValueType should come from the operand's SDValue not the SDNode.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242640
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Kuperstein [Sun, 19 Jul 2015 11:03:08 +0000 (11:03 +0000)]
[X86] Add support for tbyte memory operand size for Intel-syntax x86 assembly
Differential Revision: http://reviews.llvm.org/D11257
Patch by: marina.yatsina@intel.com
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242639
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Sun, 19 Jul 2015 10:50:53 +0000 (10:50 +0000)]
Remove TargetInstrInfo::canFoldMemoryOperand
canFoldMemoryOperand is not actually used anywhere in the codebase - all existing users instead call foldMemoryOperand directly when they wish to fold and can correctly deduce what they need from the return value.
This patch removes the canFoldMemoryOperand base function and the target implementations; only x86 had a real (bit-rotted) implementation, although AMDGPU had a preparatory stub that had never needed to be completed.
Differential Revision: http://reviews.llvm.org/D11331
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242638
91177308-0d34-0410-b5e6-
96231b3b80d8
Elena Demikhovsky [Sun, 19 Jul 2015 10:17:33 +0000 (10:17 +0000)]
AVX-512: Floating point conversions for SKX - DAG Lowering.
SKX supports conversion for all FP types. Integer types include doublewords and quardwords.
I added "Legal" status for these nodes and a bunch of tests.
I added "NoVLX" for AVX DAG selection to force VLX instructions selection when VLX is supported.
Differential Revision: http://reviews.llvm.org/D11255
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242637
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Sun, 19 Jul 2015 09:56:36 +0000 (09:56 +0000)]
Use SDValue bool check. NFCI.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242636
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Fiselier [Sun, 19 Jul 2015 00:28:14 +0000 (00:28 +0000)]
[LIT] Allow for executeCommand to take the stdin input.
Summary: This patch allows executeCommand to pass a string to the processes stdin.
Reviewers: ddunbar, jroelofs
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D11332
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242631
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Sat, 18 Jul 2015 20:06:30 +0000 (20:06 +0000)]
[X86][SSE] Updated SHL/LSHR i64 vectorization costs.
This was missed in D8416.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242621
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sat, 18 Jul 2015 20:05:10 +0000 (20:05 +0000)]
[AggressiveAntiDepBreaker] Use range loops for multimap access.
No functionality change intended.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242620
91177308-0d34-0410-b5e6-
96231b3b80d8
Yaron Keren [Sat, 18 Jul 2015 19:57:34 +0000 (19:57 +0000)]
Rangify for loops in GlobalDCE, NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242619
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sat, 18 Jul 2015 17:43:23 +0000 (17:43 +0000)]
[Hexagon] Use composition instead of inheritance from STL types
The standard containers are not designed to be inherited from, as
illustrated by the MSVC hacks for NodeOrdering. No functional change
intended.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242616
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Sat, 18 Jul 2015 17:05:39 +0000 (17:05 +0000)]
[X86][SSE] Added additional fp/int tests.
Demonstrates some shortfalls in subvector(cvt(x)) compared to cvt(subvector(x)) patterns - especially on AVX/AVX2 targets.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242614
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Sat, 18 Jul 2015 16:53:51 +0000 (16:53 +0000)]
Refreshed tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242613
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Sat, 18 Jul 2015 16:14:56 +0000 (16:14 +0000)]
Refreshed tests and reordered in descending integer size.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242610
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Sat, 18 Jul 2015 15:56:33 +0000 (15:56 +0000)]
Tidyup shufflevector calls - don't repeat inputs if you can avoid it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242609
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Sat, 18 Jul 2015 03:26:46 +0000 (03:26 +0000)]
[PM/AA] Remove the addEscapingUse update API that won't be easy to
directly model in the new PM.
This also was an incredibly brittle and expensive update API that was
never fully utilized by all the passes that claimed to preserve AA, nor
could it reasonably have been extended to all of them. Any number of
places add uses of values. If we ever wanted to reliably instrument
this, we would want a callback hook much like we have with ValueHandles,
but doing this for every use addition seems *extremely* expensive in
terms of compile time.
The only user of this update mechanism is GlobalsModRef. The idea of
using this to keep it up to date doesn't really work anyways as its
analysis requires a symmetric analysis of two different memory
locations. It would be very hard to make updates be sufficiently
rigorous to *guarantee* symmetric analysis in this way, and it pretty
certainly isn't true today.
However, folks have been using GMR with this update for a long time and
seem to not be hitting the issues. The reported issue that the update
hook fixes isn't even a problem any more as other changes to
GetUnderlyingObject worked around it, and that issue stemmed from *many*
years ago. As a consequence, a prior patch provided a flag to control
the unsafe behavior of GMR, and this patch removes the update mechanism
that has questionable compile-time tradeoffs and is causing problems
with moving to the new pass manager. Note the lack of test updates --
not one test in tree actually requires this update, even for a contrived
case.
All of this was extensively discussed on the dev list, this patch will
just enact what that discussion decides on. I'm sending it for review in
part to show what I'm planning, and in part to show the *amazing* amount
of work this avoids. Every call to the AA here is something like three
to six indirect function calls, which in the non-LTO pipeline never do
any work! =[
Differential Revision: http://reviews.llvm.org/D11214
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242605
91177308-0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Sat, 18 Jul 2015 00:03:37 +0000 (00:03 +0000)]
[libFuzzer] require the files and directories passed to the fuzzer to exist
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242596
91177308-0d34-0410-b5e6-
96231b3b80d8
Evgeniy Stepanov [Fri, 17 Jul 2015 23:51:18 +0000 (23:51 +0000)]
[asan] Fix shadow mapping on Android/AArch64.
Instrumentation and the runtime library were in disagreement about
ASan shadow offset on Android/AArch64.
This fixes a large number of existing tests on Android/AArch64.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242595
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthias Braun [Fri, 17 Jul 2015 23:18:30 +0000 (23:18 +0000)]
ARM: Enable MachineScheduler and disable PostRAScheduler for swift.
Reapply r242500 now that the swift schedmodel includes LDRLIT.
This is mostly done to disable the PostRAScheduler which optimizes for
instruction latencies which isn't a good fit for out-of-order
architectures. This also allows to leave out the itinerary table in
swift in favor of the SchedModel ones.
This change leads to performance improvements/regressions by as much as
10% in some benchmarks, in fact we loose 0.4% performance over the
llvm-testsuite for reasons that appear to be unknown or out of the
compilers control. rdar://
20803802 documents the investigation of
these effects.
While it is probably a good idea to perform the same switch for the
other ARM out-of-order CPUs, I limited this change to swift as I cannot
perform the benchmark verification on the other CPUs.
Differential Revision: http://reviews.llvm.org/D10513
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242588
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthias Braun [Fri, 17 Jul 2015 23:18:26 +0000 (23:18 +0000)]
ARM: Add scheduling information for LDRLIT instructions to swift scheduling model
These pseudo instructions are only lowered after register allocation and
are therefore still present when the machine scheduler runs.
Add a run: line to a testcase that uses the uncommon flags necessary to
actually produce a LDRLIT instruction on swift.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242587
91177308-0d34-0410-b5e6-
96231b3b80d8
Quentin Colombet [Fri, 17 Jul 2015 23:04:06 +0000 (23:04 +0000)]
[RAGreedy] Add an experimental deferred spilling feature.
The idea of deferred spilling is to delay the insertion of spill code until the
very end of the allocation. A "candidate" to spill variable might not required
to be spilled because of other evictions that happened after this decision was
taken. The spirit is similar to the optimistic coloring strategy implemented in
Preston and Briggs graph coloring algorithm.
For now, this feature is highly experimental. Although correct, it would require
much more modification to properly model the effect of spilling.
Anyway, this early patch helps prototyping this feature.
Note: The test case cannot unfortunately be reduced and is probably fragile.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242585
91177308-0d34-0410-b5e6-
96231b3b80d8
Alex Lorenz [Fri, 17 Jul 2015 22:48:04 +0000 (22:48 +0000)]
MIR Parser: Allow the dollar characters in all of the identifier tokens.
This commit modifies the machine instruction lexer so that it now accepts the
'$' characters in identifier tokens.
This change makes the syntax for unquoted global value tokens consistent with
the syntax for the global idenfitier tokens in the LLVM's assembly language.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242584
91177308-0d34-0410-b5e6-
96231b3b80d8