David Blaikie [Wed, 23 Apr 2014 23:37:35 +0000 (23:37 +0000)]
Remove intermediate accelerator table for names.
(similar changes coming for the other accelerator tables)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207049
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Wed, 23 Apr 2014 23:34:48 +0000 (23:34 +0000)]
[LCG] Switch the primary node iterator to be a *much* more normal C++
iterator, returning a Node by reference on dereference.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207048
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Wed, 23 Apr 2014 23:20:36 +0000 (23:20 +0000)]
[LCG] Make the insertion and query paths into the LCG which cannot fail
return references to better model this property.
No functionality changed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207047
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Wed, 23 Apr 2014 23:12:06 +0000 (23:12 +0000)]
[LCG] Switch the SCC lookup to be in terms of call graph nodes rather
than functions. So far, this access pattern is *much* more common. It
seems likely that any user of this interface is going to have nodes at
the point that they are querying the SCCs.
No functionality changed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207045
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Wed, 23 Apr 2014 23:03:45 +0000 (23:03 +0000)]
DwarfAccelTable: Remove trivial dtor and simplify construction with an array.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207044
91177308-0d34-0410-b5e6-
96231b3b80d8
Jordan Rose [Wed, 23 Apr 2014 22:44:11 +0000 (22:44 +0000)]
Use std::less instead of < in array_pod_sort's default comparator.
This makes array_pod_sort portably safe to use with pointers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207043
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Wed, 23 Apr 2014 22:28:13 +0000 (22:28 +0000)]
[LCG] Switch the primary SCC building code to use the negative low-link
values rather than an expensive dense map query to test whether children
have already been popped into an SCC. This matches the incremental SCC
building code. I've also included the assert that I put there but
updated both of their text.
No functionality changed here.
I still don't have any great ideas for sharing the code between the two
implementations, but I may try a brute-force approach to factoring it at
some point.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207042
91177308-0d34-0410-b5e6-
96231b3b80d8
Saleem Abdulrasool [Wed, 23 Apr 2014 21:55:18 +0000 (21:55 +0000)]
MC: disable test on thumbv7-windows
This is dependent on changes that are not fully ready to be merged yet (WoA
object file emission). The test can be re-enabled for that target later.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207038
91177308-0d34-0410-b5e6-
96231b3b80d8
Justin Bogner [Wed, 23 Apr 2014 21:44:55 +0000 (21:44 +0000)]
llvm-cov: Add support for gcov's --long-file-names option
GCOV provides an option to prepend output file names with the source
file name, to disambiguate between covered data that's included from
multiple sources. Add a flag to llvm-cov that does the same.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207035
91177308-0d34-0410-b5e6-
96231b3b80d8
Justin Bogner [Wed, 23 Apr 2014 21:44:48 +0000 (21:44 +0000)]
llvm-cov: Allow short options to be grouped
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207034
91177308-0d34-0410-b5e6-
96231b3b80d8
Saleem Abdulrasool [Wed, 23 Apr 2014 21:41:07 +0000 (21:41 +0000)]
MC: move test from Generic to COFF
This is a COFF specific test, move it to COFF to fix the Hexagon buildbots.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207030
91177308-0d34-0410-b5e6-
96231b3b80d8
Saleem Abdulrasool [Wed, 23 Apr 2014 21:29:40 +0000 (21:29 +0000)]
MC: move ARM64 test from AArch64 directory
The test was changed from aarch64 to arm64 but not moved. The test would fail
if the backend was not built.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207029
91177308-0d34-0410-b5e6-
96231b3b80d8
Saleem Abdulrasool [Wed, 23 Apr 2014 21:29:34 +0000 (21:29 +0000)]
MC: honour IMAGE_SCN_CNT_INITIALIZED_DATA
Emit the flag to indicate to the assembler that a section contains data if there
is pre-populated data present.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207028
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Wed, 23 Apr 2014 21:20:10 +0000 (21:20 +0000)]
Move the AddressPool from DwarfFile to DwarfDebug.
There's only ever one address pool, not one per DWARF output file, so
let's just have one.
(similar refactoring of the string pool to come soon)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207026
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Wed, 23 Apr 2014 21:20:07 +0000 (21:20 +0000)]
clang-format for my previous commit (I keep forgetting... )
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207025
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Wed, 23 Apr 2014 21:10:15 +0000 (21:10 +0000)]
Use pointer size function where only a pointer is expected
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207023
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Wed, 23 Apr 2014 21:04:59 +0000 (21:04 +0000)]
Separate out the DWARF address pool into its own type/files.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207022
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Wed, 23 Apr 2014 20:58:57 +0000 (20:58 +0000)]
Remove more default address space argument usage.
These places are inconsequential in practice.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207021
91177308-0d34-0410-b5e6-
96231b3b80d8
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