OSDN Git Service
Quentin Colombet [Tue, 16 Feb 2016 19:26:02 +0000 (19:26 +0000)]
[GlobalISel] Re-apply r260922-260923 with MSVC-friendly code.
Original message:
Get rid of the ifdefs in TargetLowering.
Introduce a new API used only by GlobalISel: CallLowering.
This API will contain target hooks dedicated to call lowering.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260998
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 16 Feb 2016 18:50:12 +0000 (18:50 +0000)]
Pass a std::unique_ptr to IRMover::move.
It was already the one "destroying" the source module, now the API
reflects that.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260989
91177308-0d34-0410-b5e6-
96231b3b80d8
Derek Schuff [Tue, 16 Feb 2016 18:18:36 +0000 (18:18 +0000)]
[WebAssembly] Insert COPY_LOCAL between CopyToReg and FrameIndex DAG nodes
CopyToReg nodes don't support FrameIndex operands. Other targets select
the FI to some LEA-like instruction, but since we don't have that, we
need to insert some kind of instruction that can take an FI operand and
produces a value usable by CopyToReg (i.e. in a vreg). So insert a dummy
copy_local between Op and its FI operand. This results in a redundant
copy which we should optimize away later (maybe in the post-FI-lowering
peephole pass).
Differential Revision: http://reviews.llvm.org/D17213
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260987
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Tue, 16 Feb 2016 18:14:56 +0000 (18:14 +0000)]
[AMDGPU] Rename $dst operand to $vdst for VOP instructions.
Summary: This change renames output operand for VOP instructions from dst to vdst. This is needed to enable decoding named operands for disassembler.
Reviewers: vpykhtin, tstellarAMD, arsenm
Subscribers: arsenm, llvm-commits, nhaustov
Projects: #llvm-amdgpu-spb
Differential Revision: http://reviews.llvm.org/D16920
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260986
91177308-0d34-0410-b5e6-
96231b3b80d8
Philip Reames [Tue, 16 Feb 2016 17:14:30 +0000 (17:14 +0000)]
Revert 260705, it appears to be causing pr26628
The root issue appears to be a confusion around what makeNoWrapRegion actually does. It seems likely we need two versions of this function with slightly different semantics.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260981
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrey Turetskiy [Tue, 16 Feb 2016 16:41:38 +0000 (16:41 +0000)]
[X86] Enable the LEA optimization pass by default.
Differential Revision: http://reviews.llvm.org/D16877
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260979
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Tue, 16 Feb 2016 16:22:41 +0000 (16:22 +0000)]
[WebAssembly] Switch from RPO sorting to topological sorting.
WebAssembly doesn't require full RPO; topological sorting is sufficient and
can preserve more of the MachineBlockPlacement ordering. Unfortunately, this
still depends a lot on heuristics, because while we use the
MachineBlockPlacement ordering as a guide, we can't use it in places where
it isn't topologically ordered. This area will require further attention.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260978
91177308-0d34-0410-b5e6-
96231b3b80d8
Aaron Ballman [Tue, 16 Feb 2016 15:35:51 +0000 (15:35 +0000)]
A signed bitfield's range is [-1,0], so assigning 1 is technically an overflow. However, the other bitfield requires a signed value (it supports negative offsets), so it is slightly better to retain a signed 1-bit bitfield and use -1 instead of 1. Silences an MSVC warning.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260973
91177308-0d34-0410-b5e6-
96231b3b80d8
Aaron Ballman [Tue, 16 Feb 2016 15:29:06 +0000 (15:29 +0000)]
Reverting r260922-260923; they cause link failures with MSVC.
http://lab.llvm.org:8011/builders/lldb-x86-windows-msvc2015/builds/15436/steps/build/logs/stdio
http://bb.pgr.jp/builders/msbuild-llvmclang-x64-msc18-DA/builds/961/steps/build_llvm/logs/stdio
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260972
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Tue, 16 Feb 2016 15:17:21 +0000 (15:17 +0000)]
[WebAssembly] Create new registers instead of reusing old ones in RegStackify.
This avoids some complications updating LiveIntervals to be aware of the new
register lifetimes, because we can just compute new intervals from scratch
rather than describe how the old ones have been changed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260971
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 16 Feb 2016 15:16:00 +0000 (15:16 +0000)]
Reapply r260489.
Original commit message:
[readobj] Dump DT_JMPREL relocations when outputting dynamic relocations.
The bits of r260488 it depends on have been committed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260970
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Tue, 16 Feb 2016 15:14:23 +0000 (15:14 +0000)]
[WebAssembly] Implement support for custom NaN bit patterns.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260968
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 16 Feb 2016 14:50:39 +0000 (14:50 +0000)]
Introduce a getAsRange helper.
This requires making an error message a bit more generic, but that seems
a reasonable tradeoff.
Extracted from r260488 but simplified a bit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260967
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 16 Feb 2016 14:27:33 +0000 (14:27 +0000)]
Move DynRegionInfo out of the ELFDumper.
This reduces indentation in preparation to adding a bit more code to it.
Extracted from r260488.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260963
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 16 Feb 2016 14:17:48 +0000 (14:17 +0000)]
This reverts commit r260488 and r260489.
Original messages:
Revert "[readobj] Handle ELF files with no section table or with no program headers."
Revert "[readobj] Dump DT_JMPREL relocations when outputting dynamic relocations."
r260489 depends on r260488 and among other issues r260488 deleted error
handling code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260962
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrey Turetskiy [Tue, 16 Feb 2016 12:47:45 +0000 (12:47 +0000)]
[X86] PR26575: Fix LEA optimization pass.
Add a missing check for a type of address displacement operand of the load/store instruction being a candidate for LEA substitution.
Ref: https://llvm.org/bugs/show_bug.cgi?id=26575
Differential Revision: http://reviews.llvm.org/D17261
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260959
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Tue, 16 Feb 2016 09:53:47 +0000 (09:53 +0000)]
[Hexagon] Hoist nonnull assert up.
Once a pointer is turned into a reference it cannot be nullptr, clang
rightfully warns about this assert being a tautology. Put the assert
before the reference is created.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260949
91177308-0d34-0410-b5e6-
96231b3b80d8
Amaury Sechet [Tue, 16 Feb 2016 08:37:01 +0000 (08:37 +0000)]
Make sure the functions' range is empty before going through it in the LLVM C API test
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260947
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Tue, 16 Feb 2016 07:45:07 +0000 (07:45 +0000)]
[X86] Fix typos. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260943
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Tue, 16 Feb 2016 07:45:04 +0000 (07:45 +0000)]
[X86] Use range-based for loop. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260942
91177308-0d34-0410-b5e6-
96231b3b80d8
Amaury Sechet [Tue, 16 Feb 2016 07:33:23 +0000 (07:33 +0000)]
Do some refactoring in constant generation in the C API echo test. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260941
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Tue, 16 Feb 2016 07:28:03 +0000 (07:28 +0000)]
[X86] Fix typo in comment. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260940
91177308-0d34-0410-b5e6-
96231b3b80d8
Amaury Sechet [Tue, 16 Feb 2016 07:08:49 +0000 (07:08 +0000)]
Generate functions in 2 steps in the C API echo test. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260939
91177308-0d34-0410-b5e6-
96231b3b80d8
Junmo Park [Tue, 16 Feb 2016 06:46:58 +0000 (06:46 +0000)]
[SCEVExpander] Make findExistingExpansion smarter
Summary:
Extending findExistingExpansion can use existing value in ExprValueMap.
This patch gives 0.3~0.5% performance improvements on
benchmarks(test-suite, spec2000, spec2006, commercial benchmark)
Reviewers: mzolotukhin, sanjoy, zzheng
Differential Revision: http://reviews.llvm.org/D15559
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260938
91177308-0d34-0410-b5e6-
96231b3b80d8
Amaury Sechet [Tue, 16 Feb 2016 05:11:24 +0000 (05:11 +0000)]
Restore the capability to manipulate datalayout from the C API
Summary:
This consist in variosu addition to the C API:
LLVMTargetDataRef LLVMGetModuleDataLayout(LLVMModuleRef M);
void LLVMSetModuleDataLayout(LLVMModuleRef M, LLVMTargetDataRef DL);
LLVMTargetDataRef LLVMCreateTargetMachineData(LLVMTargetMachineRef T);
Reviewers: joker.eph, Wallbraker, echristo
Subscribers: axw
Differential Revision: http://reviews.llvm.org/D17255
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260936
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Tue, 16 Feb 2016 04:24:58 +0000 (04:24 +0000)]
[TableGen] Fix inconsistent spacing. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260935
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Tue, 16 Feb 2016 04:24:56 +0000 (04:24 +0000)]
[TableGen] Stop passing by reference an integer that doesn't get modified. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260934
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Tue, 16 Feb 2016 04:24:54 +0000 (04:24 +0000)]
[TableGen] Remove unused member variable. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260933
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Tue, 16 Feb 2016 04:17:42 +0000 (04:17 +0000)]
Remove an unnecessary std::move to fix -Wpessimizing-move warning.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260931
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Tue, 16 Feb 2016 02:48:30 +0000 (02:48 +0000)]
[TableGen] Use range-based for loop. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260928
91177308-0d34-0410-b5e6-
96231b3b80d8
Vedant Kumar [Tue, 16 Feb 2016 02:06:01 +0000 (02:06 +0000)]
Simplify users of StringRef::{l,r}trim (NFC)
r260925 introduced a version of the *trim methods which is preferable
when trimming a single kind of character. Update all users in llvm.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260926
91177308-0d34-0410-b5e6-
96231b3b80d8
Vedant Kumar [Tue, 16 Feb 2016 01:48:39 +0000 (01:48 +0000)]
[ADT] Add StringRef::{l,r}trim(char) overloads (NFC)
Add support for trimming a single kind of character from a StringRef.
This makes the common case of trimming null bytes much neater. It's also
probably a bit speedier too, since it avoids creating a std::bitset in
find_{first,last}_not_of.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260925
91177308-0d34-0410-b5e6-
96231b3b80d8
Quentin Colombet [Tue, 16 Feb 2016 01:38:09 +0000 (01:38 +0000)]
[GlobalISel][IRTranslator] Override getPassName.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260924
91177308-0d34-0410-b5e6-
96231b3b80d8
Quentin Colombet [Tue, 16 Feb 2016 01:05:16 +0000 (01:05 +0000)]
[GlobalISel] Add missing file in previous commit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260923
91177308-0d34-0410-b5e6-
96231b3b80d8
Quentin Colombet [Tue, 16 Feb 2016 00:57:44 +0000 (00:57 +0000)]
[GlobalISel] Get rid of the ifdefs in TargetLowering.
Introduce a new API used only by GlobalISel: CallLowering.
This API will contain target hooks dedicated to call lowering.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260922
91177308-0d34-0410-b5e6-
96231b3b80d8
Amaury Sechet [Tue, 16 Feb 2016 00:23:52 +0000 (00:23 +0000)]
Deprecate LLVMGetDataLayout and replace it by LLVMGetDataLayoutStr
Summary: The name is confusing as it matche another method on the module.
Reviewers: joker.eph, Wallbraker, echristo
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D17283
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260920
91177308-0d34-0410-b5e6-
96231b3b80d8
Amaury Sechet [Tue, 16 Feb 2016 00:22:02 +0000 (00:22 +0000)]
Kill LLVMAddTargetData
Summary: It's red, it's dead.
Reviewers: joker.eph, Wallbraker, echristo
Subscribers: llvm-commits, axw
Differential Revision: http://reviews.llvm.org/D17282
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260919
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Tue, 16 Feb 2016 00:17:56 +0000 (00:17 +0000)]
MITests: Update libdeps. llvm/Target/TargetOptions.h depends on MC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260918
91177308-0d34-0410-b5e6-
96231b3b80d8
Zia Ansari [Mon, 15 Feb 2016 23:44:13 +0000 (23:44 +0000)]
Implemented stack symbol table ordering/packing optimization to improve data locality and code size from SP/FP offset encoding.
Differential Revision: http://reviews.llvm.org/D15393
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260917
91177308-0d34-0410-b5e6-
96231b3b80d8
Amaury Sechet [Mon, 15 Feb 2016 23:40:06 +0000 (23:40 +0000)]
Rename LLVMSetDataLayout's argument to match what they stand for
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260916
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthias Braun [Mon, 15 Feb 2016 22:09:38 +0000 (22:09 +0000)]
unittests/MI: Add Core library reference
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260915
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthias Braun [Mon, 15 Feb 2016 21:38:42 +0000 (21:38 +0000)]
SmallPtrSet: Avoid initializing Array in the small case.
This patch avoids the initial memset at the cost of making iterators
slightly more complex. This should be beneficial as most SmallPtrSets
hold no or only a few elements, while iterating over them is less
common.
Differential Revision: http://reviews.llvm.org/D16672
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260913
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthias Braun [Mon, 15 Feb 2016 20:06:22 +0000 (20:06 +0000)]
APInt: Slightly simplify countLeadingZerosSlowCase()
We always clear the unused bits in the most signifant word so there is
no need to mask them out in countLeadingZerosSlowCase().
Differential Revision: http://reviews.llvm.org/D16621
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260911
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthias Braun [Mon, 15 Feb 2016 20:06:19 +0000 (20:06 +0000)]
APInt: Further simplify APInt::EqualSlowCase as suggested by Duncan
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260910
91177308-0d34-0410-b5e6-
96231b3b80d8
Ahmed Bougacha [Mon, 15 Feb 2016 19:32:54 +0000 (19:32 +0000)]
[X86] Remove now-dead variable and redundant assert. NFC.
The variable was made dead in NDEBUG by r260901, but the assert
was redundant anyway: get rid of both.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260908
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthias Braun [Mon, 15 Feb 2016 19:30:11 +0000 (19:30 +0000)]
Fix typo in LiveIntervalTest
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260907
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthias Braun [Mon, 15 Feb 2016 19:25:36 +0000 (19:25 +0000)]
LiveIntervalAnalysis: Support moving of subregister defs in handleMove
This is an updated version which fixes a bug that happened with
uses tied to an earlyclobber operand which end at an unusual slotindex.
If two definitions write to independent subregisters then they can be
put in any order. LiveIntervalAnalysis::handleMove() did not support
this previously because it looks like moving a definition of a vreg past
another one.
This is a modified version of a patch proposed (two years ago) by
Vincent Lejeune! This version does not touch the read-undef flags and is
extended for the case of moving a subregister def behind all uses - this
can happen for subregister defs that are completely unused.
Differential Revision: http://reviews.llvm.org/D9067
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260906
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthias Braun [Mon, 15 Feb 2016 19:25:34 +0000 (19:25 +0000)]
Add unittest for LiveIntervalAnalysis::handleMove()
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260905
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthias Braun [Mon, 15 Feb 2016 19:25:31 +0000 (19:25 +0000)]
MachineVerifier: Add parameter to choose if MachineFunction::verify() aborts
The abort on error behaviour is unpractical for debugger and unittest
usage.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260904
91177308-0d34-0410-b5e6-
96231b3b80d8
Colin LeMahieu [Mon, 15 Feb 2016 18:47:55 +0000 (18:47 +0000)]
[NFC] Fixing naming convention, lowercase start of function name.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260903
91177308-0d34-0410-b5e6-
96231b3b80d8
Colin LeMahieu [Mon, 15 Feb 2016 18:42:07 +0000 (18:42 +0000)]
[Hexagon] Wrapping all MCExprs inside MCOperands within HexagonMCExpr to simplify handling and allow flags on the expression.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260902
91177308-0d34-0410-b5e6-
96231b3b80d8
Ahmed Bougacha [Mon, 15 Feb 2016 18:07:29 +0000 (18:07 +0000)]
[CodeGen] Document and use getConstant's splat-building feature. NFC.
Differential Revision: http://reviews.llvm.org/D17229
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260901
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Mon, 15 Feb 2016 17:57:40 +0000 (17:57 +0000)]
[X86][SSE2] Regenerated sse2 tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260900
91177308-0d34-0410-b5e6-
96231b3b80d8
Jonas Paulsson [Mon, 15 Feb 2016 16:43:15 +0000 (16:43 +0000)]
[ScheduleDAGInstrs] isUnsafeMemoryObject() removed
This function was basically useless, since volatile memacesses or MIs with
unmodelled sideffects become global memory objects, and the other little
checks are also done elsewhere.
Reviewed by Andy Trick
http://reviews.llvm.org/D16881
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260899
91177308-0d34-0410-b5e6-
96231b3b80d8
Krzysztof Parzyszek [Mon, 15 Feb 2016 16:15:02 +0000 (16:15 +0000)]
[Hexagon] Missed testcase update in r260895
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260897
91177308-0d34-0410-b5e6-
96231b3b80d8
Scott Egerton [Mon, 15 Feb 2016 16:11:51 +0000 (16:11 +0000)]
[mips] Implemented the .hword directive.
Summary:
In order to pass the tests, this required marking R_MIPS_16 relocations
as needing to point to the symbol and not the section.
Reviewers: vkalintiris, dsanders
Subscribers: dsanders, llvm-commits
Differential Revision: http://reviews.llvm.org/D17200
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260896
91177308-0d34-0410-b5e6-
96231b3b80d8
Krzysztof Parzyszek [Mon, 15 Feb 2016 16:01:01 +0000 (16:01 +0000)]
[Hexagon] Use zero-extending loads for anyext
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260895
91177308-0d34-0410-b5e6-
96231b3b80d8
Silviu Baranga [Mon, 15 Feb 2016 15:38:17 +0000 (15:38 +0000)]
[LV] Add support for insertelt/extractelt processing during type truncation
Summary:
While shrinking types according to the required bits, we can
encounter insert/extract element instructions. This will cause us to
reach an llvm_unreachable statement.
This change adds support for truncating insert/extract element
operations, and adds a regression test.
Reviewers: jmolloy
Subscribers: mzolotukhin, llvm-commits
Differential Revision: http://reviews.llvm.org/D17078
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260893
91177308-0d34-0410-b5e6-
96231b3b80d8
Roman Gareev [Mon, 15 Feb 2016 14:48:50 +0000 (14:48 +0000)]
Tweak the LICM code to reuse the first sub-loop instead of creating a new one
LICM starts with an *empty* AST, and then merges in each sub-loop. While the
add code is appropriate for sub-loop 2 and up, it's utterly unnecessary for
sub-loop 1. If the AST starts off empty, we can just clone/move the contents
of the subloop into the containing AST.
Reviewed-by: Philip Reames <listmail@philipreames.com>
Differential Revision: http://reviews.llvm.org/D16753
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260892
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Mon, 15 Feb 2016 14:09:35 +0000 (14:09 +0000)]
[X86] More thorough partial-register division checks
For when grep counts are just not enough...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260891
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Mon, 15 Feb 2016 14:04:05 +0000 (14:04 +0000)]
[X86] Regenerated 64/128 bit multiply tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260890
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Mon, 15 Feb 2016 13:50:48 +0000 (13:50 +0000)]
[X86][SSE] More thorough testing of all-ones vectors re-materialization
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260889
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Mon, 15 Feb 2016 13:41:41 +0000 (13:41 +0000)]
[X86][SSE] Regenerated uint2fp special case tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260888
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Mon, 15 Feb 2016 13:19:13 +0000 (13:19 +0000)]
Make llvm/test/tools/llvm-symbolizer/pdb/pdb.test Py3-compatible.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260887
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Mon, 15 Feb 2016 12:32:16 +0000 (12:32 +0000)]
[X86][SSE] Regenerated fast isel intrinsics tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260885
91177308-0d34-0410-b5e6-
96231b3b80d8
Scott Egerton [Mon, 15 Feb 2016 10:04:38 +0000 (10:04 +0000)]
Reverted r260879 as it caused test failures in lld.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260880
91177308-0d34-0410-b5e6-
96231b3b80d8
Scott Egerton [Mon, 15 Feb 2016 09:34:15 +0000 (09:34 +0000)]
[mips] Removed the SHF_ALLOC flag from the .pdr section.
Summary:
This section is used for debug information and has no need to be
in memory at runtime. With this patch, LLVM now emits the same flags as
the GNU assembler. This patch also fixes an error when compiling
the Linux kernel, The error is that there are relocations within the
.pdr section in a VDSO.
Reviewers: vkalintiris, dsanders
Subscribers: llvm-commits, dsanders
Differential Revision: http://reviews.llvm.org/D17199
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260879
91177308-0d34-0410-b5e6-
96231b3b80d8
Igor Breger [Mon, 15 Feb 2016 08:25:28 +0000 (08:25 +0000)]
AVX512: Change store size of kmask. Store size of v8i1, v4i1 , v2i1 and i1 are changed to 16 bits.
If KMOVB not supported (require AVX512DQ) only KMOVW can be used so store size should be 2 bytes.
Differential Revision: http://reviews.llvm.org/D17138
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260878
91177308-0d34-0410-b5e6-
96231b3b80d8
Junmo Park [Mon, 15 Feb 2016 04:30:37 +0000 (04:30 +0000)]
Minor code cleanups. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260875
91177308-0d34-0410-b5e6-
96231b3b80d8
Sylvestre Ledru [Sun, 14 Feb 2016 20:16:22 +0000 (20:16 +0000)]
Fix some typos in the llvm doc
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260855
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Sun, 14 Feb 2016 18:11:52 +0000 (18:11 +0000)]
[X86][AVX] Fixed copy+paste typo in shuffle test
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260852
91177308-0d34-0410-b5e6-
96231b3b80d8
Amaury Sechet [Sun, 14 Feb 2016 10:06:34 +0000 (10:06 +0000)]
Use report_fatal_error more consistently in the C API echo test
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260849
91177308-0d34-0410-b5e6-
96231b3b80d8
Amaury Sechet [Sun, 14 Feb 2016 09:30:42 +0000 (09:30 +0000)]
Get constant cloning out of CloneValue so it can be used when creating globals.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260848
91177308-0d34-0410-b5e6-
96231b3b80d8
Amaury Sechet [Sun, 14 Feb 2016 09:14:30 +0000 (09:14 +0000)]
Move clone_params around
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260846
91177308-0d34-0410-b5e6-
96231b3b80d8
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