OSDN Git Service
Amaury Sechet [Sun, 14 Feb 2016 08:58:49 +0000 (08:58 +0000)]
Fix star alignment in Core.h
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260845
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sun, 14 Feb 2016 05:22:01 +0000 (05:22 +0000)]
[TableGen] Remove constant string argument from a method that's only called once. We can just hardcode the string inside. There already other things that make the method not reusable. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260840
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Sat, 13 Feb 2016 23:46:24 +0000 (23:46 +0000)]
[PM/AA] Wire BasicAA's new pass manager class up to the pass registry.
This ensures that all of the various pieces are working. The next patch
will wire up commandline-driven alias analysis chain building and allow
BasicAA to work with the AAManager.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260838
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Sat, 13 Feb 2016 23:32:00 +0000 (23:32 +0000)]
[PM/AA] Actually wire the AAManager I built for the new pass manager
into the new pass manager and fix the latent bugs there.
This lets everything live together nicely, but it isn't really useful
yet. I never finished wiring the AA layer up for the new pass manager,
and so subsequent patches will change this to do that wiring and get AA
stuff more fully integrated into the new pass manager. Turns out this is
necessary even to get functionattrs ported over. =]
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260836
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Sat, 13 Feb 2016 22:58:43 +0000 (22:58 +0000)]
Support: Fix incremental build when re-configuring targets
r180893 added an indirect include of llvm/Config/Targets.def to
llvm/Support/CodeGen.h, which in turn is included by things like
llvm/IR/Module.h. After a full build of LLVM and Clang, ninja had to
rebuild 1274 files after reconfiguring.
This commit strips CodeGen.h back down to just a pile of enums and moves
the expensive includes over to CodeGenCWrappers.h (which is only
included in two places). This gets ninja down to 88 files if you
reconfigure with, e.g., -DLLVM_TARGETS_TO_BUILD=X86.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260835
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Sat, 13 Feb 2016 21:54:04 +0000 (21:54 +0000)]
[X86][AVX] Lower shuffles as repeated lane shuffles then lane-crossing shuffles
This patch attempts to represent a shuffle as a repeating shuffle (recognisable by is128BitLaneRepeatedShuffleMask) with the source input(s) in their original lanes, followed by a single permutation of the 128-bit lanes to their final destinations.
On AVX2 we can additionally attempt to match using 64-bit sub-lane permutation. AVX2 can also now match a similar 'broadcasted' repeating shuffle.
This patch has several benefits:
* Avoids prematurely matching with lowerVectorShuffleByMerging128BitLanes which can require both inputs to have their input lanes permuted before shuffling.
* Can replace PERMPS/PERMD instructions - although these are useful for cross-lane unary shuffling, they require their shuffle mask to be pre-loaded (and increase register pressure).
* Matching the repeating shuffle makes use of a lot of existing shuffle lowering.
There is an outstanding minor AVX1 regression (combine_unneeded_subvector1 in vector-shuffle-combining.ll) of a previously 128-bit shuffle + subvector splat being converted to a subvector splat + (2 instruction) 256-bit shuffle, I intend to fix this in a followup patch for review.
Differential Revision: http://reviews.llvm.org/D16537
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260834
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sat, 13 Feb 2016 21:35:37 +0000 (21:35 +0000)]
Remove Proc feature flags for X86 processors that are used to inherit features from one processor to another. This exposed extra features to the -mattr command line that we shouldn't. Replace with just inherited listconcats.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260832
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sat, 13 Feb 2016 17:58:14 +0000 (17:58 +0000)]
[TableGen] Fix comment about 64-bit type I missed when I removed the underlying type in r260808.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260830
91177308-0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Sat, 13 Feb 2016 17:56:51 +0000 (17:56 +0000)]
[libFuzzer] remove std::vector operations from hot paths, NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260829
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Sat, 13 Feb 2016 17:26:29 +0000 (17:26 +0000)]
[x86-64] allow mfence even with -mno-sse (PR23203)
As shown in:
https://llvm.org/bugs/show_bug.cgi?id=23203
...we currently die because lowering believes that mfence is allowed without SSE2 on x86-64,
but the instruction def doesn't know that.
I don't know if allowing mfence without SSE is right, but if not, at least now it's consistently wrong. :)
Differential Revision: http://reviews.llvm.org/D17219
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260828
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sat, 13 Feb 2016 17:23:27 +0000 (17:23 +0000)]
[APInt] No need for a copy when taking min/max of an APInt.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260827
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sat, 13 Feb 2016 16:54:14 +0000 (16:54 +0000)]
[ConstantFolding] Reduce APInt and APFloat copying.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260826
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sat, 13 Feb 2016 16:39:39 +0000 (16:39 +0000)]
[AggressiveAntiDepBreaker] Skip some unnecessary BitVector copies.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260825
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sat, 13 Feb 2016 16:01:12 +0000 (16:01 +0000)]
Use ArrayRef to hide SmallVector details, kill a useless vector copy along the way.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260824
91177308-0d34-0410-b5e6-
96231b3b80d8
Krzysztof Parzyszek [Sat, 13 Feb 2016 14:06:01 +0000 (14:06 +0000)]
[Hexagon] Replace use of "std::map::emplace" with "insert"
Gcc 4.7.2-4 does not seem to have "emplace" in its implementation of map.
This should fix the build failure on polly-amd64-linux.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260816
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Sat, 13 Feb 2016 08:47:51 +0000 (08:47 +0000)]
[attrs] Move the norecurse deduction to operate on the node set rather
than the SCC object, and have it scan the instruction stream directly
rather than relying on call records.
This makes the behavior of this routine consistent between libc routines
and LLVM intrinsics for libc routines. We can go and start teaching it
about those being norecurse, but we should behave the same for the
intrinsic and the libc routine rather than differently. I chatted with
James Molloy and the inconsistency doesn't seem intentional and likely
is due to intrinsic calls not being modelled in the call graph analyses.
This also fixes a bug where we would deduce norecurse on optnone
functions, when generally we try to handle optnone functions as-if they
were replaceable and thus unanalyzable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260813
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Sat, 13 Feb 2016 07:29:49 +0000 (07:29 +0000)]
HexagonFrameLowering.cpp: Appease msc18 to give an explicit constructor SlotInfo() instead of member initializers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260812
91177308-0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Sat, 13 Feb 2016 06:24:18 +0000 (06:24 +0000)]
[libFuzzer] don't require seed in fuzzer::Mutate, instead use the global Fuzzer object for fuzzer::Mutate. This makes custom mutators fast
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260810
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sat, 13 Feb 2016 06:03:32 +0000 (06:03 +0000)]
[TableGen] Use range-based for loops. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260809
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sat, 13 Feb 2016 06:03:29 +0000 (06:03 +0000)]
No need to make the subtarget feature bit enum a uint64_t. This was a leftover from when the feature bit enum contained masks instead of bit indices.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260808
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthias Braun [Sat, 13 Feb 2016 04:35:31 +0000 (04:35 +0000)]
LiveIntervalAnalysis: Remove LiveVariables requirement
This requirement was a huge hack to keep LiveVariables alive because it
was optionally used by TwoAddressInstructionPass and PHIElimination.
However we have AnalysisUsage::addUsedIfAvailable() which we can use in
those passes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260806
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Sat, 13 Feb 2016 04:18:53 +0000 (04:18 +0000)]
AMDGPU: Prepare for reducing private element size.
Tests for the new scalarize all private access options will be
included with a future commit.
The only functional change is to make the split/scalarize behavior
for private access of > 4 element vectors to be consistent
with the flat/global handling. This makes the spilling worse
in the two changed tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260804
91177308-0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Sat, 13 Feb 2016 03:59:26 +0000 (03:59 +0000)]
[libFuzzer] remove the C++-ish variant of FuzzerDriver from the interface
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260801
91177308-0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Sat, 13 Feb 2016 03:46:26 +0000 (03:46 +0000)]
[libFuzzer] simplify CTOR of MutationDispatcher
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260800
91177308-0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Sat, 13 Feb 2016 03:37:24 +0000 (03:37 +0000)]
[libFuzzer] get rid of MutationDispatcher::Impl (simplify the code; NFC)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260799
91177308-0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Sat, 13 Feb 2016 03:25:16 +0000 (03:25 +0000)]
[libFuzzer] get rid of UserSuppliedFuzzer; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260798
91177308-0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Sat, 13 Feb 2016 03:00:53 +0000 (03:00 +0000)]
[libFuzzer] simplify the code around Random. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260797
91177308-0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Sat, 13 Feb 2016 02:39:30 +0000 (02:39 +0000)]
[libFuzzer] remove UserSuppliedFuzzer from the interface (it was a bad idea).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260796
91177308-0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Sat, 13 Feb 2016 02:29:38 +0000 (02:29 +0000)]
[libFuzzer] provide a plain C interface for custom mutators (experimental)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260794
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Sat, 13 Feb 2016 02:09:49 +0000 (02:09 +0000)]
AMDGPU/SI: Add llvm.amdgcn.mov.dpp intrinsic
This intrinsic will be used to expose dpp functionality to higher-level
languages. It will map to the dpp version of v_mov_b32.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260792
91177308-0d34-0410-b5e6-
96231b3b80d8
Keno Fischer [Sat, 13 Feb 2016 02:04:29 +0000 (02:04 +0000)]
[Cloning] Clone every Function's Debug Info
Summary:
Export the CloneDebugInfoMetadata utility, which clones all debug info
associated with a function into the first module. Also use this function
in CloneModule on each function we clone (the CloneFunction entrypoint
already does this).
Without this, cloning a module will lead to DI quality regressions,
especially since r252219 reversed the Function <-> DISubprogram edge
(before we could get lucky and have this edge preserved if the
DISubprogram itself was, e.g. due to location metadata).
This was verified to fix missing debug information in julia and
a unittest to verify the new behavior is included.
Patch by Yichao Yu! Thanks!
Reviewers: loladiro, pcc
Differential Revision: http://reviews.llvm.org/D17165
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260791
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Sat, 13 Feb 2016 01:56:21 +0000 (01:56 +0000)]
Add AMDGPU related triple vendors/OSes
As support expands to more runtimes, we'll need to
distinguish between more than just HSA and unknown.
This also lets us stop using unknown everywhere.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260790
91177308-0d34-0410-b5e6-
96231b3b80d8
Davide Italiano [Sat, 13 Feb 2016 01:52:47 +0000 (01:52 +0000)]
[llvm-size] Remove variable used only once.
The use of auto and the name were very weird anyway.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260789
91177308-0d34-0410-b5e6-
96231b3b80d8
Davide Italiano [Sat, 13 Feb 2016 01:38:16 +0000 (01:38 +0000)]
[llvm-size] Make error handling uniform.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260786
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Sat, 13 Feb 2016 01:24:08 +0000 (01:24 +0000)]
AMDGPU: Cleanup includes and random macros
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260784
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Sat, 13 Feb 2016 01:19:56 +0000 (01:19 +0000)]
AMDGPU: Add intrinsics for sin/cos
These provide direct access to the hardware instruction without
the unit version required like llvm.sin/llvm.cos lowering requires.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260782
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Sat, 13 Feb 2016 01:03:00 +0000 (01:03 +0000)]
AMDGPU: Rename intrinsic to better match instruction name
Also fixes missing f32 test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260780
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Sat, 13 Feb 2016 00:51:31 +0000 (00:51 +0000)]
AMDGPU/SI: Add instruction defs for VOP1 DPP instructions
Reviewers: nhaustov, cfang, arsenm
Subscribers: arsenm, llvm-commits
Differential Revision: http://reviews.llvm.org/D17159
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260774
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Sat, 13 Feb 2016 00:36:10 +0000 (00:36 +0000)]
AMDGPU: Fix broken condition causing warning
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260773
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Sat, 13 Feb 2016 00:29:57 +0000 (00:29 +0000)]
AMDGPU/SI: Organize intrinsics by subtarget
Reviewers: arsenm
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D17210
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260771
91177308-0d34-0410-b5e6-
96231b3b80d8
Pirama Arumuga Nainar [Sat, 13 Feb 2016 00:08:05 +0000 (00:08 +0000)]
Don't combine fp_round (fp_round x) if f80 to f16 is generated
Summary:
This patch skips DAG combine of fp_round (fp_round x) if it results in
an fp_round from f80 to f16.
fp_round from f80 to f16 always generates an expensive (and as yet,
unimplemented) libcall to __truncxfhf2. This prevents selection of
native f16 conversion instructions from f32 or f64. Moreover, the first
(value-preserving) fp_round from f80 to either f32 or f64 may become a
NOP in platforms like x86.
Reviewers: ab
Subscribers: srhines, llvm-commits
Differential Revision: http://reviews.llvm.org/D17221
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260769
91177308-0d34-0410-b5e6-
96231b3b80d8
Alexey Samsonov [Fri, 12 Feb 2016 23:51:06 +0000 (23:51 +0000)]
Fix Windows buildbot breakage.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260766
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Fri, 12 Feb 2016 23:45:29 +0000 (23:45 +0000)]
AMDGPU/SI: Detect uniform branches and emit s_cbranch instructions
Reviewers: arsenm
Subscribers: mareko, MatzeB, qcolombet, arsenm, llvm-commits
Differential Revision: http://reviews.llvm.org/D16603
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260765
91177308-0d34-0410-b5e6-
96231b3b80d8
Yunzhong Gao [Fri, 12 Feb 2016 23:37:57 +0000 (23:37 +0000)]
Disable the vzeroupper insertion pass on PS4.
Differential Revision: http://reviews.llvm.org/D16837
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260764
91177308-0d34-0410-b5e6-
96231b3b80d8
Justin Bogner [Fri, 12 Feb 2016 23:36:05 +0000 (23:36 +0000)]
cmake: Simplify the iOS.cmake toolchain
- Remove a comment that was clearly copy pasted from Android.cmake and
isn't relevant.
- Remove the toolchain's sensitivity to the environment. It's less
error prone to just allow users to set CMAKE_OSX_SYSROOT if they
want to use a custom SDK.
- Stop explicitly setting -mios-version-min to the default value. It
just adds needless complexity.
This makes building the native tablegen work for me even when SDKROOT
is set in the environment (or passed in as -DCMAKE_OSX_SYSROOT).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260763
91177308-0d34-0410-b5e6-
96231b3b80d8
Derek Schuff [Fri, 12 Feb 2016 22:56:03 +0000 (22:56 +0000)]
[WebAssembly] Report more meaningful error messages for some unsupported
ops.
Computed gotos and RETURNADDR may never be supported; we can do
FRAMEADDR in the future.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260759
91177308-0d34-0410-b5e6-
96231b3b80d8
Krzysztof Parzyszek [Fri, 12 Feb 2016 22:53:35 +0000 (22:53 +0000)]
[Hexagon] Optimize stack slot spills
Replace spills to memory with spills to registers, if possible. This
applies mostly to predicate registers (both scalar and vector), since
they are very limited in number. A spill of a predicate register may
happen even if there is a general-purpose register available. In cases
like this the stack spill/reload may be eliminated completely.
This optimization will consider all stack objects, regardless of where
they came from and try to match the live range of the stack slot with
a dead range of a register from an appropriate register class.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260758
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Fri, 12 Feb 2016 22:27:44 +0000 (22:27 +0000)]
[llvm-pdbdump] Start to decode some streams
We can decode a little bit of the first stream now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260754
91177308-0d34-0410-b5e6-
96231b3b80d8
Krzysztof Parzyszek [Fri, 12 Feb 2016 22:26:44 +0000 (22:26 +0000)]
[Hexagon] Mark HVX registers as volatile
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260753
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Fri, 12 Feb 2016 22:07:54 +0000 (22:07 +0000)]
fix test to use FileCheck
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260751
91177308-0d34-0410-b5e6-
96231b3b80d8
Derek Schuff [Fri, 12 Feb 2016 22:05:08 +0000 (22:05 +0000)]
[WebAssembly] Update test expectations after r260737
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260750
91177308-0d34-0410-b5e6-
96231b3b80d8
Krzysztof Parzyszek [Fri, 12 Feb 2016 21:56:41 +0000 (21:56 +0000)]
[Hexagon] Recognize more cases in copyPhysReg and stack slot load/store
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260748
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Fri, 12 Feb 2016 21:48:30 +0000 (21:48 +0000)]
[codeview] Describe local variables in registers
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260746
91177308-0d34-0410-b5e6-
96231b3b80d8
Rong Xu [Fri, 12 Feb 2016 21:36:17 +0000 (21:36 +0000)]
[PGO] Add another interface for annotateValueSite
Add another interface to function annotateValueSite() which directly uses the
VauleData array.
Differential Revision: http://reviews.llvm.org/D17108
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260741
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 12 Feb 2016 21:30:18 +0000 (21:30 +0000)]
[WebAssembly] Fix byval for empty types.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260740
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Fri, 12 Feb 2016 21:27:33 +0000 (21:27 +0000)]
[AArch64] Enable post-RA MI scheduler for Kryo.
This should have landed in r260686.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260739
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 12 Feb 2016 21:19:25 +0000 (21:19 +0000)]
[WebAssembly] Fix insertion of a BLOCK in a loop header that also ends a BLOCK.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260737
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Kaylor [Fri, 12 Feb 2016 21:10:16 +0000 (21:10 +0000)]
[WinEH] Prevent EH state numbering from skipping nested cleanup pads that never return
Differential Revision: http://reviews.llvm.org/D17208
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260733
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Fri, 12 Feb 2016 21:03:23 +0000 (21:03 +0000)]
[LIR] Allow merging of memsets in negatively strided loops.
Last part of PR25166.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260732
91177308-0d34-0410-b5e6-
96231b3b80d8
Justin Lebar [Fri, 12 Feb 2016 21:01:37 +0000 (21:01 +0000)]
Fix typo in comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260731
91177308-0d34-0410-b5e6-
96231b3b80d8
Justin Lebar [Fri, 12 Feb 2016 21:01:36 +0000 (21:01 +0000)]
[SimplifyCFG] Don't fold conditional branches that contain calls to convergent functions.
Summary:
Performing this optimization duplicates the call to the convergent
function and adds new control-flow dependencies, which is a no-no.
Reviewers: jingyue
Subscribers: broune, hfinkel, tra, resistor, joker.eph, arsenm, llvm-commits, mzolotukhin
Differential Revision: http://reviews.llvm.org/D17128
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260730
91177308-0d34-0410-b5e6-
96231b3b80d8
Justin Lebar [Fri, 12 Feb 2016 21:01:33 +0000 (21:01 +0000)]
[LoopRotate] Don't perform loop rotation if the loop header calls a convergent function.
Summary:
Calls to convergent functions can be duplicated, but only if the
duplicates are not control-flow dependent on any additional values.
Loop rotation doesn't meet the bar.
Reviewers: jingyue
Subscribers: mzolotukhin, llvm-commits, arsenm, joker.eph, resistor, tra, hfinkel, broune
Differential Revision: http://reviews.llvm.org/D17127
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260729
91177308-0d34-0410-b5e6-
96231b3b80d8
Justin Lebar [Fri, 12 Feb 2016 21:01:31 +0000 (21:01 +0000)]
Add convergent property to CodeMetrics.
Summary: No functional changes.
Reviewers: jingyue, arsenm
Subscribers: arsenm, llvm-commits
Differential Revision: http://reviews.llvm.org/D17126
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260728
91177308-0d34-0410-b5e6-
96231b3b80d8
Justin Lebar [Fri, 12 Feb 2016 20:59:20 +0000 (20:59 +0000)]
Initialize CodeMetrics' member variables inline with definitions.
Summary: No functional changes.
Reviewers: jingyue
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D17125
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260727
91177308-0d34-0410-b5e6-
96231b3b80d8
Krzysztof Parzyszek [Fri, 12 Feb 2016 20:54:15 +0000 (20:54 +0000)]
[Hexagon] Recognize more instructions in isLoadFromStackSlot/isStoreToStackSlot
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260725
91177308-0d34-0410-b5e6-
96231b3b80d8
Quentin Colombet [Fri, 12 Feb 2016 20:41:24 +0000 (20:41 +0000)]
Get rid of some GLOBAL_ISEL ifdefs that should be harmless for code size.
More to come, but those were easy.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260723
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Fri, 12 Feb 2016 20:33:51 +0000 (20:33 +0000)]
Remove unused variable
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260722
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Fri, 12 Feb 2016 20:26:46 +0000 (20:26 +0000)]
Remove LLVMGetTargetMachineData leftovers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260720
91177308-0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Fri, 12 Feb 2016 19:47:35 +0000 (19:47 +0000)]
[ADT] Revert the llvm/ADT/OptionSet.h header and unit test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260714
91177308-0d34-0410-b5e6-
96231b3b80d8
Philip Reames [Fri, 12 Feb 2016 19:24:57 +0000 (19:24 +0000)]
[GVN] Common code for local and non-local load availability [NFCI]
The attached patch removes all of the block local code for performing X-load forwarding by reusing the code used in the non-local case.
The motivation here is to remove duplication and in the process increase our test coverage of some fairly tricky code. I have some upcoming changes I'll be proposing in this area and wanted to have the code cleaned up a bit first.
Note: The review for this mostly happened in email which didn't make it to phabricator on the 258882 commit thread.
Differential Revision: http://reviews.llvm.org/D16608
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260711
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Fri, 12 Feb 2016 19:05:27 +0000 (19:05 +0000)]
[LIR] Partially revert r252926(NFC), which introduced a very subtle change.
In short, before r252926 we were comparing an unsigned (StoreSize) against an a
APInt (Stride), which is fine and well. After we were zero extending the Stride
and then converting to an unsigned, which is not the same thing. Obviously,
Stides can also be negative. This commit just restores the original behavior.
AFAICT, it's not possible to write a test case to expose the issue because
the code already has checks to make sure the StoreSize can't overflow an
unsigned (which prevents the Stride from overflowing an unsigned as well).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260706
91177308-0d34-0410-b5e6-
96231b3b80d8
Philip Reames [Fri, 12 Feb 2016 19:05:16 +0000 (19:05 +0000)]
[LVI] Exploit nsw/nuw when computing constant ranges
As the title says. Modelled after similar code in SCEV.
This is useful when analysing induction variables in loops which have been canonicalized by other passes. I wrote the tests as non-loops specifically to avoid the generality introduced in http://reviews.llvm.org/D17174. While that can handle many induction variables without *needing* to exploit nsw, there's no reason not to use it if we've already proven it.
Differential Revision: http://reviews.llvm.org/D17177
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260705
91177308-0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Fri, 12 Feb 2016 19:02:39 +0000 (19:02 +0000)]
[CMake] don't build libLTO when LLVM_ENABLE_PIC is OFF
When cmake is run with -DLLVM_ENABLE_PIC=OFF, build fails while
linking shared library libLTO.so, because its dependencies are built
with -fno-PIC. More details here: https://llvm.org/bugs/show_bug.cgi?id=26484.
This diff reverts r252652 (git
9fd4377ddb83aee3c049dc8757e7771edbb8ee71),
which removed check NOT LLVM_ENABLE_PIC before disabling build for libLTO.so.
Patch by Igor Sugak!
Differential Revision: http://reviews.llvm.org/D17049
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260703
91177308-0d34-0410-b5e6-
96231b3b80d8
Mehdi Amini [Fri, 12 Feb 2016 18:43:14 +0000 (18:43 +0000)]
GlobalISel is always built since r260566, reflect it in LLVMBuild.txt
Other component could not depends on an optional library in llvm-config
From: Mehdi Amini <mehdi.amini@apple.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260701
91177308-0d34-0410-b5e6-
96231b3b80d8
Mehdi Amini [Fri, 12 Feb 2016 18:43:10 +0000 (18:43 +0000)]
llvm-config: replace assertions with a helpful error message
From: Mehdi Amini <mehdi.amini@apple.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260700
91177308-0d34-0410-b5e6-
96231b3b80d8
Krzysztof Parzyszek [Fri, 12 Feb 2016 18:37:23 +0000 (18:37 +0000)]
[Hexagon] Add utility functions to detect sign- and zero-extending loads
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260698
91177308-0d34-0410-b5e6-
96231b3b80d8
Krzysztof Parzyszek [Fri, 12 Feb 2016 18:19:53 +0000 (18:19 +0000)]
[Hexagon] Replace expansion of spill pseudo-instructions in frame lowering
Rewrite the code to handle all pseudo-instructions in a single pass.
This temporarily reverts spill slot optimization that used general-
purpose registers to hold values of spilled predicate registers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260696
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Fri, 12 Feb 2016 18:12:38 +0000 (18:12 +0000)]
[InstCombine] Don't aggressively replace xor with icmp
For some cases, InstCombine replaces the sequence of xor/sub instruction
followed by cmp instruction into a single cmp instruction.
However, this replacement may result suboptimal result especially when
the xor/sub has more than one use, as discussed in
bug 26465 (https://llvm.org/bugs/show_bug.cgi?id=26465).
This patch make the replacement happen only when xor/sub has only one
use.
Differential Revision: http://reviews.llvm.org/D16915
Patch by Taewook Oh!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260695
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Fri, 12 Feb 2016 17:57:54 +0000 (17:57 +0000)]
[AMDGPU] Assembler: Swap operands of flat_store instructions to match AMD assembler
Historically, AMD internal sp3 assembler has flat_store* addr, data
format. To match existing code and to enable reuse, change LLVM
definitions to match. Also update MC and CodeGen tests.
Differential Revision: http://reviews.llvm.org/D16927
Patch by: Nikolay Haustov
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260694
91177308-0d34-0410-b5e6-
96231b3b80d8
Changpeng Fang [Fri, 12 Feb 2016 17:11:04 +0000 (17:11 +0000)]
AMDGPU/SI: Annotate Loops with Constant Condition in SIAnnotateControlFlow pass.
Summary:
It is possible that the loop condition can be a boolean constant (infinite loop,
for example). So we sould handle constant condition in annotating a loop. This
patch adds this functionality to support annotating constant condition.
Reviewers: tstellarAMD, arsenm
Subscribers: llvm-commits, arsenm
Differential Revision: http://reviews.llvm.org/D15093
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260692
91177308-0d34-0410-b5e6-
96231b3b80d8
Krzysztof Parzyszek [Fri, 12 Feb 2016 17:09:58 +0000 (17:09 +0000)]
[Hexagon] Remove HexagonExpandPredSpillCode pass
This code is dead. The expansion is now done in HexagonFrameLowering.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260691
91177308-0d34-0410-b5e6-
96231b3b80d8
Krzysztof Parzyszek [Fri, 12 Feb 2016 17:01:51 +0000 (17:01 +0000)]
[Hexagon] Eliminate pseudo instructions for circ/brev loads and stores
We can generate the actual instructions from the intrinsics without the
need for pseudo-instructions. Also, since the intrinsics have a side-
effect in a form of a store, attempt to optimize away loads from the
store location.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260690
91177308-0d34-0410-b5e6-
96231b3b80d8
Geoff Berry [Fri, 12 Feb 2016 16:31:41 +0000 (16:31 +0000)]
[AArch64] Reduce number of callee-save save/restores.
Summary:
Before this change, callee-save registers would be rounded up to even
pairs of GPRs and FPRs. This change eliminates these extra padding
load/stores, though it does keep the stack allocation the same size
unless both the GPR and FPR sets have an odd size, in which case one
full pair stack slot (16 bytes) is saved.
This optimization cannot currently be done for MachO targets since they
rely on a fast-path .debug_frame equivalent that can only encode
callee-save registers as pairs.
Reviewers: t.p.northover, rengolin, mcrosier, jmolloy
Subscribers: aemerson, rengolin, mcrosier, llvm-commits
Differential Revision: http://reviews.llvm.org/D17000
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260689
91177308-0d34-0410-b5e6-
96231b3b80d8
Krzysztof Parzyszek [Fri, 12 Feb 2016 16:27:23 +0000 (16:27 +0000)]
[Hexagon] Handle out-of-range offsets in eliminateFrameIndex
Create a virtual register that will hold the actual address and use it
with the offset of 0 in the place of the original FI.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260688
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Fri, 12 Feb 2016 15:51:51 +0000 (15:51 +0000)]
[AArch64] Add support for Qualcomm Kryo CPU.
Machine model description by Dave Estes <cestes@codeaurora.org>.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260686
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 12 Feb 2016 15:28:45 +0000 (15:28 +0000)]
Delete the deprecated LLVMLinkModules.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260683
91177308-0d34-0410-b5e6-
96231b3b80d8
Jun Bum Lim [Fri, 12 Feb 2016 15:25:39 +0000 (15:25 +0000)]
[AArch64] Merge two adjacent str WZR into str XZR
Summary:
This change merges adjacent 32 bit zero stores into a 64 bit zero store.
e.g.,
str wzr, [x0]
str wzr, [x0, #4]
becomes
str xzr, [x0]
Therefore, four adjacent 32 bit zero stores will be a single stp.
e.g.,
str wzr, [x0]
str wzr, [x0, #4]
str wzr, [x0, #8]
str wzr, [x0, #12]
becomes
stp xzr, xzr, [x0]
Reviewers: mcrosier, jmolloy, gberry, t.p.northover
Subscribers: aemerson, rengolin, mcrosier, llvm-commits
Differential Revision: http://reviews.llvm.org/D16933
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260682
91177308-0d34-0410-b5e6-
96231b3b80d8
Krzysztof Parzyszek [Fri, 12 Feb 2016 14:47:38 +0000 (14:47 +0000)]
[Hexagon] Specify vector alignment in DataLayout string
The DataLayout can calculate alignment of vectors based on the alignment
of the element type and the number of elements. In fact, it is the product
of these two values. The problem is that for vectors of N x i1, this will
return the alignment of N bytes, since the alignment of i1 is 8 bits. The
vector types of vNi1 should be aligned to N bits instead. Provide explicit
alignment for HVX vectors to avoid such complications.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260678
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Fri, 12 Feb 2016 12:37:21 +0000 (12:37 +0000)]
Fix uninitialized memory read.
Found by msan.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260676
91177308-0d34-0410-b5e6-
96231b3b80d8
Hrvoje Varga [Fri, 12 Feb 2016 12:11:26 +0000 (12:11 +0000)]
[mips][micromips] Written missing test for CEIL.L.S, CEIL.L.D, FLOOR.L.S and FLOOR.L.D instructions
Differential Revision: http://reviews.llvm.org/D17192
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260673
91177308-0d34-0410-b5e6-
96231b3b80d8
Haojian Wu [Fri, 12 Feb 2016 11:35:11 +0000 (11:35 +0000)]
Remove LLVMGetTargetMachineData in go-binding.
Summary:
LLVMGetTargetMachineData has been removed, and LLVMGetDataLayout is
suggested to use. The LLVMGetDataLayout is exposed in go bindings.
So it's safe to remove the function.
Reviewers: bkramer
Subscribers: llvm-commits, axw
Differential Revision: http://reviews.llvm.org/D17193
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260670
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Fri, 12 Feb 2016 09:47:49 +0000 (09:47 +0000)]
[attrs] Simplify the convergent removal to directly use the pre-built
node set rather than walking the SCC directly.
This directly exposes the functions and has already had null entries
filtered out. We also don't need need to handle optnone as it has
already been handled in the caller -- we never try to remove convergent
when there are optnone functions in the SCC.
With this change, the code for removing convergent should work with the
new pass manager and a different SCC analysis.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260668
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Fri, 12 Feb 2016 09:23:53 +0000 (09:23 +0000)]
[attrs] Consolidate the test for a non-SCC, non-convergent function call
with the test for a non-convergent intrinsic call.
While it is possible to use the call records to search for function
calls, we're going to do an instruction scan anyways to find the
intrinsics, we can handle both cases while scanning instructions. This
will also make the logic more amenable to the new pass manager which
doesn't use the same call graph structure.
My next patch will remove use of CallGraphNode entirely and allow this
code to work with both the old and new pass manager. Fortunately, it
should also get strictly simpler without changing functionality.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260666
91177308-0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Fri, 12 Feb 2016 07:50:01 +0000 (07:50 +0000)]
[unittests/ADT] OptionSetTest: ifdef out for now a specific test that fails on MSVC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260663
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Fri, 12 Feb 2016 06:31:30 +0000 (06:31 +0000)]
AMDGPU: Set flat_scratch from flat_scratch_init reg
This was hardcoded to the static private size, but this
would be missing the offset and additional size for someday
when we have dynamic sizing.
Also stops always initializing flat_scratch even when unused.
In the future we should stop emitting this unless flat instructions
are used to access private memory. For example this will initialize
it almost always on VI because flat is used for global access.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260658
91177308-0d34-0410-b5e6-
96231b3b80d8
Mehdi Amini [Fri, 12 Feb 2016 06:22:00 +0000 (06:22 +0000)]
C API: Remove LLVMGetDataLayout that was deprecated in 3.7
From: Mehdi Amini <mehdi.amini@apple.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260657
91177308-0d34-0410-b5e6-
96231b3b80d8
Mark Lacey [Fri, 12 Feb 2016 06:19:16 +0000 (06:19 +0000)]
Fix minor error with debug info doc.
Replace 'third' with 'fourth' in the description of the fourth argument.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260656
91177308-0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Fri, 12 Feb 2016 05:52:37 +0000 (05:52 +0000)]
[unittests/ADT] OptionSetTest: ifdef out a part that fails to compile on MSVC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260655
91177308-0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Fri, 12 Feb 2016 04:36:48 +0000 (04:36 +0000)]
[ADT] OptionSet: ifdef out some code that seems to be crashing MSVC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260654
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Fri, 12 Feb 2016 03:07:50 +0000 (03:07 +0000)]
[attrs] Run clang-format over a newly added routine in function-attrs
before I update it to be friendly with the new pass manager.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260653
91177308-0d34-0410-b5e6-
96231b3b80d8