OSDN Git Service
Simon Pilgrim [Fri, 6 May 2016 22:22:18 +0000 (22:22 +0000)]
[SLPVectorizer][X86] Regenerated SEXT/ZEXT cast vectorization tests
Added 256-bit vector test as well
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268811
91177308-0d34-0410-b5e6-
96231b3b80d8
Weiming Zhao [Fri, 6 May 2016 22:20:13 +0000 (22:20 +0000)]
[ARM] Fix Scavenger assert due to underestimated stack size
(this is resubmit of r268529 with minor refactoring. r268529 was reverted
at r268536 due a memory sanitizer failure. I have not been able to
reproduce that failure and I checked all the variable used in my change
but I could not spot an issue. I did some refactoring and see if it will
give a clearer hint)
Summary:
Currently, when checking if a stack is "BigStack" or not, it doesn't count into spills and arguments. Therefore, LLVM won't reserve spill slot for this actually "BigStack". This may cause scavenger failure.
Reviewers: rengolin
Subscribers: vitalybuka, aemerson, rengolin, tberghammer, danalbert, srhines, llvm-commits
Differential Revision: http://reviews.llvm.org/D19896
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268810
91177308-0d34-0410-b5e6-
96231b3b80d8
Philip Reames [Fri, 6 May 2016 22:17:01 +0000 (22:17 +0000)]
Reapply 267210 with fix for PR27490
Original Commit Message
Extend load/store type canonicalization to handle unordered operations
Extend the type canonicalization logic to work for unordered atomic loads and stores. Note that while this change itself is fairly simple and low risk, there's a reasonable chance this will expose problems in the backends by suddenly generating IR they wouldn't have seen before. Anything of this nature will be an existing bug in the backend (you could write an atomic float load), but this will definitely change the frequency with which such cases are encountered. If you see problems, feel free to revert this change, but please make sure you collect a test case.
Note that the concern about lowering is now much less likely. PR27490 proved that we already *were* mucking with the types of ordered atomics and volatiles. As a result, this change doesn't introduce as much new behavior as originally thought.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268809
91177308-0d34-0410-b5e6-
96231b3b80d8
Zachary Turner [Fri, 6 May 2016 22:15:42 +0000 (22:15 +0000)]
Make llvm-pdbdump print CV type records
This reuses the CVTypeDumper from libcodeview to dump full
information about type records within a PDB file.
Differential Revision: http://reviews.llvm.org/D20022
Reviewed By: rnk
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268808
91177308-0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Fri, 6 May 2016 21:58:35 +0000 (21:58 +0000)]
[libFuzzer] add exeprimental -rss_limit_mb flag to fight against OOMs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268807
91177308-0d34-0410-b5e6-
96231b3b80d8
Justin Bogner [Fri, 6 May 2016 21:57:30 +0000 (21:57 +0000)]
CMake: generate check targets for lit suites without their own lit.cfgs
Currently our cmake generates targets like check-llvm-unit and
check-llvm-transforms-loopunroll-x86, but not check-llvm-transforms or
check-llvm-transforms-adce. This is because the search for test suites
only lists the ones with a custom lit.cfg or lit.local.cfg.
Instead, we can do something a little smarter - any directory under
test that isn't called Inputs or inside a directory called Inputs is a
test suite.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268806
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthias Braun [Fri, 6 May 2016 21:47:41 +0000 (21:47 +0000)]
LiveIntervalAnalysis: Fix handleMove() extending liverange for undef inputs
Fix handleMove() incorrectly extending liveranges when an undef input of
a vreg was moved past the (current) end of the liverange.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268805
91177308-0d34-0410-b5e6-
96231b3b80d8
Philip Reames [Fri, 6 May 2016 21:43:51 +0000 (21:43 +0000)]
[GVN] PRE of unordered loads
Again, fairly simple. Only change is ensuring that we actually copy the property of the load correctly. The aliasing legality constraints were already handled by the FRE patches. There's nothing special about unorder atomics from the perspective of the PRE algorithm itself.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268804
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Fri, 6 May 2016 21:41:55 +0000 (21:41 +0000)]
[SLPVectorizer][X86] Added BSWAP/BITREVERSE vectorization tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268803
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Fri, 6 May 2016 21:33:01 +0000 (21:33 +0000)]
[SLPVectorizer][X86] Added CTPOP/CTLZ/CTTZ vectorization tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268800
91177308-0d34-0410-b5e6-
96231b3b80d8
Quentin Colombet [Fri, 6 May 2016 21:21:50 +0000 (21:21 +0000)]
Revert "[X86] Add a new LOW32_ADDR_ACCESS_RBP register class."
This reverts commit r268796.
I believe it breaks test/CodeGen/X86/asm-mismatched-types.ll with:
Cannot emit physreg copy instruction
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268799
91177308-0d34-0410-b5e6-
96231b3b80d8
Zachary Turner [Fri, 6 May 2016 21:19:29 +0000 (21:19 +0000)]
Fix failing test due to merge conflict.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268798
91177308-0d34-0410-b5e6-
96231b3b80d8
Quentin Colombet [Fri, 6 May 2016 21:10:53 +0000 (21:10 +0000)]
[X86] Add a new LOW32_ADDR_ACCESS_RBP register class.
ABIs like NaCl uses 32-bit addresses but have 64-bit frame.
The new register class reflects those constraints when choosing a
register class for a address access.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268796
91177308-0d34-0410-b5e6-
96231b3b80d8
Quentin Colombet [Fri, 6 May 2016 21:10:43 +0000 (21:10 +0000)]
[X86] Rename the X32_ADDR_ACCESS register class into LOW32_ADDR_ACCESS.
This register class may be used by any ABIs that uses x86_64 ISA while
using 32-bit addresses, not just in X32 cases. Make sure the name
reflects that.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268795
91177308-0d34-0410-b5e6-
96231b3b80d8
Nico Weber [Fri, 6 May 2016 21:07:02 +0000 (21:07 +0000)]
Revert r268760, it caused PR27670.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268794
91177308-0d34-0410-b5e6-
96231b3b80d8
Zachary Turner [Fri, 6 May 2016 20:59:35 +0000 (20:59 +0000)]
Add missing include.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268792
91177308-0d34-0410-b5e6-
96231b3b80d8
Zachary Turner [Fri, 6 May 2016 20:51:57 +0000 (20:51 +0000)]
Port DebugInfoPDB over to using llvm::Error.
Differential Revision: http://reviews.llvm.org/D19940
Reviewed By: rnk
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268791
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjoy Das [Fri, 6 May 2016 20:39:33 +0000 (20:39 +0000)]
[RS4GC] Fix typo in comment
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268790
91177308-0d34-0410-b5e6-
96231b3b80d8
Kevin Enderby [Fri, 6 May 2016 20:16:28 +0000 (20:16 +0000)]
Change GenericBinaryError to no longer include a FileName, which is then not
part of the error message.
As the caller is the one that needs to add the name of where the "object file"
comes from to the error message as the object file could be in an archive, or
coming from a slice of a Mach-O universal file or a buffer created by a JIT.
In the cases of a Mach-O universal file the architecture name may or may not
also need to be printed which is up to the tool code. For example if the tool
code is only selecting the host architecture slice then that architecture name
is never printed.
This patch is the change to the libObject code and there will be follow on
commits for changes to the code for each tool.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268789
91177308-0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Fri, 6 May 2016 20:14:48 +0000 (20:14 +0000)]
[libFuzzer] more trophies
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268788
91177308-0d34-0410-b5e6-
96231b3b80d8
Ahmed Bougacha [Fri, 6 May 2016 20:03:03 +0000 (20:03 +0000)]
[X86] Accept imp-defs of GR64 super-registers in FixupBW MOVrr.
Testcase will follow shortly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268787
91177308-0d34-0410-b5e6-
96231b3b80d8
Marcin Koscielnicki [Fri, 6 May 2016 19:36:56 +0000 (19:36 +0000)]
[MSan] [X86] Fix vararg helper for fixed arguments in overflow area.
This fixes http://llvm.org/PR27646 on x86_64.
Differential Revision: http://reviews.llvm.org/D19997
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268783
91177308-0d34-0410-b5e6-
96231b3b80d8
Artem Tamazov [Fri, 6 May 2016 19:32:38 +0000 (19:32 +0000)]
[AMDGPU][llvm-mc] Some refactoring of .td files
Some custom Operands and AsmOperandClasses moved to proper place.
No functional changes.
Differential Revision: http://reviews.llvm.org/D20012
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268780
91177308-0d34-0410-b5e6-
96231b3b80d8
Adrian Prantl [Fri, 6 May 2016 19:26:47 +0000 (19:26 +0000)]
Refactor the Verifier so it can diagnose IR validation errors and debug
info metadata errors separately. (NFC)
This patch refactors the Verifier so it can diagnose IR validation errors
and debug info metadata errors separately.
The motivation behind this change is that broken (or outdated) debug info
can be "recovered" from by stripping the debug info.
The problem I'm trying to solve with this sequence of patches is that
historically we've done a really bad job at verifying debug info.
We want to be able to make the verifier stricter without having to worry
about breaking bitcode compatibility with existing producers. For example,
we don't necessarily want IR produced by an older version of clang to be
rejected by an LTO link just because of malformed debug info, and rather
provide an option to strip it. Note that merely outdated (but well-formed)
debug info would continue to be auto-upgraded in this scenario.
http://reviews.llvm.org/D19986
rdar://problem/
25818489
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268778
91177308-0d34-0410-b5e6-
96231b3b80d8
Krzysztof Parzyszek [Fri, 6 May 2016 19:13:38 +0000 (19:13 +0000)]
[Hexagon] Be careful about anti-dependencies with a call in packetizer
In a case like
J2_callr <ga:@foo>, %R0<imp-use>, ...
R0<def> = ...
the anti-dependency on R0 cannot be ignored and the two instructions
cannot be packetized together, since if they were, the assignment to
R0 would take place before the call.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268776
91177308-0d34-0410-b5e6-
96231b3b80d8
Philip Reames [Fri, 6 May 2016 18:46:45 +0000 (18:46 +0000)]
[GVN] Handle unordered atomics in cross block FRE
You'll note there are essentially no code changes here. Cross block FRE heavily reuses code from the block local FRE. All of the tricky parts were done as part of the previous patch and the refactoring that removed the original code duplication.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268775
91177308-0d34-0410-b5e6-
96231b3b80d8
Justin Bogner [Fri, 6 May 2016 18:42:16 +0000 (18:42 +0000)]
SDAG: Don't leave dangling dead nodes after SelectCodeCommon
Relying on the caller to clean up after we've replaced all uses of a
node won't work when we've migrated to the `void Select(...)` API.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268774
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Fri, 6 May 2016 18:23:14 +0000 (18:23 +0000)]
The associated PR for this test was PR27135 not PR27132.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268772
91177308-0d34-0410-b5e6-
96231b3b80d8
Quentin Colombet [Fri, 6 May 2016 18:22:48 +0000 (18:22 +0000)]
[X86] Get rid of X32_NOREX_ADDR_ACCESS register class.
According to H.J. Lu <hjl.tools@gmail.com>, this register class is never
used.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268771
91177308-0d34-0410-b5e6-
96231b3b80d8
Philip Reames [Fri, 6 May 2016 18:17:13 +0000 (18:17 +0000)]
[GVN] Do local FRE for unordered atomic loads
This patch is the first in a small series teaching GVN to optimize unordered loads aggressively. This change just handles block local FRE because that's the simplest thing which lets me test MDA, and the AvailableValue pieces. Somewhat suprisingly, MDA appears fine and only a couple of small changes are needed in GVN.
Once this is in, I'll tackle non-local FRE and PRE. The former looks like a natural extension of this, the later will require a couple of minor changes.
Differential Revision: http://reviews.llvm.org/D19440
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268770
91177308-0d34-0410-b5e6-
96231b3b80d8
Mehdi Amini [Fri, 6 May 2016 18:17:03 +0000 (18:17 +0000)]
Tweak the ThinLTO pass pipeline
Summary:
The original ThinLTO pipeline was derived from some
work I did tuning FullLTO on the test suite and SPEC. This
patch reduces the amount of work done in the "linker phase" of
the build, and extend the function simplifications passes
performed during the "compile phase". This helps the build time
by reducing the IR as much as possible during the compile phase
and limiting the work to be performed during the "link phase",
while keeping the performance "on par" with the existing pipeline.
Reviewers: tejohnson
Subscribers: llvm-commits, joker.eph
Differential Revision: http://reviews.llvm.org/D19773
From: Mehdi Amini <mehdi.amini@apple.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268769
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Fri, 6 May 2016 18:07:46 +0000 (18:07 +0000)]
[SimplifyCFG] propagate branch metadata when creating select (retry r268550 / r268751 with possible fix)
Retrying r268550/r268751 which were reverted at r268577/r268765 due a memory sanitizer failure.
I have not been able to reproduce that failure, but I've taken another guess at fixing
the problem in this version of the patch and will watch for another failure.
Original commit message:
Unlike earlier similar fixes, we need to recalculate the branch weights
in this case.
Differential Revision: http://reviews.llvm.org/D19674
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268767
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Fri, 6 May 2016 17:51:37 +0000 (17:51 +0000)]
revert r268751 - caused same failures on msan bot
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268765
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Fri, 6 May 2016 17:50:07 +0000 (17:50 +0000)]
[CostModel][X86] Tweak 'SSE2-only' test CPU as it was only disabling SSE41 not SSE3/SSSE3 etc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268763
91177308-0d34-0410-b5e6-
96231b3b80d8
Artem Tamazov [Fri, 6 May 2016 17:48:48 +0000 (17:48 +0000)]
[AMDGPU][llvm-mc] Add support for sendmsg(...) syntax.
Added support for sendmsg(MSG[, OP[, STREAM_ID]]) syntax
in s_sendmsg and s_sendmsghalt instructions.
The syntax matches the SP3 assembler/disassembler rules.
That is why implicit inputs (like M0 and EXEC) are not printed
to disassembly output anymore.
sendmsg(...) allows only known message types and attributes,
even if literals are used instead of symbolic names.
However, raw literal (without "sendmsg") still can be used,
and that allows for any 16-bit value.
Tests updated/added.
Differential Revision: http://reviews.llvm.org/D19596
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268762
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Fri, 6 May 2016 17:48:35 +0000 (17:48 +0000)]
[CostModel][X86] Added ctlz/cttz undef-zero costmodel tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268761
91177308-0d34-0410-b5e6-
96231b3b80d8
Ahmed Bougacha [Fri, 6 May 2016 17:42:57 +0000 (17:42 +0000)]
[X86] Teach X86FixupBWInsts to promote MOV8rr/MOV16rr to MOV32rr.
Codesize is less (16) or equal (8), and we avoid partial dependencies.
Differential Revision: http://reviews.llvm.org/D19999
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268760
91177308-0d34-0410-b5e6-
96231b3b80d8
Ahmed Bougacha [Fri, 6 May 2016 17:28:47 +0000 (17:28 +0000)]
[X86] Remove \brief in FixupBW. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268754
91177308-0d34-0410-b5e6-
96231b3b80d8
Ahmed Bougacha [Fri, 6 May 2016 17:28:42 +0000 (17:28 +0000)]
[X86] Simplify FixupBW sub_8bit_hi-related logic. NFC.
Instead of passing around sizes and asking for subregs, we can check
the subreg indices we care about: sub_8bit_hi and sub_8bit.
Differential Revision: http://reviews.llvm.org/D20006
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268753
91177308-0d34-0410-b5e6-
96231b3b80d8
Geoff Berry [Fri, 6 May 2016 17:12:38 +0000 (17:12 +0000)]
[AArch64] Fix test to specify triple and disable post-RA scheduling.
This should fix bot breakage caused by r268746:
[AArch64] Combine callee-save and local stack SP adjustment instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268752
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Fri, 6 May 2016 17:07:47 +0000 (17:07 +0000)]
[SimplifyCFG] propagate branch metadata when creating select (retry r268550 with possible fix)
Retrying r268550 which was reverted at r268577 due a memory sanitizer failure.
I have not been able to reproduce that failure, but I've taken a guess at fixing
the problem in this version of the patch and will watch for another failure.
Original commit message:
Unlike earlier similar fixes, we need to recalculate the branch weights
in this case.
Differential Revision: http://reviews.llvm.org/D19674
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268751
91177308-0d34-0410-b5e6-
96231b3b80d8
Geoff Berry [Fri, 6 May 2016 16:34:59 +0000 (16:34 +0000)]
[AArch64] Combine callee-save and local stack SP adjustment instructions.
Summary:
If a function needs to allocate both callee-save stack memory and local
stack memory, we currently decrement/increment the SP in two steps:
first for the callee-save area, and then for the local stack area. This
changes the code to allocate them both at once at the very beginning/end
of the function. This has two benefits:
1) there is one fewer sub/add micro-op in the prologue/epilogue
2) the stack adjustment instructions act as a scheduling barrier, so
moving them to the very beginning/end of the function increases post-RA
scheduler's ability to move instructions (that only depend on argument
registers) before any of the callee-save stores
This change can cause an increase in instructions if the original local
stack SP decrement could be folded into the first store to the stack.
This occurs when the first local stack store is to stack offset 0. In
this case we are trading off one more sub instruction for one fewer sub
micro-op (along with benefits (2) and (3) above).
Reviewers: t.p.northover
Subscribers: aemerson, rengolin, mcrosier, llvm-commits
Differential Revision: http://reviews.llvm.org/D18619
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268746
91177308-0d34-0410-b5e6-
96231b3b80d8
Jun Bum Lim [Fri, 6 May 2016 15:08:57 +0000 (15:08 +0000)]
[AArch64] Decouple zero store promotion from narrow ld merge. NFC.
Summary: This change refactors to decouple the zero store promotion from the narrow ld merge and add a flag (enable-narrow-ld-merge=true) to control the narrow ld merge optimization.
Reviewers: jmolloy, t.p.northover, mcrosier
Subscribers: aemerson, rengolin, mcrosier, llvm-commits
Differential Revision: http://reviews.llvm.org/D19885
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268744
91177308-0d34-0410-b5e6-
96231b3b80d8
Nikolay Haustov [Fri, 6 May 2016 14:59:04 +0000 (14:59 +0000)]
Revert "AMDGPU/SI: Add amdgpu_kernel calling convention. Part 2."
This reverts commit
47486d52454d60cdf6becc0b2efe533c73794380.
It broke calling OpenCL kernel from another kernel.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268739
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Fri, 6 May 2016 14:38:14 +0000 (14:38 +0000)]
[CostModel][X86] Added costmodel tests for vector ctpop/ctlz/cttz/bitreverse/bswap
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268738
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Sanders [Fri, 6 May 2016 14:37:24 +0000 (14:37 +0000)]
[mips] Fix inconsistent .cprestore behaviour between direct object emission and assembling.
Summary:
Direct object emission has an initialization order problem where an
InitMCObjectFile is called after MipsTargetELFStreamer determines whether
PIC is enabled by default or not. There doesn't seem to be point that
initializes all cases so split the responsibility between
MipsTargetELFStreamer and MipsAsmPrinter.
Reviewers: sdardis
Subscribers: dsanders, llvm-commits, sdardis
Differential Revision: http://reviews.llvm.org/D19728
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268737
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Fri, 6 May 2016 14:25:14 +0000 (14:25 +0000)]
[SimplifyCFG] Prefer a simplification based on a dominating condition.
Rather than merge two branches with a common destination.
Differential Revision: http://reviews.llvm.org/D19743
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268735
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Sanders [Fri, 6 May 2016 13:49:25 +0000 (13:49 +0000)]
[mips] Correct the ordering of HI/LO pairs in the relocation table.
Summary:
There seems to have been a misunderstanding as to the meaning of 'offset' in
the rules laid down by our ABI. The previous code believed that 'offset' meant
the offset within the section that the relocation is applied to. However, it
should have meant the offset from the symbol used in the relocation expression.
This patch adds two fields to ELFRelocationEntry and uses them to correct the
order of relocations for MIPS. These fields contain:
* The original symbol before shouldRelocateWithSymbol() is considered. This
ensures that R_MIPS_GOT16 is able to correctly distinguish between local and
external symbols, allowing us to tell whether %got() requires a matching
%lo() or not (local symbols require one, external symbols don't). It also
prevents confusing cases where the fuzzy matching rules cause things like
%hi(foo)/%lo(foo+3) and %hi(bar)/%lo(bar+1) to swap their %lo()'s.
* The original offset before shouldRelocateWithSymbol() is considered. The
existing Addend field is always zero when the object uses in place addends
(because it's already moved it to the encoding) but MIPS needs to use the
original offset to ensure that the linker correctly calculates the carry-in
bit for %hi() and %got().
IAS ensures that unmatchable %hi()/%got() relocations are placed at the end of
the table to ensure that the linker rejects the table (we're unable to report
such errors directly). The alternatives to this risk accidental matching
against inappropriate relocations which may silently compute incorrect values
due to an incorrect carry bit between the %lo() and %hi()/%got().
Reviewers: sdardis
Subscribers: dsanders, sdardis, rafael, llvm-commits
Differential Revision: http://reviews.llvm.org/D19718
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268733
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Sanders [Fri, 6 May 2016 13:23:51 +0000 (13:23 +0000)]
[mips][mips16] Use isUnconditionalBranch() in AnalyzeBranch() and constant island pass.
Summary:
This stops it misidentifying unconditional branches as conditional branches
which fixes a -verify-machineinstrs error about exiting a function via fall through.
Reviewers: sdardis
Subscribers: dsanders, sdardis, llvm-commits
Differential Revision: http://reviews.llvm.org/D19864
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268731
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Sanders [Fri, 6 May 2016 12:57:26 +0000 (12:57 +0000)]
[mips][fastisel] Conditional moves do not have implicit operands.
Reviewers: sdardis
Subscribers: dsanders, sdardis, llvm-commits
Differential Revision: http://reviews.llvm.org/D19862
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268730
91177308-0d34-0410-b5e6-
96231b3b80d8
Sam Kolton [Fri, 6 May 2016 11:31:17 +0000 (11:31 +0000)]
[TableGen] AsmMatcher: support for default values for optional operands
Summary:
This change allows to specify "DefaultMethod" for optional operand (IsOptional = 1) in AsmOperandClass that return default value for operand. This is used in convertToMCInst to set default values in MCInst.
Previously if you wanted to set default value for operand you had to create custom converter method. With this change it is possible to use standard converters even when optional operands presented.
Reviewers: tstellarAMD, ab, craig.topper
Subscribers: jyknight, dsanders, arsenm, nhaustov, llvm-commits
Differential Revision: http://reviews.llvm.org/D18242
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268726
91177308-0d34-0410-b5e6-
96231b3b80d8
Ryan Govostes [Fri, 6 May 2016 11:22:11 +0000 (11:22 +0000)]
Fix whitespace and line wrapping. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268725
91177308-0d34-0410-b5e6-
96231b3b80d8
Ryan Govostes [Fri, 6 May 2016 10:25:22 +0000 (10:25 +0000)]
[asan] add option to set shadow mapping offset
Allowing overriding the default ASAN shadow mapping offset with the
-asan-shadow-offset option, and allow zero to be specified for both offset and
scale.
Patch by Aaron Carroll <aaronc@apple.com>.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268724
91177308-0d34-0410-b5e6-
96231b3b80d8
Dylan McKay [Fri, 6 May 2016 10:12:31 +0000 (10:12 +0000)]
[AVR] Add a majority of the backend code
Summary: This adds the majority of the AVR backend.
Reviewers: hfinkel, dsanders, vkalintiris, arsenm
Subscribers: dylanmckay
Differential Revision: http://reviews.llvm.org/D17906
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268722
91177308-0d34-0410-b5e6-
96231b3b80d8
Silviu Baranga [Fri, 6 May 2016 09:37:14 +0000 (09:37 +0000)]
Attempt to fix the modules builder by declaring SCEV in LoopUtils.h
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268720
91177308-0d34-0410-b5e6-
96231b3b80d8
Nikolay Haustov [Fri, 6 May 2016 09:23:13 +0000 (09:23 +0000)]
AMDGPU/SI: Add amdgpu_kernel calling convention. Part 2.
Summary:
Check calling convention in AMDGPUMachineFunction::isKernel
This will be used for AMDGPU_HSA_KERNEL symbol type in output ELF.
Also, in the future unused non-kernels may be optimized.
Reviewers: tstellarAMD, arsenm
Subscribers: arsenm, joker.eph, llvm-commits
Differential Revision: http://reviews.llvm.org/D19917
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268719
91177308-0d34-0410-b5e6-
96231b3b80d8
Nikolay Haustov [Fri, 6 May 2016 09:07:29 +0000 (09:07 +0000)]
AMDGPU/SI: Add amdgpu_kernel calling convention. Part 1.
Summary:
This will be used for AMDGPU_HSA_KERNEL symbol type in output ELF.
Also, in the future unused non-kernels may be optimized.
For now, also accept SPIR_KERNEL for HCC frontend.
Also, add bitcode compatibility tests for missing calling conventions
except AVR_BUILTIN which doesn't have parse code.
Reviewers: tstellarAMD, arsenm
Subscribers: arsenm, joker.eph, llvm-commits
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268717
91177308-0d34-0410-b5e6-
96231b3b80d8
Mehdi Amini [Fri, 6 May 2016 08:25:33 +0000 (08:25 +0000)]
ThinLTO: fix assertion and refactor check for hidden use from inline ASM in a helper function
This test was crashing, and currently it breaks bootstrapping clang with debuginfo
Differential Revision: http://reviews.llvm.org/D20008
From: Mehdi Amini <mehdi.amini@apple.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268715
91177308-0d34-0410-b5e6-
96231b3b80d8
Zlatko Buljan [Fri, 6 May 2016 08:24:14 +0000 (08:24 +0000)]
[mips][microMIPS] Add CodeGen support for MUL* and DMUL* instructions
Differential Revision: http://reviews.llvm.org/D15744
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268714
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Fri, 6 May 2016 06:56:14 +0000 (06:56 +0000)]
[TableGen] Fix a memory leak when creating SwitchOpcodeMatchers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268712
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Fri, 6 May 2016 06:21:27 +0000 (06:21 +0000)]
[TableGen] Remove isSafeToReorderWithPatternPredicate from DAGISelMatchers as its not used anymore.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268711
91177308-0d34-0410-b5e6-
96231b3b80d8
Xinliang David Li [Fri, 6 May 2016 05:49:19 +0000 (05:49 +0000)]
[PM] port IR based PGO prof-gen pass to new pass manager
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268710
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Collingbourne [Fri, 6 May 2016 02:41:23 +0000 (02:41 +0000)]
BitcodeWriter: Simplify. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268707
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Fri, 6 May 2016 02:37:59 +0000 (02:37 +0000)]
[TableGen] Remove getHash support from DAGISelMatcher. It hasn't been used for some time.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268706
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Fri, 6 May 2016 02:37:56 +0000 (02:37 +0000)]
[TableGen] Remove SinkPatternPredicates from the DAG isel matcher optimizer.
Pattern predicates already appear to be emitted as far down as they can be. The optimization was making no changes on any in-tree target.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268705
91177308-0d34-0410-b5e6-
96231b3b80d8
Xinliang David Li [Fri, 6 May 2016 02:13:00 +0000 (02:13 +0000)]
[profile] Remove another unneeded field in raw profile reader
DataValueSize is now removed. The change is consolidated
with previous raw version bump.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268703
91177308-0d34-0410-b5e6-
96231b3b80d8
Xinliang David Li [Fri, 6 May 2016 01:41:24 +0000 (01:41 +0000)]
document version change
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268702
91177308-0d34-0410-b5e6-
96231b3b80d8
Philip Reames [Fri, 6 May 2016 01:13:58 +0000 (01:13 +0000)]
[EarlyCSE] Rename a variable for clarity [NFC]
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268701
91177308-0d34-0410-b5e6-
96231b3b80d8
Ahmed Bougacha [Fri, 6 May 2016 00:58:00 +0000 (00:58 +0000)]
[CodeGen] Round [SU]INT_TO_FP result when promoting from f16.
If we don't, values that aren't precisely representable in f16 could
be used as-is in a promoted f32 operation, which would produce
incorrect results.
AArch64 had the correct behavior; add a focused test.
Fixes http://llvm.org/PR26871
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268700
91177308-0d34-0410-b5e6-
96231b3b80d8
Rui Ueyama [Fri, 6 May 2016 00:51:58 +0000 (00:51 +0000)]
Make StringTableBuilder to cache hash values.
This change seems to speed up LLD a bit if it has a lot of mergeable
sections. The number is below. It's not too bad for a small patch.
Time to link Clang (debug build):
w/o patch 6.3696 seconds
w/patch 6.2746 seconds (-1.5%)
Differential Revision: http://reviews.llvm.org/D19933
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268698
91177308-0d34-0410-b5e6-
96231b3b80d8
Justin Bogner [Thu, 5 May 2016 23:59:57 +0000 (23:59 +0000)]
Object: Fix two -Wpessimizing-move warnings after r268694
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268697
91177308-0d34-0410-b5e6-
96231b3b80d8
Kevin Enderby [Thu, 5 May 2016 23:55:27 +0000 (23:55 +0000)]
Fix window bots failures due to r268694 - Cleanup and refactor of malformedError() in lib/Object/MachOObjectFile.cpp .
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268696
91177308-0d34-0410-b5e6-
96231b3b80d8
Adam Nemet [Thu, 5 May 2016 23:41:28 +0000 (23:41 +0000)]
[LAA] Fix confusing debug message
This message used to be correct, when all we cared about was whether the
dependence was safe (i.e. NoDep) or unsafe. With the current more
precise characterization, this is a forward dep.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268695
91177308-0d34-0410-b5e6-
96231b3b80d8
Kevin Enderby [Thu, 5 May 2016 23:41:05 +0000 (23:41 +0000)]
Cleanup and refactor of malformedError() in lib/Object/MachOObjectFile.cpp .
No functional change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268694
91177308-0d34-0410-b5e6-
96231b3b80d8
Justin Bogner [Thu, 5 May 2016 23:19:08 +0000 (23:19 +0000)]
SDAG: Rename Select->SelectImpl and repurpose Select as returning void
This is a step towards removing the rampant undefined behaviour in
SelectionDAG, which is a part of llvm.org/PR26808.
We rename SelectionDAGISel::Select to SelectImpl and update targets to
match, and then change Select to return void and consolidate the
sketchy behaviour we're trying to get away from there.
Next, we'll update backends to implement `void Select(...)` instead of
SelectImpl and eventually drop the base Select implementation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268693
91177308-0d34-0410-b5e6-
96231b3b80d8
Justin Bogner [Thu, 5 May 2016 22:37:45 +0000 (22:37 +0000)]
SDAG: Remove OPC_MarkGlueResults and associated logic. NFC
This opcode never happens in practice, and yet the logic we have in
place to handle it would be undefined behaviour if we ever executed
it. Remove it rather than trying to refactor code that's never
reached.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268692
91177308-0d34-0410-b5e6-
96231b3b80d8
Krzysztof Parzyszek [Thu, 5 May 2016 22:00:44 +0000 (22:00 +0000)]
[scan-build] fix warnings emitted on LLVM Hexagon code base
Patch by Apelete Seketeli.
Differential Revision: http://reviews.llvm.org/D19968
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268691
91177308-0d34-0410-b5e6-
96231b3b80d8
Krzysztof Parzyszek [Thu, 5 May 2016 21:58:02 +0000 (21:58 +0000)]
[Hexagon] Fix the offset ranges for vector memory instructions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268690
91177308-0d34-0410-b5e6-
96231b3b80d8
Eugene Zelenko [Thu, 5 May 2016 21:35:47 +0000 (21:35 +0000)]
Fix some Clang-tidy readability-simplify-boolean-expr and Include What You Use warnings.
Differential revision: reviews.llvm.org/D19946
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268689
91177308-0d34-0410-b5e6-
96231b3b80d8
Xinliang David Li [Thu, 5 May 2016 21:13:27 +0000 (21:13 +0000)]
[PM] port Branch Frequency Analaysis pass to new PM
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268687
91177308-0d34-0410-b5e6-
96231b3b80d8
Davide Italiano [Thu, 5 May 2016 21:05:36 +0000 (21:05 +0000)]
[PM] Port Interprocedural SCCP to the new pass manager.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268684
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Thu, 5 May 2016 20:58:46 +0000 (20:58 +0000)]
[codeview] Improve some comments
This FIXME was already fixed, and these LF_* enum names were
inconsistent.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268683
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Thu, 5 May 2016 20:58:38 +0000 (20:58 +0000)]
[AArch64] Remove unused MBP headers/dependency. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268682
91177308-0d34-0410-b5e6-
96231b3b80d8
Dehao Chen [Thu, 5 May 2016 20:47:53 +0000 (20:47 +0000)]
Revert reviews.llvm.org/D19926 as it breaks tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268681
91177308-0d34-0410-b5e6-
96231b3b80d8
Mehdi Amini [Thu, 5 May 2016 20:44:21 +0000 (20:44 +0000)]
Revert "LTOCodeGenerator: handle correctly "unnamed" symbol"
This reverts commit r268658.
I incorrectly diagnose this as the source of an assertion during an
LTO bootstrap of clang.
From: Mehdi Amini <mehdi.amini@apple.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268680
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Thu, 5 May 2016 20:41:15 +0000 (20:41 +0000)]
[WebAssembly] Don't emit epilogue code in the middle of stackified code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268679
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Thu, 5 May 2016 20:31:16 +0000 (20:31 +0000)]
Fix CVTypeDumperImpl formatting after class rename
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268678
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Thu, 5 May 2016 20:30:48 +0000 (20:30 +0000)]
Remove unnecessary anonymous namespace from a header
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268677
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Thu, 5 May 2016 20:27:02 +0000 (20:27 +0000)]
AMDGPU: Simplify control flow / conditions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268676
91177308-0d34-0410-b5e6-
96231b3b80d8
Dehao Chen [Thu, 5 May 2016 20:18:49 +0000 (20:18 +0000)]
Simplify CFG before assigning discriminator.
Summary: We need to clean up CFG before assigning discriminator to minimize the impact of optimization on debug info.
Reviewers: davidxl, dblaikie, dnovillo
Subscribers: dnovillo, danielcdh, llvm-commits
Differential Revision: http://reviews.llvm.org/D19926
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268675
91177308-0d34-0410-b5e6-
96231b3b80d8
Marcin Koscielnicki [Thu, 5 May 2016 20:13:17 +0000 (20:13 +0000)]
[MSan] [MIPS64] Fix vararg helper for >1 fixed argument.
This fixes http://llvm.org/PR27646 on Mips64.
Differential Revision: http://reviews.llvm.org/D19989
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268673
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Thu, 5 May 2016 20:07:37 +0000 (20:07 +0000)]
AMDGPU: Run r600 tests last
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268672
91177308-0d34-0410-b5e6-
96231b3b80d8
Mehdi Amini [Thu, 5 May 2016 20:05:33 +0000 (20:05 +0000)]
Degrade assertions to a warning in LTOCodeGenerator for preserved linkonce
The assertions were assuming that the linker will not ask to preserve
a global that is internal or available_externally, as it does not
really make sense. In practice this break the bootstrap of clang,
I degrade to a warning for now.
From: Mehdi Amini <mehdi.amini@apple.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268671
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Bieneman [Thu, 5 May 2016 19:57:03 +0000 (19:57 +0000)]
Remove LLVM_ENABLE_TIMESTAMPS
Summary:
As per the discussion on LLVM-dev this patch proposes removing LLVM_ENABLE_TIMESTAMPS.
The only complicated bit of this patch is the Windows support. On windows we used to log an error if /INCREMENTAL was passed to the linker when timestamps were disabled.
With this change since timestamps in code are always disabled we will always compile on windows with /Brepro unless /INCREMENTAL is specified, and we will log a warning when /INCREMENTAL is specified to notify the user that the build will be non-deterministic.
See: http://lists.llvm.org/pipermail/llvm-dev/2016-May/098990.html
Reviewers: bogner, silvas, rnk
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D19892
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268670
91177308-0d34-0410-b5e6-
96231b3b80d8
Sean Silva [Thu, 5 May 2016 19:54:13 +0000 (19:54 +0000)]
Add a note about the "entry count" used the profile summary
Thanks to David Li for the clarification.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268669
91177308-0d34-0410-b5e6-
96231b3b80d8
Xinliang David Li [Thu, 5 May 2016 19:41:18 +0000 (19:41 +0000)]
[profile] Remove unneeded field in raw profile reader
Differential Revision: http://reviews.llvm.org/D19956
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268667
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Thu, 5 May 2016 19:28:01 +0000 (19:28 +0000)]
Touch Hexagon/CMakeLists.txt to regenerate build files, since r268641 complains of missing HexagonAlias.td on ninja.
FIXME: TableGen.cmake globs *.td(s) with wildcards for deps. It is not good.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268666
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Thu, 5 May 2016 18:38:53 +0000 (18:38 +0000)]
ARM: don't attempt to merge litpools referencing different PC-anchors.
Given something like:
ldr r0, .LCPI0_0 (== pc-rel var)
add r0, pc
ldr r1, .LCPI0_1 (== pc-rel var)
add r1, pc
we cannot combine the 2 ldr instructions and litpools because they get added to
a different pc to form the correct address. I think the original logic came
from a time when we fused the LDRpci/PICADD instructions into one
pseudo-instruction so the PC was always immediately at-hand. That's no longer
the case.
Should fix general-dynamic TLS access on Linux, and quite possibly other -fPIC
code that relies on litpools (e.g. v6m and -Oz compilations) though trivial
tweaks of the .ll test didn't provoke anything.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268662
91177308-0d34-0410-b5e6-
96231b3b80d8
Krzysztof Parzyszek [Thu, 5 May 2016 18:38:35 +0000 (18:38 +0000)]
[Hexagon] Add aliases for vector loads/stores with no explicit offset
The mem(r0) instructions are treated as mem(r0+#0).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268661
91177308-0d34-0410-b5e6-
96231b3b80d8
Vitaly Buka [Thu, 5 May 2016 18:31:00 +0000 (18:31 +0000)]
Revert "[ThinLTO] Emit individual index files for distributed backends"
MemorySanitizer: use-of-uninitialized-value in lib/Bitcode/Writer/BitcodeWriter.cpp:364:70
http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-fast/builds/12544/steps/check-llvm%20msan/logs/stdio
This reverts commit
0c4a898ea550699d1b2f4fe3767251c8f9a48d52.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268660
91177308-0d34-0410-b5e6-
96231b3b80d8