Quentin Colombet [Wed, 23 Apr 2014 20:43:38 +0000 (20:43 +0000)]
[ARM64] Fix the information we give to the peephole optimizer for comparison.
ANDS does not use the same encoding scheme as other xxxS instructions (e.g.,
ADDS). Take that into account to avoid wrong peephole optimization.
<rdar://problem/
16693089>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207020
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Wed, 23 Apr 2014 20:36:10 +0000 (20:36 +0000)]
Don't use default address space arguments in GlobalOpt
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207019
91177308-0d34-0410-b5e6-
96231b3b80d8
Anders Waldenborg [Wed, 23 Apr 2014 20:32:03 +0000 (20:32 +0000)]
[python] Fix python bindings tests
Broke after the changes related to the LLVMGetSymbolFileOffset
removal in r206750
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207018
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Wed, 23 Apr 2014 19:45:05 +0000 (19:45 +0000)]
R600: Add a test that used to be broken that I forgot to add
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207017
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Wed, 23 Apr 2014 19:44:08 +0000 (19:44 +0000)]
clang-format r207010
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207016
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Wed, 23 Apr 2014 19:32:37 +0000 (19:32 +0000)]
Convert test to FileCheck
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207015
91177308-0d34-0410-b5e6-
96231b3b80d8
Quentin Colombet [Wed, 23 Apr 2014 19:30:26 +0000 (19:30 +0000)]
[X86] Fix missing/wrong scheduling model found by code inspection.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207014
91177308-0d34-0410-b5e6-
96231b3b80d8
Anders Waldenborg [Wed, 23 Apr 2014 19:17:42 +0000 (19:17 +0000)]
llvm-build: Get rid of 'import *'
This allows pyflakes catching more errors in the script.
Differential Revision: http://reviews.llvm.org/D3334
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207012
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Wed, 23 Apr 2014 18:54:00 +0000 (18:54 +0000)]
Split out DwarfFile from DwarfDebug into its own .h/.cpp files.
Some of these types (DwarfDebug in particular) are quite large to begin
with (and I keep forgetting whether DwarfFile is in DwarfDebug or
DwarfUnit... ) so having a few smaller files seems like goodness.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207010
91177308-0d34-0410-b5e6-
96231b3b80d8
Justin Bogner [Wed, 23 Apr 2014 18:50:16 +0000 (18:50 +0000)]
ProfileData: Avoid unnecessary copies of CounterData
We're currently copying CounterData from InstrProfWriter into the
OnDiskHashTable, even though we don't need to, and then carelessly
leaking those copies. A const pointer is much better here.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207009
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Atanasyan [Wed, 23 Apr 2014 17:30:29 +0000 (17:30 +0000)]
[yaml2obj][ELF] Remove unnecessary space between namespace name and
colons.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207003
91177308-0d34-0410-b5e6-
96231b3b80d8
Alexander Potapenko [Wed, 23 Apr 2014 17:14:45 +0000 (17:14 +0000)]
[ASan] Move the shadow range on 32-bit iOS (and iOS Simulator)
to 0x40000000-0x60000000 to avoid address space clash with system libraries.
The solution has been proposed by tahabekireren@gmail.com in https://code.google.com/p/address-sanitizer/issues/detail?id=210
This is also known to fix some Chromium iOS tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207002
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Wed, 23 Apr 2014 16:48:40 +0000 (16:48 +0000)]
Remove dead code in instcombine.
Don't replace shifts greater than the type with the maximum shift.
This isn't hit anywhere in the tests, and somewhere else is replacing
these with undef.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207000
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Wed, 23 Apr 2014 14:51:35 +0000 (14:51 +0000)]
X86AsmParser.cpp: Fix memory leak at replacing movsd to movsl.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206991
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Wed, 23 Apr 2014 14:51:23 +0000 (14:51 +0000)]
cl::ParseCommandLineOptions(): Use StringRef to receive sys::path::filename() instead of std::string.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206990
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Wed, 23 Apr 2014 14:51:12 +0000 (14:51 +0000)]
Mark llvm/test/BugPoint/compile-custom.ll as XFAIL:vg_leak.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206989
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Wed, 23 Apr 2014 14:42:32 +0000 (14:42 +0000)]
Centralize handling of ELF_Other_ThumbFunc.
No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206988
91177308-0d34-0410-b5e6-
96231b3b80d8
Evgeniy Stepanov [Wed, 23 Apr 2014 12:51:32 +0000 (12:51 +0000)]
Fix handling of missing DataLayout in sanitizers.
Pass::doInitialization is supposed to return False when it did not
change the program, not when a fatal error occurs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206975
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Wed, 23 Apr 2014 12:23:05 +0000 (12:23 +0000)]
Remove AssemblyAnnotationWriter from NamedMDNode::print.
No functionality change, this parameter was always set to nullptr.
Patch by Robert Matusewicz!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206972
91177308-0d34-0410-b5e6-
96231b3b80d8
Evgeniy Stepanov [Wed, 23 Apr 2014 11:16:03 +0000 (11:16 +0000)]
Create MCTargetOptions.
For now it contains a single flag, SanitizeAddress, which enables
AddressSanitizer instrumentation of inline assembly.
Patch by Yuri Gorshenin.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206971
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Atanasyan [Wed, 23 Apr 2014 11:10:55 +0000 (11:10 +0000)]
[yaml2obj][ELF] Add a virtual destructor to the ELFYAML::Section class
to prevent memory leaks.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206969
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Wed, 23 Apr 2014 11:03:03 +0000 (11:03 +0000)]
[LCG] Add the first round of mutation support to the lazy call graph.
This implements the core functionality necessary to remove an edge from
the call graph and correctly update both the basic graph and the SCC
structure. As part of that it has to run a tiny (in number of nodes)
Tarjan-style DFS walk of an SCC being mutated to compute newly formed
SCCs, etc.
This is *very rough* and a WIP. I have a bunch of FIXMEs for code
cleanup that will reduce the boilerplate in this change substantially.
I also have a bunch of simplifications to various parts of both
algorithms that I want to make, but first I'd like to have a more
holistic picture. Ideally, I'd also like more testing. I'll probably add
quite a few more unit tests as I go here to cover the various different
aspects and corner cases of removing edges from the graph.
Still, this is, so far, successfully updating the SCC graph in-place
without disrupting the identity established for the existing SCCs even
when we do challenging things like delete the critical edge that made an
SCC cycle at all and have to reform things as a tree of smaller SCCs.
Getting this to work is really critical for the new pass manager as it
is going to associate significant state with the SCC instance and needs
it to be stable. That is also the motivation behind the return of the
newly formed SCCs. Eventually, I'll wire this all the way up to the
public API so that the pass manager can use it to correctly re-enqueue
newly formed SCCs into a fresh postorder traversal.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206968
91177308-0d34-0410-b5e6-
96231b3b80d8
James Molloy [Wed, 23 Apr 2014 10:50:32 +0000 (10:50 +0000)]
[ARM64] Fix formatting.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206967
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Wed, 23 Apr 2014 10:31:17 +0000 (10:31 +0000)]
[LCG] Implement Tarjan's algorithm correctly this time. We have to walk
up the stack finishing the exploration of each entries children before
we're finished in addition to accounting for their low-links. Added
a unittest that really hammers home the need for this with interlocking
cycles that would each appear distinct otherwise and crash or compute
the wrong result. As part of this, nuke a stale fixme and bring the rest
of the implementation still more closely in line with the original
algorithm.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206966
91177308-0d34-0410-b5e6-
96231b3b80d8
James Molloy [Wed, 23 Apr 2014 10:26:40 +0000 (10:26 +0000)]
[ARM64] Add a big endian version of the ARM64 target machine, and update all users.
This completes the porting of r202024 (cpirker "Add AArch64 big endian Target (aarch64_be)") to ARM64.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206965
91177308-0d34-0410-b5e6-
96231b3b80d8
Alexey Volkov [Wed, 23 Apr 2014 10:20:31 +0000 (10:20 +0000)]
Fixing typos in commit r206957
Differential Revision: http://reviews.llvm.org/D3451
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206960
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Wed, 23 Apr 2014 09:57:18 +0000 (09:57 +0000)]
[LCG] Add some accessor methods to the SCC to allow iterating over the
parents of an SCC, and add a lookup method for finding the SCC for
a given function. These aren't used yet, but will be used shortly in
some unit tests I'm adding and are really part of the broader intended
interface for the analysis.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206959
91177308-0d34-0410-b5e6-
96231b3b80d8
Alexey Volkov [Wed, 23 Apr 2014 08:57:09 +0000 (08:57 +0000)]
[X86] Silvermont new scheduler model
This model is not final and work is still in progress.
However there are substantial improvements on integer tests mainly because of better RAL with new scheduler.
Differential Revision: http://reviews.llvm.org/D3451
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206957
91177308-0d34-0410-b5e6-
96231b3b80d8
Alexander Musman [Wed, 23 Apr 2014 08:40:37 +0000 (08:40 +0000)]
[LV] Statistics numbers for LoopVectorize introduced: a number of analyzed loops & a number of vectorized loops.
Use -stats to see how many loops were analyzed for possible vectorization and how many of them were actually vectorized.
Patch by Zinovy Nis
Differential Revision: http://reviews.llvm.org/D3438
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206956
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Wed, 23 Apr 2014 08:08:49 +0000 (08:08 +0000)]
[LCG] Add a unittest for the LazyCallGraph. I had a weak moment and
resisted this for too long. Just with the basic testing here I was able
to exercise the analysis in more detail and sift out both type signature
bugs in the API and a bug in the DFS numbering. All of these are fixed
here as well.
The unittests will be much more important for the mutation support where
it is necessary to craft minimal mutations and then inspect the state of
the graph. There is just no way to do that with a standard FileCheck
test. However, unittesting these kinds of analyses is really quite easy,
especially as they're designed with the new pass manager where there is
essentially no infrastructure required to rig up the core logic and
exercise it at an API level.
As a minor aside about the DFS numbering bug, the DFS numbering used in
LCG is a bit unusual. Rather than numbering from 0, we number from 1,
and use 0 as the sentinel "unvisited" state. Other implementations often
use '-1' for this, but I find it easier to deal with 0 and it shouldn't
make any real difference provided someone doesn't write silly bugs like
forgetting to actually initialize the DFS numbering. Oops. ;]
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206954
91177308-0d34-0410-b5e6-
96231b3b80d8
Elena Demikhovsky [Wed, 23 Apr 2014 07:21:04 +0000 (07:21 +0000)]
X86Disassembler - fixed a bug in immediate print
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206953
91177308-0d34-0410-b5e6-
96231b3b80d8
Stepan Dyatkovskiy [Wed, 23 Apr 2014 06:56:28 +0000 (06:56 +0000)]
Integrated assbemler, macros: added 'vararg' argument qualifier support.
Note, currently we have no 'vararg' support for darwin macros.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206951
91177308-0d34-0410-b5e6-
96231b3b80d8
Kevin Qin [Wed, 23 Apr 2014 06:22:48 +0000 (06:22 +0000)]
[ARM64] Enable feature predicates for NEON / FP / CRYPTO.
AArch64 has feature predicates for NEON, FP and CRYPTO instructions.
This allows the compiler to generate code without using FP, NEON
or CRYPTO instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206949
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Wed, 23 Apr 2014 06:09:03 +0000 (06:09 +0000)]
[LCG] Hoist the logic for forming a new SCC from the top of the DFSStack
into a helper function. I plan to re-use it for doing incremental
DFS-based updates to the SCCs when we mutate the call graph.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206948
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Wed, 23 Apr 2014 04:00:17 +0000 (04:00 +0000)]
[LCG] Switch the Callee sets to be DenseMaps pointing to the index into
the Callee list. This is going to be quite important to prevent removal
from going quadratic. No functionality changed at this point, this is
one of the refactoring patches I've broken out of my initial work toward
mutation updates of the call graph.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206938
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Wed, 23 Apr 2014 01:09:29 +0000 (01:09 +0000)]
Fix test/CodeGen/arm.ll
The 'CHECK: add' line was occasionally matching against the filename,
breaking the subsequent CHECK-NOT. Also use CHECK-LABEL.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206936
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Tue, 22 Apr 2014 23:09:36 +0000 (23:09 +0000)]
Requisite reformatting for previous commit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206927
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Tue, 22 Apr 2014 22:39:41 +0000 (22:39 +0000)]
Push memory ownership of DwarfUnits into clients of DwarfFile.
This prompted me to push references through most of DwarfDebug. Sorry
for the churn.
Honestly it's a bit silly that we're passing around units all over the
place like that anyway and I think it's mostly due to the DIE attribute
adding utility functions being utilities in DwarfUnit. I should have
another go at moving them out of DwarfUnit...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206925
91177308-0d34-0410-b5e6-
96231b3b80d8
Sean Silva [Tue, 22 Apr 2014 21:47:53 +0000 (21:47 +0000)]
[docs] Add a note to docs/README.txt
Added note to docs/README.txt on how to check the reachibility of
external links in the documentation.
Patch by Dan Liew!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206924
91177308-0d34-0410-b5e6-
96231b3b80d8
Kevin Enderby [Tue, 22 Apr 2014 21:42:18 +0000 (21:42 +0000)]
Change the prototype for MCContext::FatalError() so it can be called
from places like MCCodeEmitter() in the MC backend when the
MCContext is const.
I was going to use this in my change for r206669 but Jim convinced
me to use an assert there. But this still is a good tweak.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206923
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Tue, 22 Apr 2014 21:27:37 +0000 (21:27 +0000)]
Use std::unique_ptr to handle ownership of DwarfUnits in DwarfFile.
So Chandler - how about those range algorithms? (would really love a
dereferencing range adapter for this sort of stuff)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206921
91177308-0d34-0410-b5e6-
96231b3b80d8
Rui Ueyama [Tue, 22 Apr 2014 19:52:05 +0000 (19:52 +0000)]
Whitespace
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206919
91177308-0d34-0410-b5e6-
96231b3b80d8
Rui Ueyama [Tue, 22 Apr 2014 19:47:26 +0000 (19:47 +0000)]
No need to check condition after grow()
r206916 was not logically the same as the previous code because the
goto statements did not create loop. This should be the same as the
previous code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206918
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 22 Apr 2014 19:11:07 +0000 (19:11 +0000)]
Follow aliases when determining if a symbol is thumb.
This fixes pr19484.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206917
91177308-0d34-0410-b5e6-
96231b3b80d8
Rui Ueyama [Tue, 22 Apr 2014 19:07:14 +0000 (19:07 +0000)]
Replace loops using goto with plain while loops
Goto statements jumping into previous inner blocks are pretty confusing
to read even though in this case they are valid. No reason to not use
while loops there.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206916
91177308-0d34-0410-b5e6-
96231b3b80d8
Juergen Ributzka [Tue, 22 Apr 2014 18:06:58 +0000 (18:06 +0000)]
[Constant Hoisting] Materialize the constant before the cloned cast instruction.
In the case where the constant comes from a cloned cast instruction, the
materialization code has to go before the cloned cast instruction.
This commit fixes the method that finds the materialization insertion point
by making it aware of this case.
This fixes <rdar://problem/
15532441>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206913
91177308-0d34-0410-b5e6-
96231b3b80d8
Juergen Ributzka [Tue, 22 Apr 2014 18:06:51 +0000 (18:06 +0000)]
[Constant Hoisting] Print the instructions in the correct order for debugging. No functional change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206912
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 22 Apr 2014 17:47:03 +0000 (17:47 +0000)]
Fix DataLayout::operator==().
Patch by Maks Naumov!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206911
91177308-0d34-0410-b5e6-
96231b3b80d8
Kevin Enderby [Tue, 22 Apr 2014 17:27:29 +0000 (17:27 +0000)]
Fix the assembler to print a better relocatable expression error
diagnostic that includes location information.
Currently if one has this assembly:
.quad (0x1234 + (4 * SOME_VALUE))
where SOME_VALUE is undefined ones gets the less than
useful error message with no location information:
% clang -c x.s
clang -cc1as: fatal error: error in backend: expected relocatable expression
With this fix one now gets a more useful error message
with location information:
% clang -c x.s
x.s:5:8: error: expected relocatable expression
.quad (0x1234 + (4 * SOME_VALUE))
^
To do this I plumbed the SMLoc through the MCObjectStreamer
EmitValue() and EmitValueImpl() interfaces so it could be used
when creating the MCFixup.
rdar://
12391022
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206906
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Tue, 22 Apr 2014 17:21:40 +0000 (17:21 +0000)]
Simplify address pool index assignment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206905
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Tue, 22 Apr 2014 16:42:00 +0000 (16:42 +0000)]
R600: Emit error instead of unreachable on function call
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206904
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Tue, 22 Apr 2014 16:33:57 +0000 (16:33 +0000)]
R600/SI: Reorganize SIInstructions.td
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206902
91177308-0d34-0410-b5e6-
96231b3b80d8
Elena Demikhovsky [Tue, 22 Apr 2014 14:13:10 +0000 (14:13 +0000)]
AVX-512: store and truncstore for i1 values
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206897
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Tue, 22 Apr 2014 13:35:50 +0000 (13:35 +0000)]
Remove DOS CRLF.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206894
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Tue, 22 Apr 2014 12:45:47 +0000 (12:45 +0000)]
AArch64/ARM64: more testing from AArch64 to ARM64
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206889
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Tue, 22 Apr 2014 12:45:42 +0000 (12:45 +0000)]
AArch64/ARM64: make use of ANDS and BICS instructions for comparisons.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206888
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Tue, 22 Apr 2014 12:45:32 +0000 (12:45 +0000)]
AArch64/ARM64: add extra testing from AArch64 to ARM64
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206887
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Tue, 22 Apr 2014 12:04:53 +0000 (12:04 +0000)]
[X86] Require HasBMI2 for the new BZHI tablegen patterns.
Evidently tablegen doesn't infer this from the HasBMI2 predicate on the BZHI
instructions. This should fix the recent bot failures.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206885
91177308-0d34-0410-b5e6-
96231b3b80d8
Robert Khasanov [Tue, 22 Apr 2014 11:36:19 +0000 (11:36 +0000)]
[AVX512] Implemented integer conversions up/down with masking.
Added encoding tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206884
91177308-0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Tue, 22 Apr 2014 11:19:45 +0000 (11:19 +0000)]
[asan] Support outline instrumentation for wide types and delete dead code, patch by Yuri Gribov
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206883
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Tue, 22 Apr 2014 10:50:46 +0000 (10:50 +0000)]
[X86] Remove Tablegen def of X86bzhi SDNode: It's not needed as of r206879.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206880
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Tue, 22 Apr 2014 10:41:56 +0000 (10:41 +0000)]
[X86] Use tablegen instead of DAG combines to match BZHI instructions, as
suggested by Ben Kramer in review of r206738.
Thanks again Ben!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206879
91177308-0d34-0410-b5e6-
96231b3b80d8
Matheus Almeida [Tue, 22 Apr 2014 10:15:54 +0000 (10:15 +0000)]
[mips] Clang-format MipsAsmParser.
No functional changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206878
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Tue, 22 Apr 2014 10:10:26 +0000 (10:10 +0000)]
AArch64/ARM64: enable various AArch64 tests on ARM64.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206877
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Tue, 22 Apr 2014 10:10:18 +0000 (10:10 +0000)]
AArch64/ARM64: add patterns for scalar_to_vector/extract pairs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206876
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Tue, 22 Apr 2014 10:10:14 +0000 (10:10 +0000)]
AArch64/ARM64: mark fmul intrinsic as commutative.
This gives DAG patterns matching indexed patterns where either side is an
indexed vector.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206875
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Tue, 22 Apr 2014 10:10:09 +0000 (10:10 +0000)]
ARM: disable emission of __XYZvfp in soft-float environment.
The point of these calls is to allow Thumb-1 code to make use of the VFP unit
to perform its operations. This is not desirable with -msoft-float, since most
of the reasons you'd want that apply equally to the runtime library.
rdar://problem/
13766161
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206874
91177308-0d34-0410-b5e6-
96231b3b80d8
Hao Liu [Tue, 22 Apr 2014 09:57:06 +0000 (09:57 +0000)]
Fix an infinite loop bug in DAG Combine about keeping transfering between ANY_EXTEND and SIGN_EXTEND.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206873
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Tue, 22 Apr 2014 07:40:34 +0000 (07:40 +0000)]
[X86] Don't use BZHI for short masks (>=32 bits). Thanks to Ben Kramer for the
review.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206869
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Tue, 22 Apr 2014 05:41:06 +0000 (05:41 +0000)]
Revert "Use value semantics to manage DbgVariables rather than dynamic allocation/pointers."
This reverts commit r206780.
This commit was regressing gdb.opt/inline-locals.exp in the GDB 7.5 test
suite. Reverting until I can fix the issue.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206867
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Tue, 22 Apr 2014 05:26:14 +0000 (05:26 +0000)]
Use unique_ptr to manage ParsedBinariesAndObjects in LLVMSymbolizer
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206866
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Tue, 22 Apr 2014 04:11:14 +0000 (04:11 +0000)]
R600: Change how vector truncating stores are packed.
Don't introduce new operations on an illegal sub 32-bit type.
Do the operations on a 32-bit value, and then use a truncating store.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206864
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Tue, 22 Apr 2014 03:49:30 +0000 (03:49 +0000)]
R600: Make sign_extend_inreg legal.
Don't know why I didn't just do this in the first place.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206862
91177308-0d34-0410-b5e6-
96231b3b80d8
Jiangning Liu [Tue, 22 Apr 2014 03:33:26 +0000 (03:33 +0000)]
[AArch64] Enable global merge pass.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206861
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Tue, 22 Apr 2014 03:31:53 +0000 (03:31 +0000)]
blockfreq: Skip irreducible backedges inside functions
The branch that skips irreducible backedges was only active when
propagating mass at the top-level. In particular, when propagating mass
through a loop recognized by `LoopInfo` with irreducible control flow
inside, irreducible backedges would not be skipped.
Not sure where that idea came from, but the result was that mass was
lost until after loop exit. Added a testcase that covers this case.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206860
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Tue, 22 Apr 2014 03:31:50 +0000 (03:31 +0000)]
blockfreq: Rename PackagedLoops => Loops
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206859
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Tue, 22 Apr 2014 03:31:44 +0000 (03:31 +0000)]
blockfreq: Use a pointer for ContainingLoop too
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206858
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Tue, 22 Apr 2014 03:31:37 +0000 (03:31 +0000)]
blockfreq: Use pointers to loops instead of an index
Store pointers directly to loops inside the nodes. This could have been
done without changing the type stored in `std::vector<>`. However,
rather than computing the number of loops before constructing them
(which `LoopInfo` doesn't provide directly), I've switched to a
`vector<unique_ptr<LoopData>>`.
This adds some heap overhead, but the number of loops is typically
small.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206857
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Tue, 22 Apr 2014 03:31:34 +0000 (03:31 +0000)]
blockfreq: Implement clear() explicitly
This was implicitly with copy assignment before, which fails to actually
clear `std::vector<>`'s heap storage. Move assignment would work, but
since MSVC can't imply those anyway, explicitly `clear()`-ing members
makes more sense.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206856
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Tue, 22 Apr 2014 03:31:31 +0000 (03:31 +0000)]
blockfreq: Rename PackagedLoopData => LoopData
No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206855
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Tue, 22 Apr 2014 03:31:25 +0000 (03:31 +0000)]
blockfreq: Move PackagedLoopData above WorkingData
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206854
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Tue, 22 Apr 2014 03:31:23 +0000 (03:31 +0000)]
blockfreq: Remove "dead" comment
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206853
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Tue, 22 Apr 2014 03:10:36 +0000 (03:10 +0000)]
[Modules] Fix potential ODR violations by sinking the DEBUG_TYPE
definition below all of the header #include lines, tools edition.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206848
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Tue, 22 Apr 2014 03:07:47 +0000 (03:07 +0000)]
[Modules] Fix potential ODR violations by sinking the DEBUG_TYPE
definition below all of the header #include lines, lib/Support edition.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206847
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Tue, 22 Apr 2014 03:06:00 +0000 (03:06 +0000)]
[Modules] Fix potential ODR violations by sinking the DEBUG_TYPE
definition below all of the header #include lines, TableGen edition.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206846
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Tue, 22 Apr 2014 03:04:17 +0000 (03:04 +0000)]
[Modules] Fix potential ODR violations by sinking the DEBUG_TYPE
definition below all the header #include lines. This updates most of the
miscellaneous other lib/... directories. A few left though.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206845
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Tue, 22 Apr 2014 02:55:47 +0000 (02:55 +0000)]
[Modules] Fix potential ODR violations by sinking the DEBUG_TYPE
definition below all of the header #include lines, lib/Transforms/...
edition.
This one is tricky for two reasons. We again have a couple of passes
that define something else before the includes as well. I've sunk their
name macros with the DEBUG_TYPE.
Also, InstCombine contains headers that need DEBUG_TYPE, so now those
headers #define and #undef DEBUG_TYPE around their code, leaving them
well formed modular headers. Fixing these headers was a large motivation
for all of these changes, as "leaky" macros of this form are hard on the
modules implementation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206844
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Tue, 22 Apr 2014 02:48:03 +0000 (02:48 +0000)]
[Modules] Fix potential ODR violations by sinking the DEBUG_TYPE
definition below all the header #include lines, lib/Analysis/...
edition.
This one has a bit extra as there were *other* #define's before #include
lines in addition to DEBUG_TYPE. I've sunk all of them as a block.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206843
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Tue, 22 Apr 2014 02:41:26 +0000 (02:41 +0000)]
[Modules] Fix potential ODR violations by sinking the DEBUG_TYPE
definition below all of the header #include lines, lib/Target/...
edition.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206842
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Tue, 22 Apr 2014 02:28:45 +0000 (02:28 +0000)]
[cleanup] Fix two headers where we included a standard library header
after including the generated code from tablegen.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206841
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Tue, 22 Apr 2014 02:25:17 +0000 (02:25 +0000)]
[cleanup] Fix another place where we were including the tablegen'ed code
of a '.inc' file before including actual headers. In this case we had
both duplicated a header's include and were including a standard header.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206840
91177308-0d34-0410-b5e6-
96231b3b80d8
Quentin Colombet [Tue, 22 Apr 2014 02:17:11 +0000 (02:17 +0000)]
This reverts r206828 until David has time to figure out that is going on.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206839
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Tue, 22 Apr 2014 02:03:14 +0000 (02:03 +0000)]
[cleanup] Lift using directives, DEBUG_TYPE definitions, and even some
system headers above the includes of generated '.inc' files that
actually contain code. In a few targets this was already done pretty
consistently, but it wasn't done *really* consistently anywhere. It is
strictly cleaner IMO and necessary in a bunch of places where the
DEBUG_TYPE is referenced from the generated code. Consistency with the
necessary places trumps. Hopefully the build bots are OK with the
movement of intrin.h...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206838
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Tue, 22 Apr 2014 02:02:50 +0000 (02:02 +0000)]
[Modules] Remove potential ODR violations by sinking the DEBUG_TYPE
define below all header includes in the lib/CodeGen/... tree. While the
current modules implementation doesn't check for this kind of ODR
violation yet, it is likely to grow support for it in the future. It
also removes one layer of macro pollution across all the included
headers.
Other sub-trees will follow.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206837
91177308-0d34-0410-b5e6-
96231b3b80d8
Quentin Colombet [Tue, 22 Apr 2014 01:20:34 +0000 (01:20 +0000)]
[CodeGenPrepare] Use APInt to check the value of the immediate in a and
while checking candidate for bit field extract.
Otherwise the value may not fit in uint64_t and this will trigger an
assertion.
This fixes PR19503.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206834
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Mon, 21 Apr 2014 23:58:10 +0000 (23:58 +0000)]
[Modules] Followup to r206822 to add a DEBUG_TYPE which is used on ARM
and PPC, but not x86.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206830
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Mon, 21 Apr 2014 23:47:47 +0000 (23:47 +0000)]
Use unique_ptr to handle ownership of Value*s in Cloning unit tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206828
91177308-0d34-0410-b5e6-
96231b3b80d8
Rui Ueyama [Mon, 21 Apr 2014 23:00:42 +0000 (23:00 +0000)]
Fix wrong iterator type
ELFEntityIterator does not implement RandomAccessIterator. It does
not even implement BidirectionalIterator.
This patch fixes LLD build issue when compiled with MSVC2013 with
debug: MSVC's find_if checks if the start iterator is before the end
iterator in the sense of operator< if it declares implementing
RandomAccessIterator. If a class does not have operator<, it fails
to compile.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206825
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Mon, 21 Apr 2014 22:58:00 +0000 (22:58 +0000)]
Simplify DFAPacketizerEmitter State copy/move semantics to use compiler defaults.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206824
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Mon, 21 Apr 2014 22:55:11 +0000 (22:55 +0000)]
[Modules] Make Support/Debug.h modular. This requires it to not change
behavior based on other files defining DEBUG_TYPE, which means it cannot
define DEBUG_TYPE at all. This is actually better IMO as it forces folks
to define relevant DEBUG_TYPEs for their files. However, it requires all
files that currently use DEBUG(...) to define a DEBUG_TYPE if they don't
already. I've updated all such files in LLVM and will do the same for
other upstream projects.
This still leaves one important change in how LLVM uses the DEBUG_TYPE
macro going forward: we need to only define the macro *after* header
files have been #include-ed. Previously, this wasn't possible because
Debug.h required the macro to be pre-defined. This commit removes that.
By defining DEBUG_TYPE after the includes two things are fixed:
- Header files that need to provide a DEBUG_TYPE for some inline code
can do so by defining the macro before their inline code and undef-ing
it afterward so the macro does not escape.
- We no longer have rampant ODR violations due to including headers with
different DEBUG_TYPE definitions. This may be mostly an academic
violation today, but with modules these types of violations are easy
to check for and potentially very relevant.
Where necessary to suppor headers with DEBUG_TYPE, I have moved the
definitions below the includes in this commit. I plan to move the rest
of the DEBUG_TYPE macros in LLVM in subsequent commits; this one is big
enough.
The comments in Debug.h, which were hilariously out of date already,
have been updated to reflect the recommended practice going forward.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206822
91177308-0d34-0410-b5e6-
96231b3b80d8