Commit Graph

100651 Commits

Author SHA1 Message Date
Timur Iskhodzhanov db276b94b7 Remove unused typedef
llvm-svn: 202808
2014-03-04 09:57:00 +00:00
Vladimir Medic 615b26e1cd This patch implements .set mips32r2 directive and sets appropriate feature bits. It also introduces helper functions that are used to set and clear feature bits as necessary. This directive is a counterpart of -mips32r2 command line options with the exception that it does not influence elf header flags. The usage example is gives in test file.
llvm-svn: 202807
2014-03-04 09:54:09 +00:00
Yaron Keren 225d550b05 Cleaning up a bunch of pre-Visual C++ 2012 build hacks.
llvm-svn: 202806
2014-03-04 09:23:33 +00:00
Chandler Carruth 387e059c04 [cleanup] Add a getOperandNo method to the Use class and implement it
out-of-line so that it can refer to the methods on User. As
a consequence, this removes the need to define one template method if
value_use_iterator in the extremely strange User.h header (!!!).

This makse Use.h slightly less peculiar. The only remaining real
peculiarity is the definition of Use::set in Value.h

llvm-svn: 202805
2014-03-04 09:19:43 +00:00
Chandler Carruth 4ffd9d250c [cleanup] Use early exit and simpler temporary variables to clarify the
swap implementation.

llvm-svn: 202802
2014-03-04 09:00:15 +00:00
Patrik Hagglund 29a76ac646 Fix gcc -Wunused-but-set-variable warning.
llvm-svn: 202800
2014-03-04 08:55:18 +00:00
Chandler Carruth 618bd1b75b [cleanup] Run clang-format over the Use code. It was *really*
inconsistent both with itself and with LLVM at large with formatting.
The *s were on the wrong side, the indent was off, etc etc. This is much
cleaner.

Also, go clang-format laying out the array of tags in nice columns.

llvm-svn: 202799
2014-03-04 08:53:41 +00:00
Chandler Carruth 06d49183ec [cleanup] Tidy up and modernize comments and the definition order for
the Use class.

More cleanups to come here. This class just needs some TLC.

llvm-svn: 202798
2014-03-04 08:51:00 +00:00
NAKAMURA Takumi 49be2f43c2 PBQP/Graph.h: Prune @return in setNodeCosts, possibly copypasto. [-Wdocumentation]
llvm-svn: 202795
2014-03-04 07:27:08 +00:00
NAKAMURA Takumi fcfff634ef PBQP/Graph.h: s/os/OS/ in @param. [-Wdocumentation]
llvm-svn: 202794
2014-03-04 07:26:55 +00:00
Craig Topper 32ea826a8a [C+11] Add 'override' keyword to methods in the support library.
llvm-svn: 202791
2014-03-04 06:24:11 +00:00
Rui Ueyama fd3cb9e37f Fix typo.
llvm-svn: 202787
2014-03-04 04:22:41 +00:00
Rui Ueyama 8c1d4c948a Use auto for readability.
llvm-svn: 202786
2014-03-04 04:15:59 +00:00
Rui Ueyama 9c674e6851 llvm-objdump: Print x64 unwind info in executable.
The original code does not work correctly on executable files because the
code is written in such a way that only object files are assumed to be given
to llvm-objdump.

Contents of RuntimeFunction are different between executables and objects. In
executables, fields in RuntimeFunction have actual addresses to unwind info
structures. On the other hand, in object files, the fields have zero value,
but instead there are relocations pointing to the fields, so that Linker will
fill them at link-time.

So, when we are reading an object file, we need to use relocation info to
find the location of unwind info. When executable, we should just look at the
values in RuntimeFunction.

llvm-svn: 202785
2014-03-04 04:00:55 +00:00
Rui Ueyama 432bc1048f Make a test for llvm-objdump a little bit more readable.
llvm-svn: 202783
2014-03-04 03:23:19 +00:00
Rui Ueyama 6dfd4e156b llvm-objdump: Split printRuntimeFunction to two small functions.
No functionality change.

llvm-svn: 202781
2014-03-04 03:08:45 +00:00
Kevin Qin b08c6746c4 [AArch64]Fix improper diagnostics about offset range of load/store instructions.
llvm-svn: 202775
2014-03-04 02:05:13 +00:00
Reid Kleckner d84e70ea1b MC: Fix Intel assembly parser for [global + offset]
We were dropping the displacement on the floor if we also had some
immediate offset.

Should fix PR19033.

llvm-svn: 202774
2014-03-04 00:33:17 +00:00
Chad Rosier 70cb2311ab Revert "[AArch64] This is a work in progress to provide a machine description"
This reverts commit ff717c8fc786a0cfa1602982b91895fa09e514fc.

llvm-svn: 202773
2014-03-04 00:32:07 +00:00
Rui Ueyama 39f1b9767a llvm-objdump: Split printCOFFUnwindInfo into small functions.
llvm-svn: 202772
2014-03-04 00:31:48 +00:00
Rui Ueyama f3fda79df0 llvm-objdump: Use range-based-for loop and fix format.
This is a small cleanup before making a bit larger change to this function.

llvm-svn: 202770
2014-03-04 00:03:09 +00:00
Chad Rosier fe45290566 [AArch64] This is a work in progress to provide a machine description
for the Cortex-A53 subtarget in the AArch64 backend.

This patch lays the ground work to annotate each AArch64 instruction
(no NEON yet) with a list of SchedReadWrite types. The patch also
provides the Cortex-A53 processor resources, maps those the the default
SchedReadWrites, and provides basic latency. NEON support will be added
in a subsequent patch with proper forwarding logic.

Verification was done by setting the pre-RA scheduler to linearize to
better gauge the effect of the MIScheduler. Even without modeling the
forward logic, the results show a modest improvement for Cortex-A53.

Reviewers: apazos, mcrosier, atrick
Patch by Dave Estes <cestes@codeaurora.org>!

llvm-svn: 202767
2014-03-03 23:32:47 +00:00
Aaron Ballman f72eeaa438 Adding support for MSVC debugger visualization of the Optional datatype.
llvm-svn: 202760
2014-03-03 21:15:07 +00:00
Reid Kleckner 38dcdb744f Avoid std::function until PR19030 is fixed
We'd like to keep the clang-cl self-host working until we implement
MSVC-compatible RTTI.

Differential Revision: http://llvm-reviews.chandlerc.com/D2930

llvm-svn: 202758
2014-03-03 21:12:13 +00:00
Benjamin Kramer ef78566162 Add missing include.
libstdc++ and libc++ pulled this in transitively so I didn't notice.

llvm-svn: 202753
2014-03-03 20:06:13 +00:00
Diego Novillo f5041ce558 Pass to emit DWARF path discriminators.
DWARF discriminators are used to distinguish multiple control flow paths
on the same source location. When this happens, instructions across
basic block boundaries will share the same debug location.

This pass detects this situation and creates a new lexical scope to one
of the two instructions. This lexical scope is a child scope of the
original and contains a new discriminator value. This discriminator is
then picked up from MCObjectStreamer::EmitDwarfLocDirective to be
written on the object file.

This fixes http://llvm.org/bugs/show_bug.cgi?id=18270.

llvm-svn: 202752
2014-03-03 20:06:11 +00:00
Benjamin Kramer b2f034b85e [C++11] Use std::tie to simplify compare operators.
No functionality change.

llvm-svn: 202751
2014-03-03 19:58:30 +00:00
Peter Collingbourne 23d72e8465 Document that std::initializer_list is not always available.
Differential Revision: http://llvm-reviews.chandlerc.com/D2923

llvm-svn: 202750
2014-03-03 19:54:42 +00:00
Benjamin Kramer 9c794c7a7c [C++11] Remove a leftover std::function instance.
It's not needed anymore.

llvm-svn: 202748
2014-03-03 19:49:02 +00:00
Chandler Carruth d031fe9fcf [C++11] Remove the completely unnecessary requirement on SetVector's
remove_if that its predicate is adaptable. We don't actually need this,
we can write a generic adapter for any predicate.

This lets us remove some very wrong std::function usages. We should
never be using std::function for predicates to algorithms. This incurs
an *indirect* call overhead for every evaluation of the predicate, and
makes it very hard to inline through.

llvm-svn: 202742
2014-03-03 19:28:52 +00:00
Diego Novillo 282450d94c Add DWARF discriminator support to DILexicalBlocks.
This adds support for emitting discriminators from DILexicalBlocks.

llvm-svn: 202736
2014-03-03 18:53:17 +00:00
Lang Hames 1863582863 Re-apply r202551, which introduced new PBQP solver.
llvm-svn: 202735
2014-03-03 18:50:05 +00:00
Benjamin Kramer 17388a61b2 Revert "[C++11] Replace LLVM atomics with std::atomic."
Breaks the MSVC build.
DataStream.cpp(44): error C2552: 'llvm::Statistic::Value' : non-aggregates cannot be initialized with initializer list

llvm-svn: 202731
2014-03-03 18:02:34 +00:00
Benjamin Kramer 0b6eb591a4 [C++11] Replace LLVM atomics with std::atomic.
With C++11 we finally have a standardized way to specify atomic operations. Use
them to replace the existing custom implemention. Sadly the translation is not
entirely trivial as std::atomic allows more fine-grained control over the
atomicity. I tried to preserve the old semantics as well as possible.

Differential Revision: http://llvm-reviews.chandlerc.com/D2915

llvm-svn: 202730
2014-03-03 17:53:30 +00:00
Duncan P. N. Exon Smith 9948637687 C++11: Beware unnecessary copies with auto
It's easy to copy unintentionally when using 'auto', particularly inside
range-based for loops.  Best practise is to use 'const&' unless there's
a good reason not to.

llvm-svn: 202729
2014-03-03 16:48:47 +00:00
Duncan P. N. Exon Smith 9724e833ce Clarify struct usage guidelines
The current coding standards restrict the use of struct to PODs, but no
one has been following them.  This patch updates the standards to
clarify when structs are dangerous and describe common practice in LLVM.

llvm-svn: 202728
2014-03-03 16:48:44 +00:00
Tom Stellard e6ba81dae9 Add patch level to llvm version in CMake and Autoconf
The shared library generated by autoconf will now be called
libLLVM-$(VERSION_MAJOR).$(VERSION_MINOR).$(VERSION_PATCH)$(VERSION_SUFFIX).so
and a symlink named
libLLVM-$(VERSION_MAJOR).$(VERSION_MINOR)$(VERSION_SUFFIX).so will
also be created in the install directory.

llvm-svn: 202720
2014-03-03 15:22:00 +00:00
Richard Osborne 49ae117757 Don't emit a blank line when running llvm-config --system-libs.
Summary:
Previously llvm-config --system-libs would print something like:

$ llvm-config --system-libs

-lz -ltinfo -lrt -ldl -lm

Now we don't emit blank line. Functionality is unchanged otherwise, in
particular llvm-config --libs --system-libs still emits the LLVM libraries
and the system libraries on different lines.

Reviewers: chapuni

Reviewed By: chapuni

CC: llvm-commits

Differential Revision: http://llvm-reviews.chandlerc.com/D2901

llvm-svn: 202719
2014-03-03 15:06:14 +00:00
Daniel Sanders fa961d76f0 [mips] Prevent %lo relocation being used on MSA loads and stores.
Summary:
Parts of the compiler still believed MSA load/stores have a 16-bit offset when
it is actually 10-bit. Corrected this, and fixed a closely related issue this
uncovered where load/stores with 10-bit and 12-bit offsets (MSA and microMIPS
respectively) could not load/store using offsets from the stack/frame pointer.
They accepted frameindex+offset, but not frameindex by itself.

Reviewers: jacksprat, matheusalmeida

Reviewed By: jacksprat

Differential Revision: http://llvm-reviews.chandlerc.com/D2888

llvm-svn: 202717
2014-03-03 14:31:21 +00:00
Ed Maste 2a710d0a5b [mips] support FK_Data_2 and FK_Data_8 to fix big-endian debug data
This fixes invalid lengths in .debug_aranges on big-endian mips64
(lengths appear to be left-shifted by 32 bits) and in .debug_loc.

Differential Revision: http://llvm-reviews.chandlerc.com/D2517

llvm-svn: 202716
2014-03-03 14:27:49 +00:00
Vladimir Medic f9f8f4859a Fixing a build failure reported by certain buildbots. This will disable jalx instruction for micromips target.
llvm-svn: 202715
2014-03-03 14:05:14 +00:00
Benjamin Kramer 0a7a17dfcf Unbreak the C++11 build.
llvm-svn: 202714
2014-03-03 13:59:41 +00:00
Evgeniy Stepanov 77be532f71 [msan] Handle X86 SIMD bitshift intrinsics.
llvm-svn: 202712
2014-03-03 13:47:42 +00:00
Vladimir Medic 43e978234a This patch implements jalx instruction for Mips architecture.This instruction executes a procedure call within the current 256 MB-aligned region and change the ISA Mode from MIPS32 to microMIPS32 or MIPS16e. Usage samples for assembler and dissasembler are provided as well.
llvm-svn: 202706
2014-03-03 13:12:59 +00:00
Tobias Grosser 4abf9d3a54 [C++11] Add a basic block range view for RegionInfo
This also switches the users in LLVM to ensure this functionality is tested.

llvm-svn: 202705
2014-03-03 13:00:39 +00:00
Chandler Carruth d9063f794a [C++11] MSVC 2012 can't handle list-initialization that calls
a constructor either. Just call the constructor directly. I'll look into
making this work with aggregate initialization some other time (when
I have someone with MSVC 2012 handy to test ideas).

llvm-svn: 202688
2014-03-03 10:59:41 +00:00
Chandler Carruth 1583e99c23 [C++11] Add two range adaptor views to User: operands and
operand_values. The first provides a range view over operand Use
objects, and the second provides a range view over the Value*s being
used by those operands.

The naming is "STL-style" rather than "LLVM-style" because we have
historically named iterator methods STL-style, and range methods seem to
have far more in common with their iterator counterparts than with
"normal" APIs. Feel free to bikeshed on this one if you want, I'm happy
to change these around if people feel strongly.

I've switched code in SROA and LCG to exercise these mostly to ensure
they work correctly -- we don't really have an easy way to unittest this
and they're trivial.

llvm-svn: 202687
2014-03-03 10:42:58 +00:00
Chandler Carruth d5346dcf3e [C++11] Add an iterator_range class template. This is modeled on the
proposed std::iterator_pair which was in committee suggested to move
toward std::iterator_range. There isn't a formal paper yet, but there
seems little disagreement within the committee at this point so it seems
fine to provide our own version in the llvm namespace so we can easily
build range adaptors for the numerous iterators in LLVM's interfaces.

Note that I'm not really comfortable advocating a crazed range-based
migration just yet. The range stuff is still in a great deal of flux in
C++ and the committee hasn't entirely made up its mind (afaict) about
how it will work. So I'm mostly trying to provide the minimal
functionality needed to make writing easy and convenient range adaptors
for range based for loops easy and convenient. ;]

Subsequent patches will use this across the fundamental IR types, where
there are iterator views.

llvm-svn: 202686
2014-03-03 10:28:38 +00:00
Ahmed Charles 686eb9a966 [C++11] Pass unique_ptr by value instead of &&.
Suggestion by Richard Smith.

llvm-svn: 202678
2014-03-03 07:15:46 +00:00
Saleem Abdulrasool 19dcc312ee AsmParser: add missed tests
The diagnostics tests were missing from the previous introduction of ifeqs.

llvm-svn: 202674
2014-03-03 06:35:00 +00:00