OSDN Git Service
Nico Weber [Fri, 22 Apr 2016 01:08:56 +0000 (01:08 +0000)]
Try to fix UNRESOLVED: LLVM :: CodeGen/AArch64/arm64-regress-opt-cmp.s on bots.
This test used to write a .s file until r266971 fixed that. But on most bots,
the .s file still exists. Add an rm statement to clean up the bots. In a few
days, this statement can go away again.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267095
91177308-0d34-0410-b5e6-
96231b3b80d8
Saleem Abdulrasool [Fri, 22 Apr 2016 01:03:38 +0000 (01:03 +0000)]
ARM: fix test for Windows division
This was meant to be part of SVN r267080. cbz cannot use a high register, which
would be silently truncated. This has now been fixed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267092
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Thu, 21 Apr 2016 23:59:48 +0000 (23:59 +0000)]
[WebAssembly] Limit alignment hints to natural alignment.
This follows the current binary format rules.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267082
91177308-0d34-0410-b5e6-
96231b3b80d8
Saleem Abdulrasool [Thu, 21 Apr 2016 23:53:19 +0000 (23:53 +0000)]
ARM: restrict register class for WIN__DBZCHK
WIN__DBZCHK will insert a CBZ instruction into the stream. This instruction
reserves 3 bits for the condition register (rn). As such, we must ensure that
we restrict the register to a low register. Use the tGPR class instead of GPR
to ensure that this is properly constrained. In debug builds, we would attempt
to use lr as a condition register which would silently get truncated with no
hint that the register selection was incorrect.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267080
91177308-0d34-0410-b5e6-
96231b3b80d8
Mike Aizatsky [Thu, 21 Apr 2016 23:38:45 +0000 (23:38 +0000)]
[sancov] using normalized filenames for blacklist checks.
Differential Revision: http://reviews.llvm.org/D19395
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267078
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Thu, 21 Apr 2016 23:24:09 +0000 (23:24 +0000)]
Fix more -Wunused-variable in non-asserts build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267077
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Thu, 21 Apr 2016 23:00:17 +0000 (23:00 +0000)]
MachO: enable .data_region directives everywhere
We'd disabled them on x86 because back in the early days some host tools
couldn't handle the new load commands. This no longer holds: anyone capable of
deploying Clang should be able to deploy its copies of ar/ranlib/etc.
rdar://
25254790
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267075
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Thu, 21 Apr 2016 22:53:33 +0000 (22:53 +0000)]
Fix some -Wunused-variable warnings in non-asserts builds.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267073
91177308-0d34-0410-b5e6-
96231b3b80d8
Vedant Kumar [Thu, 21 Apr 2016 22:40:59 +0000 (22:40 +0000)]
[Support] Fix Wcast-qual warning
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267072
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Thu, 21 Apr 2016 22:37:55 +0000 (22:37 +0000)]
Fix PDB warnings and test
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267071
91177308-0d34-0410-b5e6-
96231b3b80d8
Derek Schuff [Thu, 21 Apr 2016 22:19:24 +0000 (22:19 +0000)]
Improve error message reporting for MachineFunctionProperties
When printing the properties required by a pass, only print the
properties that are set, and not those that are clear (only properties
that are set are verified, clear properties are "don't-care").
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267070
91177308-0d34-0410-b5e6-
96231b3b80d8
Amaury Sechet [Thu, 21 Apr 2016 22:17:39 +0000 (22:17 +0000)]
Remove dead code. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267069
91177308-0d34-0410-b5e6-
96231b3b80d8
Zachary Turner [Thu, 21 Apr 2016 22:16:19 +0000 (22:16 +0000)]
Fix -Wreturn-type warning with HAVE_DIA_SDK is false.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267068
91177308-0d34-0410-b5e6-
96231b3b80d8
Zachary Turner [Thu, 21 Apr 2016 22:13:25 +0000 (22:13 +0000)]
Fix pdbdump-headers.test after guid format change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267067
91177308-0d34-0410-b5e6-
96231b3b80d8
Zachary Turner [Thu, 21 Apr 2016 22:08:27 +0000 (22:08 +0000)]
Fix for case sensitive filename failure.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267066
91177308-0d34-0410-b5e6-
96231b3b80d8
Mike Aizatsky [Thu, 21 Apr 2016 22:00:13 +0000 (22:00 +0000)]
Fixed flag description
Summary:
asan-use-after-return control feature we call use-after-return or
stack-use-after-return.
Reviewers: kcc, aizatsky, eugenis
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D19284
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267064
91177308-0d34-0410-b5e6-
96231b3b80d8
Amaury Sechet [Thu, 21 Apr 2016 21:36:11 +0000 (21:36 +0000)]
Remove various warnings. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267061
91177308-0d34-0410-b5e6-
96231b3b80d8
Derek Bruening [Thu, 21 Apr 2016 21:30:22 +0000 (21:30 +0000)]
[esan] EfficiencySanitizer instrumentation pass
Summary:
Adds an instrumentation pass for the new EfficiencySanitizer ("esan")
performance tuning family of tools. Multiple tools will be supported
within the same framework. Preliminary support for a cache fragmentation
tool is included here.
The shared instrumentation includes:
+ Turn mem{set,cpy,move} instrinsics into library calls.
+ Slowpath instrumentation of loads and stores via callouts to
the runtime library.
+ Fastpath instrumentation will be per-tool.
+ Which memory accesses to ignore will be per-tool.
Reviewers: eugenis, vitalybuka, aizatsky, filcab
Subscribers: filcab, vkalintiris, pcc, silvas, llvm-commits, zhaoqin, kcc
Differential Revision: http://reviews.llvm.org/D19167
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267058
91177308-0d34-0410-b5e6-
96231b3b80d8
Amaury Sechet [Thu, 21 Apr 2016 21:29:10 +0000 (21:29 +0000)]
Add utility function to manipulate attributes on CallSite. NFC
Summary: As per title. This will help work on the C API.
Reviewers: Wallbraker, whitequark, joker.eph, echristo, rafael
Subscribers: joker.eph, llvm-commits
Differential Revision: http://reviews.llvm.org/D19173
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267057
91177308-0d34-0410-b5e6-
96231b3b80d8
Kevin Enderby [Thu, 21 Apr 2016 21:20:40 +0000 (21:20 +0000)]
Fix a typo in an error message. Caught by Sean Silva!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267056
91177308-0d34-0410-b5e6-
96231b3b80d8
Vedant Kumar [Thu, 21 Apr 2016 21:07:25 +0000 (21:07 +0000)]
[ProfileData] Report errors from InstrProfSymtab::create
InstrProfSymtab::create can fail with instrprof_error::malformed, but
this error is silently dropped. Propagate the error up to the caller so
we fail early.
Eventually, I'd like to transition ProfileData over to the new Error
class so we can't ignore hard failures like this.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267055
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Thu, 21 Apr 2016 21:02:25 +0000 (21:02 +0000)]
add tests for disguised fabs/fneg
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267053
91177308-0d34-0410-b5e6-
96231b3b80d8
Quentin Colombet [Thu, 21 Apr 2016 21:01:13 +0000 (21:01 +0000)]
[MachineBasicBlock] Make the pass argument truly mandatory when
splitting edges.
MachineBasicBlock::SplitCriticalEdges will crash if a nullptr would have
been passed for the Pass argument. Do not allow that by turning this
argument into a reference.
The alternative would have been to make the Pass a truly optional
argument, but although this is easy to do, I was afraid users using it
like this would not be aware the livness information, dominator tree and
such would silently be broken.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267052
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Thu, 21 Apr 2016 20:58:58 +0000 (20:58 +0000)]
use FileCheck; add test for disguised fabs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267051
91177308-0d34-0410-b5e6-
96231b3b80d8
Zachary Turner [Thu, 21 Apr 2016 20:58:41 +0000 (20:58 +0000)]
Add natvis visualizers for endian types.
This allows ulittle* and ubig* types to be visualized properly
in VS.
Differential Revision: http://reviews.llvm.org/D19339
Reviewed By: Aaron Ballman
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267050
91177308-0d34-0410-b5e6-
96231b3b80d8
Zachary Turner [Thu, 21 Apr 2016 20:58:35 +0000 (20:58 +0000)]
Refactor raw pdb dumper into library
PDB parsing code was hand-rolled into llvm-pdbdump. This patch moves the
parsing of this code into DebugInfoPDB and makes the dumper use this.
This is achieved by implementing the skeleton of RawPdbSession, the
non-DIA counterpart to the existing PDB read interface. None of the type /
source file / etc information is accessible yet, so this implementation is
not yet close to achieving parity with the DIA counterpart, but the
RawSession class simply holds a reference to a PDBFile class which handles
parsing the file format. Additionally a PDBStream class is introduced
which allows accessing the bytes of a particular stream in a PDB file.
Differential Revision: http://reviews.llvm.org/D19343
Reviewed By: majnemer
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267049
91177308-0d34-0410-b5e6-
96231b3b80d8
Quentin Colombet [Thu, 21 Apr 2016 20:46:27 +0000 (20:46 +0000)]
[MachineBasicBlock] Refactor SplitCriticalEdge to expose a query API.
Introduce canSplitCriticalEdge, so that clients can now query whether or
not a critical edge can be split without actually needing to split it.
This may be useful when gathering information for cost models for
instance.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267046
91177308-0d34-0410-b5e6-
96231b3b80d8
Kevin Enderby [Thu, 21 Apr 2016 20:29:49 +0000 (20:29 +0000)]
hange the variable name big_size to BigSize. Caught by Rafael Espíndola!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267043
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Kaylor [Thu, 21 Apr 2016 20:09:35 +0000 (20:09 +0000)]
Zero-initialize members of the CpuHashInfoTy structure for AsmParser
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267042
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Thu, 21 Apr 2016 20:08:06 +0000 (20:08 +0000)]
[RuntimeDyld] Fix conservative over-allocation of memory for common symbols.
The previous allocation code was over-estimating the amount of memory required.
No test case: we don't currently have a good way to detect conervative
over-allocation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267041
91177308-0d34-0410-b5e6-
96231b3b80d8
JF Bastien [Thu, 21 Apr 2016 19:53:39 +0000 (19:53 +0000)]
NFC: fix copy / paste comment
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267039
91177308-0d34-0410-b5e6-
96231b3b80d8
Krzysztof Parzyszek [Thu, 21 Apr 2016 19:49:53 +0000 (19:49 +0000)]
[Hexagon] Properly recognize register alt names
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267038
91177308-0d34-0410-b5e6-
96231b3b80d8
Kevin Enderby [Thu, 21 Apr 2016 19:49:29 +0000 (19:49 +0000)]
Fix crash in llvm-objdump with -macho -objc-meta-data that was trying dump a non-existent section.
Showed up in running on a large binary with the missing section. I could create a fake
test case if anyone really wants but the fix is pretty obvious.
rdar://
25837034
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267037
91177308-0d34-0410-b5e6-
96231b3b80d8
JF Bastien [Thu, 21 Apr 2016 19:41:48 +0000 (19:41 +0000)]
NFC: fix nonsensical comment
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267036
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjoy Das [Thu, 21 Apr 2016 19:26:45 +0000 (19:26 +0000)]
Folding compares with unescaped allocations
Summary:
If we know that the pointer allocated within a function does not escape,
we can fold away comparisons that are done with global pointers
Patch by Anna Thomas!
Reviewers: reames, majnemer, sanjoy
Subscribers: mgrang, mcrosier, majnemer, llvm-commits
Differential Revision: http://reviews.llvm.org/D19276
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267035
91177308-0d34-0410-b5e6-
96231b3b80d8
Krzysztof Parzyszek [Thu, 21 Apr 2016 18:56:45 +0000 (18:56 +0000)]
[Hexagon] Expand handling of the small-data/bss section
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267034
91177308-0d34-0410-b5e6-
96231b3b80d8
Quentin Colombet [Thu, 21 Apr 2016 18:34:43 +0000 (18:34 +0000)]
[RegisterBankInfo] Change the API for the verify methods.
Return bool instead of void so that it is natural to put the calls into
asserts.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267033
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Thu, 21 Apr 2016 18:21:54 +0000 (18:21 +0000)]
AMDGPU: Fix debug name of pass to better match
I get this wrong every time I try to debug this.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267030
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Thu, 21 Apr 2016 18:19:11 +0000 (18:19 +0000)]
LegalizeDAG: Move unaligned load/store expansion to TLI
When custom lowered, this is not called if the store is custom
lowered. Move it to be a utility function so targets can
easily expand unaligned accesses when custom lowering.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267029
91177308-0d34-0410-b5e6-
96231b3b80d8
Quentin Colombet [Thu, 21 Apr 2016 18:09:34 +0000 (18:09 +0000)]
[RegisterBankInfo] Change the representation of the partial mappings.
Instead of holding a mask, hold two value: the start index and the
length of the mapping. This is a more compact representation, although
less powerful. That being said, arbitrary masks would not have worked
for the generic so do not allow them in the first place.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267025
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Thu, 21 Apr 2016 18:03:06 +0000 (18:03 +0000)]
DAGCombiner: Reduce 64-bit BFE pattern to pattern on 32-bit component
If the extracted bits are restricted to the upper half or lower half,
this can be truncated.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267024
91177308-0d34-0410-b5e6-
96231b3b80d8
Philip Reames [Thu, 21 Apr 2016 17:59:40 +0000 (17:59 +0000)]
[instcombine][unordered] Extend load(select) transform to handle unordered loads
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267023
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Kaylor [Thu, 21 Apr 2016 17:58:54 +0000 (17:58 +0000)]
Initial implementation of optimization bisect support.
This patch implements a optimization bisect feature, which will allow optimizations to be selectively disabled at compile time in order to track down test failures that are caused by incorrect optimizations.
The bisection is enabled using a new command line option (-opt-bisect-limit). Individual passes that may be skipped call the OptBisect object (via an LLVMContext) to see if they should be skipped based on the bisect limit. A finer level of control (disabling individual transformations) can be managed through an addition OptBisect method, but this is not yet used.
The skip checking in this implementation is based on (and replaces) the skipOptnoneFunction check. Where that check was being called, a new call has been inserted in its place which checks the bisect limit and the optnone attribute. A new function call has been added for module and SCC passes that behaves in a similar way.
Differential Revision: http://reviews.llvm.org/D19172
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267022
91177308-0d34-0410-b5e6-
96231b3b80d8
Nicolai Haehnle [Thu, 21 Apr 2016 17:48:02 +0000 (17:48 +0000)]
Split IntrReadArgMem into IntrReadMem and IntrArgMemOnly
Summary:
IntrReadWriteArgMem simply becomes IntrArgMemOnly.
So there are fewer intrinsic properties that express their orthogonality
better, and correspond more closely to the corresponding IR attributes.
Suggested by: Philip Reames
Reviewers: joker.eph, reames, tstellarAMD
Subscribers: jholewinski, arsenm, llvm-commits
Differential Revision: http://reviews.llvm.org/D19291
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267021
91177308-0d34-0410-b5e6-
96231b3b80d8
Philip Reames [Thu, 21 Apr 2016 17:45:05 +0000 (17:45 +0000)]
[unordered] unordered loads from null are still unreachable
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267019
91177308-0d34-0410-b5e6-
96231b3b80d8
Marcin Koscielnicki [Thu, 21 Apr 2016 17:36:05 +0000 (17:36 +0000)]
[PowerPC] [SSP] Fix stack guard load for 32-bit.
r266809 incorrectly used LD to load the stack guard, it should be LWZ.
Differential Revision: http://reviews.llvm.org/D19358
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267017
91177308-0d34-0410-b5e6-
96231b3b80d8
Adam Nemet [Thu, 21 Apr 2016 17:33:22 +0000 (17:33 +0000)]
[LoopUtils] Fix typo in comment
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267016
91177308-0d34-0410-b5e6-
96231b3b80d8
Adam Nemet [Thu, 21 Apr 2016 17:33:20 +0000 (17:33 +0000)]
[LoopUtils] Add asserts to findStringMetadataForLoop. NFC
These ensure that operand array has at least one element and it is the
self-reference.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267015
91177308-0d34-0410-b5e6-
96231b3b80d8
Adam Nemet [Thu, 21 Apr 2016 17:33:17 +0000 (17:33 +0000)]
[LoopUtils] Move def of findStringMetadataForLoop to LoopUtils.cpp. NFC
The decl is in LoopUtils.h. I think that this was added to
LoopVersioningLICM.cpp by mistake.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267014
91177308-0d34-0410-b5e6-
96231b3b80d8
Adam Nemet [Thu, 21 Apr 2016 17:33:12 +0000 (17:33 +0000)]
[LoopUtils] Rename {check->find}StringMetadata{Into->For}Loop. NFC
"Into" was misleading. I am also planning to use this helper to look
for loop metadata and return the argument, so find seems like a better
name.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267013
91177308-0d34-0410-b5e6-
96231b3b80d8
Philip Reames [Thu, 21 Apr 2016 17:03:33 +0000 (17:03 +0000)]
[instcombine][unordered] Implement *-load forwarding for unordered atomics
This builds on 266999 which made FindAvailableValue do the right thing. Tests included show the newly enabled transforms and those which disabled either due to conservatism or correctness requirements.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267006
91177308-0d34-0410-b5e6-
96231b3b80d8
Amjad Aboud [Thu, 21 Apr 2016 16:58:49 +0000 (16:58 +0000)]
Fixed Dwarf debug info emission to skip DILexicalBlockFile entries.
Before this fix, DILexicalBlockFile entries were skipped only in some cases and were not in other cases.
Differential Revision: http://reviews.llvm.org/D18724
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267004
91177308-0d34-0410-b5e6-
96231b3b80d8
Philip Reames [Thu, 21 Apr 2016 16:51:08 +0000 (16:51 +0000)]
[unordered] Add tests and conservative handling in support of future changes [NFCI]
This change adds a couple of test cases to make sure FindAvailableLoadedValue does the right thing. At the moment, the code added is dead, but separating it makes follow on changes far more obvious.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266999
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Thu, 21 Apr 2016 16:18:02 +0000 (16:18 +0000)]
Address Philip's post-commit feedback for r266987. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266998
91177308-0d34-0410-b5e6-
96231b3b80d8
Philip Reames [Thu, 21 Apr 2016 16:15:19 +0000 (16:15 +0000)]
Minor comment cleanup [NFC]
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266997
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 21 Apr 2016 14:56:33 +0000 (14:56 +0000)]
Fix recursive -only-needed.
We were assuming that only linkonce_odr GVs were lazy linked.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266995
91177308-0d34-0410-b5e6-
96231b3b80d8
Zoran Jovanovic [Thu, 21 Apr 2016 14:32:12 +0000 (14:32 +0000)]
[mips][microMIPS] Implement ldpc instruction
Differential Revision: http://reviews.llvm.org/D15009
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266990
91177308-0d34-0410-b5e6-
96231b3b80d8
Zoran Jovanovic [Thu, 21 Apr 2016 14:09:35 +0000 (14:09 +0000)]
[mips][microMIPS] Add R_MICROMIPS_PC19_S2 relocation
Differential Revision: http://reviews.llvm.org/D14915
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266988
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Thu, 21 Apr 2016 14:04:54 +0000 (14:04 +0000)]
Refactor implied condition logic from ValueTracking directly into CmpInst. NFC.
Differential Revision: http://reviews.llvm.org/D19330
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266987
91177308-0d34-0410-b5e6-
96231b3b80d8
Zoran Jovanovic [Thu, 21 Apr 2016 13:43:26 +0000 (13:43 +0000)]
[mips][microMIPS] Add R_MICROMIPS_PC26_S1 relocation
Differential Revision: http://reviews.llvm.org/D14822
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266985
91177308-0d34-0410-b5e6-
96231b3b80d8
Sam Kolton [Thu, 21 Apr 2016 13:14:24 +0000 (13:14 +0000)]
[AMDGPU] Assembler: prevent parseDPPCtrlOps from eating invalid tokens
Reviewers: nhaustov, tstellarAMD
Subscribers: arsenm
Differential Revision: http://reviews.llvm.org/D19317
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266984
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 21 Apr 2016 12:16:21 +0000 (12:16 +0000)]
Add a CachedHash structure.
A DenseMap doesn't store the hashes, so it needs to recompute them when
the table is resized.
In some applications the hashing cost is noticeable. That is the case
for example in lld for symbol names (StringRef).
This patch adds a templated structure that can wraps any value that can
go in a DenseMap and caches the hash.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266981
91177308-0d34-0410-b5e6-
96231b3b80d8
Zlatko Buljan [Thu, 21 Apr 2016 11:32:40 +0000 (11:32 +0000)]
[mips][microMIPS] Implement TLBP, TLBR, TLBWI and TLBWR instructions
Differential Revision: http://reviews.llvm.org/D18855
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266980
91177308-0d34-0410-b5e6-
96231b3b80d8
Zlatko Buljan [Thu, 21 Apr 2016 11:01:51 +0000 (11:01 +0000)]
[mips][microMIPS] Implement LL, SC, MOVEP, ROTR, ROTRV and SYSCALL instructions and add tests for LWM32 and SWM32
Differential Revision: http://reviews.llvm.org/D19150
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266977
91177308-0d34-0410-b5e6-
96231b3b80d8
Evgeny Astigeevich [Thu, 21 Apr 2016 09:36:49 +0000 (09:36 +0000)]
Updated a test not to produce an empty s-file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266971
91177308-0d34-0410-b5e6-
96231b3b80d8
Evgeny Astigeevich [Thu, 21 Apr 2016 08:54:08 +0000 (08:54 +0000)]
[AArch64][CodeGen] Fix of PR27158: incorrect peephole optimization in AArch64InstrInfo::optimizeCompareInstr
AArch64InstrInfo::optimizeCompareInstr has bug PR27158 which causes generation of incorrect code.
A compare instruction is substituted with another instruction which does not
produce the same flags as the original compare instruction.
This patch contains:
1. Fix of the bug.
2. A regression test in MIR.
3. A new test to check that SUBS is replaced by SUB.
Differential Revision: http://reviews.llvm.org/D18838
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266969
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Thu, 21 Apr 2016 07:30:06 +0000 (07:30 +0000)]
[AVX512] Add CTTZ support for v8i64 and v16i32 vectors.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266968
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Thu, 21 Apr 2016 07:30:03 +0000 (07:30 +0000)]
[X86] Fix vector-tzcnt-512 test to disable CDI while enabling BWI for one of the runs. Update check patterns accordingly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266967
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Thu, 21 Apr 2016 07:29:59 +0000 (07:29 +0000)]
Fix test command line to explicitly disable CDI instructions for one test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266966
91177308-0d34-0410-b5e6-
96231b3b80d8
Mehdi Amini [Thu, 21 Apr 2016 06:43:45 +0000 (06:43 +0000)]
CachePruning: early exit if no path supplied
From: Mehdi Amini <mehdi.amini@apple.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266965
91177308-0d34-0410-b5e6-
96231b3b80d8
Mehdi Amini [Thu, 21 Apr 2016 06:43:41 +0000 (06:43 +0000)]
ThinLTO: initialize variables
From: Mehdi Amini <mehdi.amini@apple.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266964
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Thu, 21 Apr 2016 06:39:34 +0000 (06:39 +0000)]
[AVX512] Add support for lowering CTTZ v64i8 and v32i16 with BWI instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266963
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Thu, 21 Apr 2016 06:39:32 +0000 (06:39 +0000)]
[X86] Remove redundant calls to setOperationAction for EXTRACT_VECTOR_ELT/INSERT_VECTOR_ELT from SSE41 block. They were already done in an earlier block. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266962
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Thu, 21 Apr 2016 06:39:29 +0000 (06:39 +0000)]
[X86] Remove some operations from the default Expand all vector ops loop. Instead let them stay Legal and mark them Expand for specific types where needed. Reduces overall number of calls to setOperationAction. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266961
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Thu, 21 Apr 2016 06:39:26 +0000 (06:39 +0000)]
[X86] Remove old leftover MMX code that sets various 64-bit vector operations to Expand. These vector types aren't legal so these operations would never make it far enough to need to expand. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266960
91177308-0d34-0410-b5e6-
96231b3b80d8
Mehdi Amini [Thu, 21 Apr 2016 05:54:23 +0000 (05:54 +0000)]
ThinLTO: add module caching handling.
Differential Revision: http://reviews.llvm.org/D18494
From: Mehdi Amini <mehdi.amini@apple.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266959
91177308-0d34-0410-b5e6-
96231b3b80d8
Mehdi Amini [Thu, 21 Apr 2016 05:47:17 +0000 (05:47 +0000)]
ThinLTO: Resolve linkonce_odr aliases just like functions
This help to streamline the process of handling importing since
we don't need to special case alias everywhere: just like
linkonce_odr function, make sure at least one alias is emitted
by turning it weak.
Differential Revision: http://reviews.llvm.org/D19308
From: Mehdi Amini <mehdi.amini@apple.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266958
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjoy Das [Thu, 21 Apr 2016 05:09:12 +0000 (05:09 +0000)]
[SimplifyCFG] Fold `llvm.guard(false)` to unreachable
Summary:
`llvm.guard(false)` always bails out of the current compilation unit, so
we can prune any control flow following it.
Reviewers: hfinkel, pcc, reames
Subscribers: majnemer, reames, mcrosier, llvm-commits
Differential Revision: http://reviews.llvm.org/D19245
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266955
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Thu, 21 Apr 2016 04:44:00 +0000 (04:44 +0000)]
[X86] Remove unnecessary setting of CTTZ_ZERO_UNDEF to Custom for vector types where we can't do any better than the Custom lowering of CTTZ. LegalizeVectorOps will expand to CTTZ since its marked Custom.
CTTZ_ZERO_UNDEF can be custom lowered specially if CTLZ is supported. Otherwise CTTZ and CTTZ_ZERO_UNDEF are handled the same way by using CTPOP and bitmath.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266952
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Thu, 21 Apr 2016 04:43:57 +0000 (04:43 +0000)]
[SelectionDAG] Teach LegalizeVectorOps to directly Expand CTTZ_ZERO_UNDEF/CTLZ_ZERO_UNDEF to CTTZ/CTLZ directly if those ops are Legal/Custom instead of deferring it to LegalizeOps.
This is needed to support CTTZ/CTLZ Custom correctly since LegalizeOps would be too late to do the custom lowering.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266951
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Thu, 21 Apr 2016 03:57:24 +0000 (03:57 +0000)]
[AVX512] Add support for popcount of v8i64 and v16i32 with and without BWI instructions.
Without BWI we have to split the vectors into 256-bit vectors so we can use AVX2 pshufb and then concatenate the results.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266950
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Thu, 21 Apr 2016 02:34:36 +0000 (02:34 +0000)]
ValueMapper: Map uniqued nodes in post-order
The iteratitive algorithm from r265456 claimed but failed to create a
post-order traversal. It had the same error that was fixed in the
ValueEnumerator in r266947: now, instead of pushing all operands on the
worklist at once, we pause whenever an operand gets pushed in order to
go depth-first (I know, it sounds obvious).
Sadly, I have no idea how to observe this from outside the algorithm and
so I haven't written a test. The output should be the same; it should
just use fewer temporary nodes now. I've added some comments that I
hope make the current logic clear enough it's unlikely to regress.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266949
91177308-0d34-0410-b5e6-
96231b3b80d8
Mehdi Amini [Thu, 21 Apr 2016 01:59:39 +0000 (01:59 +0000)]
ThinLTO/ModuleLinker: add a flag to not always pull-in linkonce when performing importing
Summary:
The function importer already decided what symbols need to be pulled
in. Also these magically added ones will not be in the export list
for the source module, which can confuse the internalizer for
instance.
Reviewers: tejohnson, rafael
Subscribers: joker.eph, llvm-commits
Differential Revision: http://reviews.llvm.org/D19096
From: Mehdi Amini <mehdi.amini@apple.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266948
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Thu, 21 Apr 2016 01:55:12 +0000 (01:55 +0000)]
BitcodeWriter: Emit metadata in post-order (again)
Emit metadata nodes in post-order. The iterative algorithm from r266709
failed to maintain this property. After understanding my mistake, it
wasn't too hard to write a test with llvm-bcanalyzer (and I've actually
made this change once before: see r220340).
This also reverts the "noisy" testcase change from r266709. That should
have been more of a red flag :/.
Note: The same bug crept into the ValueMapper in r265456. I'm still
working on the fix.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266947
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthias Braun [Thu, 21 Apr 2016 01:54:13 +0000 (01:54 +0000)]
MachineSched: Cleanup; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266946
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Thu, 21 Apr 2016 00:53:14 +0000 (00:53 +0000)]
Add optimization for 'icmp slt (or A, B), A' and some related idioms based on knowledge of the sign bit for A and B.
No matter what value you OR in to A, the result of (or A, B) is going to be UGE A. When A and B are positive, it's SGE too. If A is negative, OR'ing a value into it can't make it positive, but can increase its value closer to -1, therefore (or A, B) is SGE A. Working through all possible combinations produces this truth table:
```
A is
+, -, +/-
F F F + B is
T F ? -
? F ? +/-
```
The related optimizations are flipping the 'slt' for 'sge' which always NOTs the result (if the result is known), and swapping the LHS and RHS while swapping the comparison predicate.
There are more idioms left to implement (aren't there always!) but I've stopped here because any more would risk becoming unreasonable for reviewers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266939
91177308-0d34-0410-b5e6-
96231b3b80d8
Dehao Chen [Wed, 20 Apr 2016 23:36:23 +0000 (23:36 +0000)]
Refine instruction weight annotation algorithm for sample profiler.
Summary:
This patch refined the instruction weight anootation algorithm:
1. Do not use dbg_value intrinsics for annotation.
2. Annotate cold calls if the call is inlined in profile, but not inlined before preparation. This indicates that the annotation preparation step found no sample for the inlined callsite, thus the call should be very cold.
Reviewers: dnovillo, davidxl
Subscribers: mgrang, llvm-commits
Differential Revision: http://reviews.llvm.org/D19286
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266936
91177308-0d34-0410-b5e6-
96231b3b80d8
Kevin Enderby [Wed, 20 Apr 2016 23:10:14 +0000 (23:10 +0000)]
Fix another compilation error from r266919 for clang-atom-d525-fedora-rel which
is another place that libObject’s getName() for symbols returns Expected<...>
that needed to be updated.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266933
91177308-0d34-0410-b5e6-
96231b3b80d8
Evgeniy Stepanov [Wed, 20 Apr 2016 22:44:40 +0000 (22:44 +0000)]
Fix compilation error in r266919.
lib/Object/MachOObjectFile.cpp:53:44: error: moving a temporary object prevents copy elision [-Werror,-Wpessimizing-move]
return malformedError(Obj.getFileName(), std::move(Msg.str()), ECOverride);
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266930
91177308-0d34-0410-b5e6-
96231b3b80d8
Vedant Kumar [Wed, 20 Apr 2016 22:24:01 +0000 (22:24 +0000)]
[test/PGOProfile] Make tests independent of the raw profile version (NFC)
Differential Revision: http://reviews.llvm.org/D19290
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266928
91177308-0d34-0410-b5e6-
96231b3b80d8
Kevin Enderby [Wed, 20 Apr 2016 21:24:34 +0000 (21:24 +0000)]
Thread Expected<...> up from libObject’s getName() for symbols to allow llvm-objdump to produce a good error message.
Produce another specific error message for a malformed Mach-O file when a symbol’s
string index is past the end of the string table. The existing test case in test/Object/macho-invalid.test
for macho-invalid-symbol-name-past-eof now reports the error with the message indicating
that a symbol at a specific index has a bad sting index and that bad string index value.
Again converting interfaces to Expected<> from ErrorOr<> does involve
touching a number of places. Where the existing code reported the error with a
string message or an error code it was converted to do the same. There is some
code for this that could be factored into a routine but I would like to leave that for
the code owners post-commit to do as they want for handling an llvm::Error. An
example of how this could be done is shown in the diff in
lib/ExecutionEngine/RuntimeDyld/RuntimeDyldImpl.h which had a Check() routine
already for std::error_code so I added one like it for llvm::Error .
Also there some were bugs in the existing code that did not deal with the
old ErrorOr<> return values. So now with Expected<> since they must be
checked and the error handled, I added a TODO and a comment:
“// TODO: Actually report errors helpfully” and a call something like
consumeError(NameOrErr.takeError()) so the buggy code will not crash
since needed to deal with the Error.
Note there fixes needed to lld that goes along with this that I will commit right after this.
So expect lld not to built after this commit and before the next one.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266919
91177308-0d34-0410-b5e6-
96231b3b80d8
Krzysztof Parzyszek [Wed, 20 Apr 2016 21:17:40 +0000 (21:17 +0000)]
[Hexagon] Add -mv.. options to override CPU selection
This is for compatibility with scripts that use -mv5, etc. with the
assembler.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266918
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Wed, 20 Apr 2016 20:14:09 +0000 (20:14 +0000)]
IR: Use SmallVector instead of std::vector of TrackingMDRef
Don't use std::vector<TrackingMDRef>, since (at least in some versions
of libc++) std::vector apparently copies values on grow operations
instead of moving them. Found this when I was temporarily deleting the
copy constructor for TrackingMDRef to investigate a performance
bottleneck.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266909
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Wed, 20 Apr 2016 20:03:59 +0000 (20:03 +0000)]
IR: Stop copying vectors of TrackingMDRef in DIBuilder
No real functionality change here, just avoiding an unnecessary copy of
std::vector<TrackingMDRef> for every subprogram with variables.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266907
91177308-0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Wed, 20 Apr 2016 20:02:58 +0000 (20:02 +0000)]
Rename asan-check-lifetime into asan-stack-use-after-scope
Summary:
This is done for consistency with asan-use-after-return.
I see no other users than tests.
Reviewers: aizatsky, kcc
Differential Revision: http://reviews.llvm.org/D19306
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266906
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Wed, 20 Apr 2016 19:16:23 +0000 (19:16 +0000)]
Typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266905
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Wed, 20 Apr 2016 19:15:26 +0000 (19:15 +0000)]
[ValueTracking] Make isImpliedCondition return an Optional<bool>. NFC.
Phabricator Revision: http://reviews.llvm.org/D19277
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266904
91177308-0d34-0410-b5e6-
96231b3b80d8
Nico Weber [Wed, 20 Apr 2016 19:09:26 +0000 (19:09 +0000)]
Replace a loop with a for-each loop. No behavior change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266903
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Wed, 20 Apr 2016 19:05:59 +0000 (19:05 +0000)]
IR: Avoid mallocs in constructor of ModuleSlotTracker
A ModuleSlotTracker can be created without actually being used (e.g.,
r266889 added one to the Verifier). Create the SlotTracker within it
lazily on the first call to ModuleSlotTracker::getMachine.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266902
91177308-0d34-0410-b5e6-
96231b3b80d8
Davide Italiano [Wed, 20 Apr 2016 18:45:31 +0000 (18:45 +0000)]
[MC] Silence warning due to unused variable in !Debug builds.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266901
91177308-0d34-0410-b5e6-
96231b3b80d8