Commit Graph

100876 Commits

Author SHA1 Message Date
NAKAMURA Takumi 45374cc4ce [CMake] add_llvm_target(): No need to include TABLEGEN_OUTPUT in source list.
llvm-svn: 202862
2014-03-04 17:05:28 +00:00
Will Schmidt 3503018e19 [PowerPC] support powerpc64le as syntax-checking target (pass2)
Register the Asm Printer for the ppc64le target.

This fills in a spot that was missed in an earlier change (r187179).

llvm-svn: 202861
2014-03-04 16:51:52 +00:00
Richard Osborne 1b5fc39710 [XCore] Fix call of absolute address.
Previously for:

tail call void inttoptr (i64 65536 to void ()*)() nounwind

We would emit:

bl 65536

The immediate operand of the bl instruction is a relative offset so it is
wrong to use the absolute address here.

llvm-svn: 202860
2014-03-04 16:50:30 +00:00
NAKAMURA Takumi afd8d16bce [CMake] check-llvm: Include "bugpoint" in dependent list.
llvm-svn: 202858
2014-03-04 16:13:30 +00:00
NAKAMURA Takumi c886295343 Remove out-of-date comment in llvm/tools/CMakeLists.txt.
llvm-svn: 202857
2014-03-04 16:13:21 +00:00
Daniel Sanders d920770add [mips][msa] Correct the behaviour of the COPY_FW pseudo on lanes 2 and 3.
Summary:
Previously, attempting to extract lanes 2 and 3 would actually extract lane 1.
The MSA CodeGen tests only covered lanes 0 and 1.

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

llvm-svn: 202848
2014-03-04 13:54:30 +00:00
Chandler Carruth b475b42a88 Hey, we can stop depending on the IR library from the Support unittests
now. ;] Tested on both a static and shared CMake build. Hopefully the
bots will agree.

llvm-svn: 202844
2014-03-04 12:56:38 +00:00
Chandler Carruth 4b6845c7e7 [Modules] Move the LeakDetector header into the IR library where the
source file had already been moved. Also move the unittest into the IR
unittest library.

This may seem an odd thing to put in the IR library but we only really
use this with instructions and it needs the LLVM context to work, so it
is intrinsically tied to the IR library.

llvm-svn: 202842
2014-03-04 12:46:06 +00:00
Chandler Carruth f69c3390bd [cleanup] Fix a typo in the path.
llvm-svn: 202840
2014-03-04 12:33:40 +00:00
Chandler Carruth 1b69ed8f6a [Modules] Move the PassNameParser to the IR library as it deals in the
PassInfo structures of the legacy pass manager. Also give it the Legacy
prefix as it is not a particularly widely used header.

llvm-svn: 202839
2014-03-04 12:32:42 +00:00
Chandler Carruth 8cd041ef19 [Modules] Move the ConstantRange class into the IR library. This is
a bit surprising, as the class is almost entirely abstracted away from
any particular IR, however it encodes the comparsion predicates which
mutate ranges as ICmp predicate codes. This is reasonable as they're
used for both instructions and constants. Thus, it belongs in the IR
library with instructions and constants.

llvm-svn: 202838
2014-03-04 12:24:34 +00:00
Chandler Carruth 7288503bd5 [Modules] Stop including CFG.h from GenericDomTree.h. This used to be
necessary, but is no longer.

llvm-svn: 202836
2014-03-04 12:11:55 +00:00
Chandler Carruth aa0ab6389a [Modules] Move the PredIteratorCache into the IR library -- it is
hardcoded to use IR BasicBlocks.

llvm-svn: 202835
2014-03-04 12:09:19 +00:00
Chandler Carruth 64396b069a [Modules] Move the NoFolder into the IR library as it creates
instructions.

llvm-svn: 202834
2014-03-04 12:05:47 +00:00
Chandler Carruth b30e68b0bf [Modules] Move the ConstantFolder into the IR library where it can
reference the ConstantExpr implementation.

llvm-svn: 202833
2014-03-04 12:02:47 +00:00
Chandler Carruth 452a00747e [Modules] Move the TargetFolder into the Analysis library. Historically,
this would have been required because of the use of DataLayout, but that
has moved into the IR proper. It is still required because this folder
uses the constant folding in the analysis library (which uses the
datalayout) as the more aggressive basis of its folder.

llvm-svn: 202832
2014-03-04 11:59:06 +00:00
Chandler Carruth 1305dc3351 [Modules] Move CFG.h to the IR library as it defines graph traits over
IR types.

llvm-svn: 202827
2014-03-04 11:45:46 +00:00
Chandler Carruth d92a12302b [Modules] Delete DataFlow.h rather than move it to the IR library. No
one in the tree (or in Polly) is using this.

llvm-svn: 202825
2014-03-04 11:33:42 +00:00
Chandler Carruth a4ea269f15 [Modules] Move ValueMap to the IR library. While this class does not
directly care about the Value class (it is templated so that the key can
be any arbitrary Value subclass), it is in fact concretely tied to the
Value class through the ValueHandle's CallbackVH interface which relies
on the key type being some Value subclass to establish the value handle
chain.

Ironically, the unittest is already in the right library.

llvm-svn: 202824
2014-03-04 11:26:31 +00:00
Chandler Carruth 4220e9c154 [Modules] Move ValueHandle into the IR library where Value itself lives.
Move the test for this class into the IR unittests as well.

This uncovers that ValueMap too is in the IR library. Ironically, the
unittest for ValueMap is useless in the Support library (honestly, so
was the ValueHandle test) and so it already lives in the IR unittests.
Mmmm, tasty layering.

llvm-svn: 202821
2014-03-04 11:17:44 +00:00
Chandler Carruth 820a908df7 [Modules] Move the LLVM IR pattern match header into the IR library, it
obviously is coupled to the IR.

llvm-svn: 202818
2014-03-04 11:08:18 +00:00
Chandler Carruth 219b89b987 [Modules] Move CallSite into the IR library where it belogs. It is
abstracting between a CallInst and an InvokeInst, both of which are IR
concepts.

llvm-svn: 202816
2014-03-04 11:01:28 +00:00
Chandler Carruth 03eb0de93d [Modules] Move GetElementPtrTypeIterator into the IR library. As its
name might indicate, it is an iterator over the types in an instruction
in the IR.... You see where this is going.

Another step of modularizing the support library.

llvm-svn: 202815
2014-03-04 10:40:04 +00:00
Chandler Carruth 8394857f43 [Modules] Move InstIterator out of the Support library, where it had no
business.

This header includes Function and BasicBlock and directly uses the
interfaces of both classes. It has to do with the IR, it even has that
in the name. =] Put it in the library it belongs to.

This is one step toward making LLVM's Support library survive a C++
modules bootstrap.

llvm-svn: 202814
2014-03-04 10:30:26 +00:00
Chandler Carruth 442f784814 [cleanup] Re-sort all the includes with utils/sort_includes.py.
llvm-svn: 202811
2014-03-04 10:07:28 +00:00
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
Venkatraman Govindaraju 925ec9b11e [Sparc] Add trap on integer condition codes (Ticc) instructions to Sparc backend.
llvm-svn: 202670
2014-03-02 23:39:07 +00:00
Venkatraman Govindaraju 07d3af2821 [Sparc] Add return/rett instruction to Sparc backend.
llvm-svn: 202666
2014-03-02 22:55:53 +00:00
Benjamin Kramer ee68e352a7 Remove unnecessary copy ctors.
They didn't provide any value over the default ones but blocked move semantics.

llvm-svn: 202664
2014-03-02 21:24:52 +00:00
Venkatraman Govindaraju 4fa2ab26f5 [Sparc] Add support for decoding jmpl/retl/ret instruction.
llvm-svn: 202663
2014-03-02 21:17:44 +00:00
Benjamin Kramer 49c8ae21f5 Give APInt move semantics.
The interaction between defaulted operators and move elision isn't
totally obvious, add a unit test so it doesn't break unintentionally.

llvm-svn: 202662
2014-03-02 20:56:28 +00:00
Venkatraman Govindaraju c3084ad294 [Sparc] Add fcmpe* instructions to Sparc backend.
llvm-svn: 202661
2014-03-02 19:56:19 +00:00
Venkatraman Govindaraju f9a202a9ac [Sparc] Add VIS instructions to sparc backend.
llvm-svn: 202660
2014-03-02 19:31:21 +00:00
Hal Finkel 6aca2373f2 Add a PPC inline asm constraint type for single CR bits
Now that the PowerPC backend can track individual CR bits as first-class
registers, we should also have a way of allocating them for inline asm
statements. Because these registers are only one bit, if an output variable is
implicitly cast to a larger integer size, we'll get an any_extend to that
larger type (this is part of the existing target-independent logic). As a
result, regardless of the size of the output type, only the first bit is
meaningful.

The constraint identifier "wc" has been chosen for this purpose. Although gcc
does not currently support allocating individual CR bits, this identifier
choice has been coordinated with the gcc PowerPC team, and will be marked as
reserved for this purpose in the gcc constraints.md file.

llvm-svn: 202657
2014-03-02 18:23:39 +00:00
Michael Kuperstein 661e288a70 Ensure bitcode encoding of instructions and their operands stays stable.
This includes instructions that relate to memory access (load/store/GEP), comparison instructions and calls.

Work was done by lama.saba@intel.com.

llvm-svn: 202647
2014-03-02 15:26:36 +00:00
Benjamin Kramer d6f1f84f51 [C++11] Replace llvm::tie with std::tie.
The old implementation is no longer needed in C++11.

llvm-svn: 202644
2014-03-02 13:30:33 +00:00
Chandler Carruth cf01800b1f [C++11] Replace LLVM_STATIC_ASSERT with static_assert, we now have
access to it on all host toolchains.

llvm-svn: 202642
2014-03-02 13:10:45 +00:00
Ahmed Charles 7bc33bf934 Test commit.
llvm-svn: 202641
2014-03-02 13:08:46 +00:00
Benjamin Kramer b6d0bd48bd [C++11] Replace llvm::next and llvm::prior with std::next and std::prev.
Remove the old functions.

llvm-svn: 202636
2014-03-02 12:27:27 +00:00
Chandler Carruth d293fc2174 [C++11] Clarify in the Compiler.h support macros and comments (and
assert it with an #error) that we require MSVC 2012; MSVC 2010 will no
longer suffice.

llvm-svn: 202631
2014-03-02 10:07:45 +00:00
Craig Topper 127ab3e700 [C++11] Remove LLVM_FINAL and LLVM_OVERRIDE macros now that all their uses are gone.
llvm-svn: 202629
2014-03-02 09:54:13 +00:00
Venkatraman Govindaraju b745e67a64 [SparcV9] Adds support for branch on integer register instructions (BPr) and conditional moves on integer register (MOVr/FMOVr).
llvm-svn: 202628
2014-03-02 09:46:56 +00:00
Elena Demikhovsky 9737e3886b AVX-512: Fixed extract_vector_elt for v8i1 vector
llvm-svn: 202624
2014-03-02 09:19:44 +00:00
Chandler Carruth d9ff35f6ed [C++11] Suggest placing callable arguments as the last argument to
facilitate the nice formatting of lambdas passed there. Suggested by
Chris during review of my lambda additions, and something I strongly
agree with.

llvm-svn: 202622
2014-03-02 09:13:39 +00:00
Craig Topper 73156025e0 Switch all uses of LLVM_OVERRIDE to just use 'override' directly.
llvm-svn: 202621
2014-03-02 09:09:27 +00:00
Chandler Carruth e55d9bf508 [C++11] Update the coding standards to provide some important guidance
about a few constructs in C++11 that are worth starting off in
a consistent manner within the codebase.

This will be matched with a change to clang-format's LLVM style which
will switch the options to support C++11 and use these conventions.

llvm-svn: 202620
2014-03-02 08:38:35 +00:00
Craig Topper 973143eb42 Add back LLVM_FINAL macro. lld still needs it.
llvm-svn: 202619
2014-03-02 08:34:05 +00:00
Craig Topper 77dfe45f81 Switch all uses of LLVM_FINAL to just use 'final', and remove the macro.
llvm-svn: 202618
2014-03-02 08:08:51 +00:00
Chris Lattner a7c4b5e9b0 remove an old entry whose link is broken anyway
llvm-svn: 202617
2014-03-02 06:37:03 +00:00
Venkatraman Govindaraju 600f390bb9 [Sparc] Add support for parsing branches and conditional move instructions with %fcc1-%fcc3 conditional registers.
llvm-svn: 202616
2014-03-02 06:28:15 +00:00
Venkatraman Govindaraju 293a81c406 [Sparc] Make floating point branch instruction formats to accept %fcc0-%fcc1 conditional registers as input.
No functionality change.

llvm-svn: 202614
2014-03-02 04:43:45 +00:00
Chandler Carruth 002da5db29 [C++11] Switch all uses of the llvm_move macro to use std::move
directly, and remove the macro.

llvm-svn: 202612
2014-03-02 04:08:41 +00:00
Venkatraman Govindaraju 81aae57282 [Sparc] Add support for parsing fcmp with %fcc registers.
llvm-svn: 202610
2014-03-02 03:39:39 +00:00
Chandler Carruth 871171a25b [C++11] Add support for OwningPtr<T> to be converted to and from
std::unique_ptr<T>.

Patch by Ahmed Charles!

llvm-svn: 202609
2014-03-02 03:38:32 +00:00
Chandler Carruth 337bd07978 [C++11] Add unit tests for OwningPtr<T> in preparation for changes to make
it interoperate (minimally) with std::unique_ptr<T>. This is part of my
plan to migrate LLVM to use std::unique_ptr with a minimal impact on
out-of-tree code.

Patch by Ahmed Charles with some minor cleanups (and bool casts) by me.

llvm-svn: 202608
2014-03-02 03:26:39 +00:00
Alp Toker 61007d8ee0 [C++11] Expand and eliminate the LLVM_ENUM_INT_TYPE() macro
llvm-svn: 202607
2014-03-02 03:20:38 +00:00
Venkatraman Govindaraju bac285f588 [Sparc] Add register class for floating point conditional flags (%fcc0 - %fcc3).
llvm-svn: 202604
2014-03-02 02:12:33 +00:00
Sean Silva 216f1ee339 [docs] Fix some Sphinx warnings.
The docs now build cleanly. Yay!

The following warnings were fixed:

/home/sean/pg/llvm/llvm/docs/HowToReleaseLLVM.rst:364: WARNING: Enumerated list ends without a blank line; unexpected unindent.
/home/sean/pg/llvm/llvm/docs/InAlloca.rst:: WARNING: document isn't included in any toctree

/home/sean/pg/llvm/llvm/docs/CodingStandards.rst:85: WARNING: Title underline too short.

Supported C++11 Language and Library Features
-------------------------------------------
/home/sean/pg/llvm/llvm/docs/CodingStandards.rst:85: WARNING: Title underline too short.

Supported C++11 Language and Library Features
-------------------------------------------
/home/sean/pg/llvm/llvm/docs/GettingStarted.rst:185: WARNING: Explicit markup ends without a blank line; unexpected unindent.
/home/sean/pg/llvm/llvm/docs/GettingStarted.rst:565: WARNING: Explicit markup ends without a blank line; unexpected unindent.
/home/sean/pg/llvm/llvm/docs/GettingStarted.rst:567: WARNING: Block quote ends without a blank line; unexpected unindent.

llvm-svn: 202603
2014-03-02 00:21:42 +00:00
Venkatraman Govindaraju c86e0f3873 [SparcV9] Add support for parsing branch instructions with prediction.
llvm-svn: 202602
2014-03-01 22:03:07 +00:00
Matt Arsenault 2430958182 R600: Add failing control flow tests.
Simple cases hit a variety of problems at -O0.

llvm-svn: 202601
2014-03-01 21:45:41 +00:00
Hal Finkel 46043edc56 Remove extra truncs/exts around i32 bit operations on PPC64
This generalizes the code to eliminate extra truncs/exts around i1 bit
operations to also do the same on PPC64 for i32 bit operations. This eliminates
a fairly prevalent code wart:

int foo(int a) {
  return a == 5 ? 7 : 8;
}

On PPC64, because of the extension implied by the ABI, this would generate:

	cmplwi 0, 3, 5
	li 12, 8
	li 4, 7
	isel 3, 4, 12, 2
	rldicl 3, 3, 0, 32
	blr

where the 'rldicl 3, 3, 0, 32', the extension, is completely unnecessary. At
least for the single-BB case (which is all that the DAG combine mechanism can
handle), this unnecessary extension is no longer generated.

llvm-svn: 202600
2014-03-01 21:36:57 +00:00
Venkatraman Govindaraju 2286874119 [Sparc] Add support for parsing annulled branch instructions.
llvm-svn: 202599
2014-03-01 20:08:48 +00:00
Venkatraman Govindaraju e0c5bff720 [Sparc] Add support for parsing sparcv9 instructions addc/subc/addccc/subccc.
llvm-svn: 202598
2014-03-01 18:54:52 +00:00
Venkatraman Govindaraju 2a9c430677 [Sparc] Add missing ALU instruction patterns.
llvm-svn: 202597
2014-03-01 17:51:00 +00:00
Benjamin Kramer 573ff3620c Make helper function static.
llvm-svn: 202596
2014-03-01 17:24:40 +00:00
Sasa Stankovic 075e339373 Add missing FileCheck in test command line.
llvm-svn: 202594
2014-03-01 16:14:29 +00:00
Benjamin Kramer 3a377bce4e Now that we have C++11, turn simple functors into lambdas and remove a ton of boilerplate.
No intended functionality change.

llvm-svn: 202588
2014-03-01 11:47:00 +00:00
Chandler Carruth f4cde83d3a [C++11] Remove LLVM_HAS_CXX11_STDLIB now that it is just on.
llvm-svn: 202587
2014-03-01 10:57:19 +00:00
Chandler Carruth 16d3ab4f0e [C++11] Remove LLVM_HAS_CXX11_TYPETRAITS now that it is a constant due
to the build being C++11.

There is clearly still plenty of simplification than can be done here by
using standard type traits instead of rolling our own in many places.

llvm-svn: 202586
2014-03-01 10:48:14 +00:00
Chandler Carruth d7467065eb [C++11] Now that we're not using it, remove the
LLVM_HAS_RVALUE_REFERENCES macro.

llvm-svn: 202585
2014-03-01 10:31:48 +00:00
Chandler Carruth 667363b3e3 [C++11] Remove uses of LLVM_HAS_RVALUE_REFERENCES from the unittests.
llvm-svn: 202583
2014-03-01 09:36:06 +00:00
Chandler Carruth 172f7c37b9 [C++11] Remove the use of LLVM_HAS_RVALUE_REFERENCES from the rest of
the core LLVM libraries.

llvm-svn: 202582
2014-03-01 09:32:03 +00:00
Venkatraman Govindaraju 256735d485 [Sparc] Add support to decode unimp instruction.
llvm-svn: 202581
2014-03-01 09:28:18 +00:00
Chandler Carruth 1bf3847766 [C++11] Remove the R-value reference #if usage from the ADT and Support
libraries. It is now always 1 in LLVM builds.

llvm-svn: 202580
2014-03-01 09:27:28 +00:00
Chandler Carruth caf24cf304 [C++11] Force the other C++11 standard library detection macros to be
on unconditionally. Continuing to break down the C++98 support,
hopefully without breaking anything.

llvm-svn: 202579
2014-03-01 09:12:30 +00:00
Venkatraman Govindaraju 484ca1a030 [Sparc] Add support to decode negative simm13 operands in the sparc disassembler.
llvm-svn: 202578
2014-03-01 09:11:57 +00:00
Venkatraman Govindaraju 78df2dec0c [Sparc] Add support for decoding call instructions in the sparc disassembler.
llvm-svn: 202577
2014-03-01 08:30:58 +00:00
Andrew Trick a83c75d2fd Rewrite a terrible comment about the machine model.
llvm-svn: 202576
2014-03-01 07:57:02 +00:00
Venkatraman Govindaraju fb54821398 [Sparc] Add support to disassemble sparc memory instructions.
llvm-svn: 202575
2014-03-01 07:46:33 +00:00
Chandler Carruth a5dbff71e8 [C++11] Turn off compiler-based detection of R-value references, relying
on the fact that we now build in C++11 mode with modern compilers. This
should flush out any issues. If the build bots are happy with this, I'll
GC all the code for coping without R-value references.

llvm-svn: 202574
2014-03-01 06:31:00 +00:00
Venkatraman Govindaraju bf70566a45 Add support for parsing sun-style section flags in ELFAsmParser.
llvm-svn: 202573
2014-03-01 06:21:00 +00:00
Venkatraman Govindaraju 2b1682bcd4 [Sparc] Implement writeNopData. Emit actual NOP instruction instead of just filling with zeroes.
llvm-svn: 202572
2014-03-01 05:45:09 +00:00
Venkatraman Govindaraju 9fc29098df [Sparc] Teach SparcAsmParser to emit correct relocations for PIC code.
llvm-svn: 202571
2014-03-01 05:07:21 +00:00
Mark Seaborn 552d9e49d9 Fix RWMutex to be thread-safe when pthread_rwlock is not available
lib/Support/RWMutex.cpp contains an implementation of RWMutex that
uses pthread_rwlock, but when pthread_rwlock is not available (such as
under NaCl, when using newlib), it silently falls back to using the
no-op definition in lib/Support/Unix/RWMutex.inc, which is not
thread-safe.

Fix this case to be thread-safe by using a normal mutex.

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

llvm-svn: 202570
2014-03-01 04:30:32 +00:00
Chandler Carruth bbae512cd2 [C++11] Replace autoconf --enable-cxx11 with --enable-cxx1y. The
baseline is now C++11, and we unconditionally add -std=c++11 to the
flags.

This has the dim potential to break some non-GNU-compatible compiler (in
terms of -std flags) using the makefiles, but those makefiles are
littered with GNU-style compile flags so it would be very surprising to
me for it to actually happen in practice. As always, do let me know if
there is a toolchain you're using where this doesn't work, and I'll be
watching the bots.

llvm-svn: 202569
2014-03-01 03:33:08 +00:00
Chandler Carruth 25eacf7e77 [C++11] Switch the CMake option from LLVM_ENABLE_CXX11 (default on) to
LLVM_ENABLE_CXX1Y (default *off*). =D C++98 is dead. Long live C++11.

I don't exactly recommend using C++1y just yet though...

llvm-svn: 202567
2014-03-01 03:16:07 +00:00
Chandler Carruth 25353acf94 [docs] Update the docs to remove my hedging about C++98 vs. C++11. =]
The switch has been thrown. While I'm still watching for any failures or
problems with this, the documentation can go ahead and move forward.

llvm-svn: 202566
2014-03-01 02:48:03 +00:00
Venkatraman Govindaraju 3b6b0e42f0 [Sparc] 80 column rule. No functionality change.
llvm-svn: 202565
2014-03-01 02:28:34 +00:00
Venkatraman Govindaraju 6f2e08c8e1 [Sparc] Add support for parsing directives in SparcAsmParser.
llvm-svn: 202564
2014-03-01 02:18:04 +00:00
Venkatraman Govindaraju f7eecf80c4 [Sparc] Emit 'restore' instead of 'restore %g0, %g0, %g0'. This improves the readability of the generated code.
llvm-svn: 202563
2014-03-01 01:04:26 +00:00
Manman Ren 709c951b42 SpillPlacement: fix a bug in iterate.
Inside iterate, we scan backwards then scan forwards in a loop. When iteration
is not zero, the last node was just updated so we can skip it. But when
iteration is zero, we can't skip the last node.

For the testing case, fixing this will save a spill and move register copies
from hot path to cold path.

llvm-svn: 202557
2014-02-28 23:05:31 +00:00
Reid Kleckner 7c8743da59 [CMake] Remove dead C backend option
Patch by Jevin Sweval!

llvm-svn: 202556
2014-02-28 22:51:27 +00:00
Reid Kleckner e6ff5c51e6 Reflow isProfitableToMakeFastCC
llvm-svn: 202555
2014-02-28 22:50:08 +00:00
Lang Hames c083578a14 Jumped the gun with r202551 and broke some bots that weren't yet C++11ified.
Reverting until the C++11 switch is complete.

llvm-svn: 202554
2014-02-28 22:44:44 +00:00
Lang Hames 525a212379 New PBQP solver, and updates to the PBQP graph.
The previous PBQP solver was very robust but consumed a lot of memory,
performed a lot of redundant computation, and contained some unnecessarily tight
coupling that prevented experimentation with novel solution techniques. This new
solver is an attempt to address these shortcomings.

Important/interesting changes:

1) The domain-independent PBQP solver class, HeuristicSolverImpl, is gone.
It is replaced by a register allocation specific solver, PBQP::RegAlloc::Solver
(see RegAllocSolver.h).

The optimal reduction rules and the backpropagation algorithm have been extracted
into stand-alone functions (see ReductionRules.h), which can be used to build
domain specific PBQP solvers. This provides many more opportunities for
domain-specific knowledge to inform the PBQP solvers' decisions. In theory this
should allow us to generate better solutions. In practice, we can at least test
out ideas now.

As a side benefit, I believe the new solver is more readable than the old one.

2) The solver type is now a template parameter of the PBQP graph.

This allows the graph to notify the solver of any modifications made (e.g. by
domain independent rules) without the overhead of a virtual call. It also allows
the solver to supply policy information to the graph (see below).

3) Significantly reduced memory overhead.

Memory management policy is now an explicit property of the PBQP graph (via
the CostAllocator typedef on the graph's solver template argument). Because PBQP
graphs for register allocation tend to contain many redundant instances of
single values (E.g. the value representing an interference constraint between
GPRs), the new RASolver class uses a uniquing scheme. This massively reduces
memory consumption for large register allocation problems. For example, looking
at the largest interference graph in each of the SPEC2006 benchmarks (the
largest graph will always set the memory consumption high-water mark for PBQP),
the average memory reduction for the PBQP costs was 400x. That's times, not
percent. The highest was 1400x. Yikes. So - this is fixed.

"PBQP: No longer feasting upon every last byte of your RAM".

Minor details:

- Fully C++11'd. Never copy-construct another vector/matrix!

- Cute tricks with cost metadata: Metadata that is derived solely from cost
matrices/vectors is attached directly to the cost instances themselves. That way
if you unique the costs you never have to recompute the metadata. 400x less
memory means 400x less cost metadata (re)computation.

Special thanks to Arnaud de Grandmaison, who has been the source of much
encouragement, and of many very useful test cases.

This new solver forms the basis for future work, of which there's plenty to do.
I will be adding TODO notes shortly.

- Lang.

llvm-svn: 202551
2014-02-28 22:25:24 +00:00
Chandler Carruth 6e390fae4b [docs] Clarify that there isn't much to be done other than watch build
bots when using the standard library facilities. The missing pieces here
aren't always in useful discreet chunks.

Fortunately, the missing pieces are few and far between, and we can
emulate most of them in our headers as needed.

Based on feedback from Lang and Dave.

llvm-svn: 202548
2014-02-28 21:59:51 +00:00
Chandler Carruth f92205336d [C++11] Switch autoconf and make to use C++11 by default. Now both build
systems have the default as C++11, but retain the ability to build with
C++98.

Again, please restrain your enthusiasm a bit in case this needs to be
reverted. =]

llvm-svn: 202546
2014-02-28 21:47:41 +00:00
Eric Christopher e587c0853b Fix >> to be > > for non-c++11.
llvm-svn: 202545
2014-02-28 21:37:28 +00:00
Tom Stellard 9b9e926481 R600: Verify all instructions in the AsmPrinter on debug builds
Make a call to R600's implementation of verifyInstruction() to
check that instructions are only using legal operands.

llvm-svn: 202544
2014-02-28 21:36:41 +00:00
Tom Stellard d61a1c3360 R600/SI: Expand all v16[if]32 operations
llvm-svn: 202543
2014-02-28 21:36:37 +00:00
Chandler Carruth 83163ee127 [C++11] Switch CMake to use C++11 by default! Next up, autoconf/make!
Now, please don't get too excited. I've just toggled the default to suss
out the last remaining bot problems. This does *not* mean we can all go
write lots of C++11 code yet. I at least want to let the dust settle
from the bots first.

llvm-svn: 202542
2014-02-28 21:30:03 +00:00
Eric Christopher 961959faec 80-col.
llvm-svn: 202541
2014-02-28 21:27:59 +00:00
Eric Christopher 2c3a6dce44 Fix a crasher where when we're attempting to replace a type
during the finalization for CGDebugInfo in clang we would RAUW
a type and it would result in a corrupted MDNode for an
imported declaration.

Testcase pending as reducing has been difficult.

llvm-svn: 202540
2014-02-28 21:27:57 +00:00
Richard Smith a98d400fec Add more whitespace to fix more bullets.
llvm-svn: 202538
2014-02-28 21:14:25 +00:00
Richard Smith f30ed8f96c Add whitespace to try to fix bulleted list.
llvm-svn: 202537
2014-02-28 21:11:28 +00:00
Ben Langmuir 3b0a866a4c Fix some links to C++11 feature papers in the Coding Standards
llvm-svn: 202532
2014-02-28 19:37:20 +00:00
Gabor Greif 76f166ee0c add missing 3.4 release
llvm-svn: 202531
2014-02-28 19:20:48 +00:00
Justin Bogner 02b958422c CommandLine: Exit successfully for -version and -help
Tools that use the CommandLine library currently exit with an error
when invoked with -version or -help. This is unusual and non-standard,
so we'll fix them to exit successfully instead.

I don't expect that anyone relies on the current behaviour, so this
should be a fairly safe change.

llvm-svn: 202530
2014-02-28 19:08:01 +00:00
Adam Nemet 6586e5d6ac Test commit
llvm-svn: 202528
2014-02-28 18:44:39 +00:00
Zoran Jovanovic 285cc289e8 Fixed operand of SC microMIPS instruction.
llvm-svn: 202526
2014-02-28 18:22:56 +00:00
Rafael Espindola fd1355aedd Drop libtool from llvm.
We were only using it so find the shared library extension and nm. There are
simpler ways to do those things :-)

llvm-svn: 202524
2014-02-28 18:17:54 +00:00
Zoran Jovanovic 7c6c36d92d Fixed encoding of SYSCALL microMIPS instruction.
llvm-svn: 202523
2014-02-28 18:17:08 +00:00
Zoran Jovanovic d0a289003d Revert revision 202518 because of wrong commit message.
llvm-svn: 202521
2014-02-28 18:14:16 +00:00
Zoran Jovanovic 9874a2b1ef Fix operand of SC instruction.
llvm-svn: 202518
2014-02-28 18:02:17 +00:00
Rafael Espindola 11ac853774 With rpaths being set correctly, SHLIBPATH_VAR is not needed anymore.
llvm-svn: 202510
2014-02-28 16:16:51 +00:00
Rafael Espindola 9e806cf938 Correctly set rpath for unittests.
This lets us run the unittest from the command line without setting
LD_LIBRARY_PATH.

llvm-svn: 202509
2014-02-28 16:11:03 +00:00
Rafael Espindola c80968e954 Centralize the handling of install_name and rpath.
This centralizes the Makefile handling of -install_name and -rpath. It also
moves the cmake build to using @rpath. The reason being that libclang needs it,
and it works for everything else.

A followup patch will move clang to using this and then there will be a single
point to edit to support other systems.

llvm-svn: 202499
2014-02-28 13:48:03 +00:00
Chandler Carruth e8c97895ef [docs] Add a section to the coding standards about languages and such.
A lot of this is writing down common knowledge and things often
communicated on mailing lists and in discussions. It could live in the
Programmer's Manual alternatively, but that felt slightly less
well-fitting.

It also includes (and was motivated by) the section on the relevant
language standards for LLVM and the specific features that will be
enabled with the switch to C++11.

With this, all of the documentation for the C++11 switch is, I think, in
place. I plan to flip the switch RSN. =]

llvm-svn: 202497
2014-02-28 13:35:54 +00:00
Evgeniy Stepanov e3804d4840 X86Operand is extracted into individual header.
X86Operand is extracted into individual header, because it allows to create an
arbitrary memory operand and append it to MCInst. It'll be reused in X86 inline
assembly instrumentation.

Patch by Yuri Gorshenin.

llvm-svn: 202496
2014-02-28 12:28:07 +00:00
Chandler Carruth c8ce0659f2 [docs] A slight tweak to the intro for the golden rule in the coding
standards.

It claims the document intentionally doesn't give fixed standards for
brace placement or spacing, and then the document goes on to do
precisely that in several places. Instead, try to highlight that even
these rules are simply *guidance* which may be trumped by some other
circumstance or the local conventions of code.

I'm not trying to change the thrust of this part of the document, and if
folks think this does so, I'm happy to re-wordsmith it. I just don't
want it to be so self-contradicting.

llvm-svn: 202495
2014-02-28 12:24:18 +00:00
Chandler Carruth 518e58205f [docs] Tweak the example to match what is apparantly the desired form
for the style templates we're using.

llvm-svn: 202494
2014-02-28 12:14:56 +00:00
Chandler Carruth 2423e010fc [docs] Switch to external hyperlink references. Much more readable and
hopefully easier to get the formatting right for ReST.

llvm-svn: 202493
2014-02-28 12:09:14 +00:00
Chandler Carruth d9887739c3 [docs] Fix my links to use the correct ReST syntax.
llvm-svn: 202490
2014-02-28 11:12:14 +00:00
Chandler Carruth e70016954b [docs] Fix 80-column wrap that I messed up.
llvm-svn: 202489
2014-02-28 11:11:41 +00:00
Chandler Carruth b2719d48ab [docs] Tweak discussion of BSDs based on feedback from Roman Divacky.
FreeBSD 10.0 and newer have a modern Clang toolchain that should work
well.

llvm-svn: 202488
2014-02-28 11:09:33 +00:00
Chandler Carruth 0ec4f909fc [docs] Add a big section with details about how to go about acquiring
a more modern host C++ toolchain for Linux distros where folks sometimes
don't have a good option to get one as part of their system.

This is a first cut, so feedback, testing, and suggestions are very,
very welcom. This is one of the last real documentation changes that was
specifically requested prior to switching LLVM and Clang to build in
C++11 mode by default.

llvm-svn: 202486
2014-02-28 10:56:57 +00:00
NAKAMURA Takumi cdb9fafa71 Reorder Mips/MCTargetDesc/CMakeLists.txt.
llvm-svn: 202483
2014-02-28 10:18:21 +00:00
Sasa Stankovic 441880f700 [mips] Add MipsNaClELFStreamer.cpp to CMakeLists.txt.
llvm-svn: 202482
2014-02-28 10:14:12 +00:00
Sasa Stankovic 8c5736b921 [mips] Implement NaCl sandboxing of indirect jumps:
* Align targets of indirect jumps to instruction bundle boundaries (in MI layer).
  * Add masking instructions before indirect jumps (in MC layer).

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

llvm-svn: 202479
2014-02-28 10:00:38 +00:00
Tobias Grosser e8d4c9a2c7 Add 'remark' diagnostic type in LLVM
A 'remark' is information that is not an error or a warning, but rather some
additional information provided to the user. In contrast to a 'note' a 'remark'
is an independent diagnostic, whereas a 'note' always depends on another
diagnostic.

A typical use case for remark nodes is information provided to the user, e.g.
information provided by the vectorizer about loops that have been vectorized.

llvm-svn: 202474
2014-02-28 09:08:45 +00:00
Alexey Samsonov a82e4c8015 Turn static inline functions to inline, following Rafael's suggestion
llvm-svn: 202473
2014-02-28 08:23:09 +00:00
Hal Finkel b998915ee1 Swap PPC isel operands to allow for 0-folding
The PPC isel instruction can fold 0 into the first operand (thus eliminating
the need to materialize a zero-containing register when the 'true' result of
the isel is 0). When the isel is fed by a bit register operation that we can
invert, do so as part of the bit-register-operation peephole routine.

llvm-svn: 202469
2014-02-28 06:11:16 +00:00
Rui Ueyama cf39784b3a llvm-objdump: Fix crash bug with printing unwind info on stripped file.
The current COFF unwind printer tries to print SEH handler function names,
assuming that it can always find function names in string table. It crashes
if file being read has no symbol table (i.e. executable).

With this patch, llvm-objdump prints SEH handler's RVA if there's no symbol
table entry for that RVA.

llvm-svn: 202466
2014-02-28 05:21:29 +00:00
Rui Ueyama 1618fe25d1 Style fix.
llvm-svn: 202465
2014-02-28 05:21:26 +00:00
Rafael Espindola a51f0f8367 Now that it is possible, use the mangler in IRObjectFile.
A really simple patch marks the end of a lot of yak shaving :-)

llvm-svn: 202463
2014-02-28 02:17:23 +00:00
Rui Ueyama 854d6d0a58 Rename coff_pdata_x64 -> coff_runtime_function_x64.
llvm-svn: 202460
2014-02-28 01:18:58 +00:00
Hal Finkel 5cae2168c7 Trying to unbreak the darwin11 builder
The CR bit tracking code broke PPC/Darwin; trying to get it working again...

(the darwin11 builder, which defaults to the darwin ABI when running PPC tests,
asserted when running test/CodeGen/PowerPC/inverted-bool-compares.ll)

llvm-svn: 202459
2014-02-28 01:17:25 +00:00
Hal Finkel b39a0475c0 Try to unbreak the C++11 build
Cannot use negative numbers in case statements without running afoul of -Wc++11-narrowing.

llvm-svn: 202455
2014-02-28 00:45:27 +00:00
NAKAMURA Takumi b47a2c09aa [CMake] llvm_add_library(SHARED|STATIC): Fix broken OUTPUT_NAME for *_static.
llvm-svn: 202454
2014-02-28 00:28:13 +00:00
Hal Finkel 940ab934d4 Add CR-bit tracking to the PowerPC backend for i1 values
This change enables tracking i1 values in the PowerPC backend using the
condition register bits. These bits can be treated on PowerPC as separate
registers; individual bit operations (and, or, xor, etc.) are supported.
Tracking booleans in CR bits has several advantages:

 - Reduction in register pressure (because we no longer need GPRs to store
   boolean values).

 - Logical operations on booleans can be handled more efficiently; we used to
   have to move all results from comparisons into GPRs, perform promoted
   logical operations in GPRs, and then move the result back into condition
   register bits to be used by conditional branches. This can be very
   inefficient, because the throughput of these CR <-> GPR moves have high
   latency and low throughput (especially when other associated instructions
   are accounted for).

 - On the POWER7 and similar cores, we can increase total throughput by using
   the CR bits. CR bit operations have a dedicated functional unit.

Most of this is more-or-less mechanical: Adjustments were needed in the
calling-convention code, support was added for spilling/restoring individual
condition-register bits, and conditional branch instruction definitions taking
specific CR bits were added (plus patterns and code for generating bit-level
operations).

This is enabled by default when running at -O2 and higher. For -O0 and -O1,
where the ability to debug is more important, this feature is disabled by
default. Individual CR bits do not have assigned DWARF register numbers,
and storing values in CR bits makes them invisible to the debugger.

It is critical, however, that we don't move i1 values that have been promoted
to larger values (such as those passed as function arguments) into bit
registers only to quickly turn around and move the values back into GPRs (such
as happens when values are returned by functions). A pair of target-specific
DAG combines are added to remove the trunc/extends in:
  trunc(binary-ops(binary-ops(zext(x), zext(y)), ...)
and:
  zext(binary-ops(binary-ops(trunc(x), trunc(y)), ...)
In short, we only want to use CR bits where some of the i1 values come from
comparisons or are used by conditional branches or selects. To put it another
way, if we can do the entire i1 computation in GPRs, then we probably should
(on the POWER7, the GPR-operation throughput is higher, and for all cores, the
CR <-> GPR moves are expensive).

POWER7 test-suite performance results (from 10 runs in each configuration):

SingleSource/Benchmarks/Misc/mandel-2: 35% speedup
MultiSource/Benchmarks/Prolangs-C++/city/city: 21% speedup
MultiSource/Benchmarks/MiBench/automotive-susan: 23% speedup
SingleSource/Benchmarks/CoyoteBench/huffbench: 13% speedup
SingleSource/Benchmarks/Misc-C++/Large/sphereflake: 13% speedup
SingleSource/Benchmarks/Misc-C++/mandel-text: 10% speedup

SingleSource/Benchmarks/Misc-C++-EH/spirit: 10% slowdown
MultiSource/Applications/lemon/lemon: 8% slowdown

llvm-svn: 202451
2014-02-28 00:27:01 +00:00
Hal Finkel 2756dc17a6 Add an OutPatFrag TableGen class
Unfortunately, it is currently impossible to use a PatFrag as part of an output
pattern (the part of the pattern that has instructions in it) in TableGen.
Looking at the current implementation, this was clearly intended to work (there
is already code in place to expand patterns in the output DAG), but is
currently broken by the baked-in type-checking assumption and the order in which
the pattern fragments are processed (output pattern fragments need to be
processed after the instruction definitions are processed).

Fixing this is fairly simple, but requires some way of differentiating output
patterns from the existing input patterns. The simplest way to handle this
seems to be to create a subclass of PatFrag, and so that's what I've done here.

As a simple example, this allows us to write:

def crnot : OutPatFrag<(ops node:$in),
                       (CRNOR $in, $in)>;

def       : Pat<(not i1:$in),
                (crnot $in)>;

which captures the core use case: handling of repeated subexpressions inside
of complicated output patterns.

This will be used by an upcoming commit to the PowerPC backend.

llvm-svn: 202450
2014-02-28 00:26:56 +00:00
Hal Finkel ab51ecd4fc Fix visitTRUNCATE for legal i1 values
This extract-and-trunc vector optimization cannot work for i1 values as
currently implemented, and so I'm disabling this for now for i1 values. In the
future, this can be fixed properly.

Soon I'll commit support for i1 CR bit tracking in the PowerPC backend, and
this will be covered by one of the existing regression tests.

llvm-svn: 202449
2014-02-28 00:26:45 +00:00
Rui Ueyama eaaf5908d9 Remove unnecessary temporary variable.
llvm-svn: 202445
2014-02-28 00:06:20 +00:00
Rui Ueyama c329937011 Object/COFF: Add a struct for the function table in .pdata.
This is the data structure listed on Microsoft PE/COFF Spec Revision 8.3, p. 80.
The name of the struct is not mentioned in the Microsoft PE/COFF spec, so I made
it up.

llvm-svn: 202438
2014-02-27 22:20:07 +00:00
Andrew Trick b1531e582f Provide a target override for the latest regalloc heuristic.
This is a temporary workaround for native arm linux builds:
PR18996: Changing regalloc order breaks "lencod" on native arm linux builds.

llvm-svn: 202433
2014-02-27 21:37:33 +00:00
Andrew Trick aa895884b2 Drive-by comment fix. This regalloc comment was not accurate.
llvm-svn: 202432
2014-02-27 21:37:30 +00:00
Chandler Carruth 4e764b4cb1 [docs] Stop advertising 'make update'. It isn't implemented in CMake and
seems unlikely to be added. It also doesn't seem like it should be part
of the build system at all (consider out-of-tree builds).

We should probably add nice, easy tool for this that works both for svn
client trees and git-svn client trees, but it probably won't be spelled
"make update".

llvm-svn: 202430
2014-02-27 21:19:42 +00:00
Roman Divacky 7a9c6549ba Lower FNEG just like FABS to fneg[ds] and fmov[ds], thus avoiding
expensive libcall. Also, Qp_neg is not implemented on at least
FreeBSD. This is also what gcc is doing.

llvm-svn: 202422
2014-02-27 19:26:29 +00:00
Matheus Almeida 7fe38e1ade Add getter method to access Reloc::Model.
Some MC components like Target Streamers or Assembly Parsers
may need to access the relocation model in order to expand
some directives and/or assembly macros.

llvm-svn: 202418
2014-02-27 18:39:53 +00:00
Eric Christopher 8bdab43964 Revert r201751 and solve the const problem a different way - by
making the cache mutable.

llvm-svn: 202417
2014-02-27 18:36:10 +00:00
Adrian Prantl 7072073cc9 Debug info: Remove ARMAsmPrinter::EmitDwarfRegOp(). AsmPrinter can now
scan the register file for sub- and super-registers.
No functionality change intended.

(Tests are updated because the comments in the assembler output are
different.)

llvm-svn: 202416
2014-02-27 17:56:08 +00:00
Richard Osborne 521bdf211d [XCore] Support functions returning more than 4 words.
If a function returns a large struct by value return the first 4 words
in registers and the rest on the stack in a location reserved by the
caller. This is needed to support the xC language which supports
functions returning an arbitrary number of return values. This is
r202397 reapplied with a fix to avoid an uninitialized read of a member.

llvm-svn: 202414
2014-02-27 17:47:54 +00:00
Richard Osborne f474087f98 [XCore] Make LowerCallResult a static function.
No functionality change. This is r202396 reapplied with no changes.

llvm-svn: 202413
2014-02-27 17:47:48 +00:00
Rafael Espindola 8837995b52 Remove MCPureStreamer.
We moved MCJIT to use native object formats a long time ago and R600
now uses ELF, so it was dead.

llvm-svn: 202408
2014-02-27 16:17:34 +00:00
Alexander Kornienko 52a07b819e Re-apply r200853, which should not crash after Clang plugins were converted to loadable modules in r201256.
llvm-svn: 202404
2014-02-27 14:47:37 +00:00
Richard Osborne 527aa5052d Revert r202396, r202397.
These are causing test failures, revert for now.

llvm-svn: 202398
2014-02-27 14:24:13 +00:00
Richard Osborne e82bf0988e [XCore] Support functions returning more than 4 words.
Summary:
If a function returns a large struct by value return the first 4 words
in registers and the rest on the stack in a location reserved by the
caller. This is needed to support the xC language which supports
functions returning an arbitrary number of return values.

Reviewers: robertlytton

Reviewed By: robertlytton

CC: llvm-commits

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

llvm-svn: 202397
2014-02-27 14:00:40 +00:00
Richard Osborne ed7e2ad090 [XCore] Make LowerCallResult a static function.
No functionality change.

llvm-svn: 202396
2014-02-27 14:00:34 +00:00
Richard Osborne a283d24ad9 [XCore] Target optimized library function __memcpy_4()
Summary:
If the src, dst and size of a memcpy are known to be 4 byte aligned we
can call __memcpy_4() instead of memcpy().

Reviewers: robertlytton

Reviewed By: robertlytton

CC: llvm-commits

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

llvm-svn: 202395
2014-02-27 13:39:07 +00:00
Richard Osborne d6e85018c5 [XCore] Add dag combines for instructions that ignore some input bits.
These instructions ignore the high bits of one of their input operands -
try and use this to simplify the code.

llvm-svn: 202394
2014-02-27 13:20:11 +00:00
Richard Osborne 2d3a2bee41 [XCore] Provide information about known zero bits of resource instructions.
llvm-svn: 202393
2014-02-27 13:20:06 +00:00
Kostya Serebryany cb3f6e164b [asan] fix a pair of silly typos
llvm-svn: 202391
2014-02-27 13:13:59 +00:00
Kostya Serebryany ec34665de9 [asan] disable asan-detect-invalid-pointer-pair (was enabled by mistake)
llvm-svn: 202390
2014-02-27 12:56:20 +00:00
Kostya Serebryany 796f6557bf [asan] *experimental* implementation of invalid-pointer-pair detector (finds when two unrelated pointers are compared or subtracted). This implementation has both false positives and false negatives and is not tuned for performance. A bug report for a proper implementation will follow.
llvm-svn: 202389
2014-02-27 12:45:36 +00:00
Chandler Carruth 55cc48f403 [docs] Actually spell out the new version requirements for the host C++
toolchain of LLVM. These are already being enforced by the build system
and have been discussed quite a few times on the lists, but
documentation is important. =]

Also, garbage collect the majority of the information about broken host
GCC toolchains. These aren't really relevant any more as they're all
older than the minimum requirement. I've left a few notes about
compilers one step older than the current requirement as these compilers
are at least conceivable to use, and it's better to preserve this kind
of hard-won institutional knowledge.

The next step will be some specific docs on how to set up a sufficiently
modern host toolchain if your system doesn't come with one. But that'll
be tomorrow. =]

llvm-svn: 202375
2014-02-27 10:35:57 +00:00
Chandler Carruth 8356ce4121 [docs] Clean up some of the required software to not mention irrelevant
bits of software and to use a modern GCC version.

The Subversion bit was weird anyways -- it has nothing to do with
compiling LLVM. Also, there are many other ways to get at the trunk
source (git, git-svn, etc).

The TeXinfo thing... I have no idea about. But you can get a working
LLVM w/o it pretty easily. If man pages or something are missing, that
hardly seems like a problem. If folks really want this back, let me
know, but it seems mostly like a distraction.

I'd still like to separate this into:
- Required software to compile.
- Optional software to compile.
- Required software for certain *contributor* activities (like
  regenerating configure scripts).

Also we need to mention that there are multiple options for build
systems, and the differences.

Also we should mention Windows.

Also probably other stuff I'm forgetting.

I'm wondering if this whole thing needs to be shot in the head and we
should just start a new, simpler getting started that doesn't have so
many years of accumulated stuff that is no longer relevant.

llvm-svn: 202373
2014-02-27 09:57:48 +00:00
Chandler Carruth e04872dbc3 [docs] Switch this table to the simple form as well. No content changed.
llvm-svn: 202372
2014-02-27 09:46:09 +00:00
Chandler Carruth 4ef7efe771 [docs] Switch to the incredibly simpler "simple table" form. It now
actually looks like the table on the webpage and is entertainingly
smaller, easier to read, and easier to edit.

llvm-svn: 202371
2014-02-27 09:41:13 +00:00
Chandler Carruth 41e1b91750 [docs] Delete tons of bad information in the requirements section of the
getting started guide.

Some highlights:
- I heard there was this Clang compiler that you could use for your
  host compiler. Not sure though.
- We no longer have a GCC frontend with weird build restrictions.
- Windows is doing a bit better than partially supported.
- We nuked everything to do with itanium.
- SPUs? Really?
- Xcode 2.5 and gcc 4.0.1 are really not a concern -- they don't work.
- OMG, we actually tried building LLVM on Alpha? Really?
- PowerPC works pretty well these days.

There is still a lot of stuff here I'm pretty dubious about, but I nuked
most of what was actively misleading, out of date, or patently wrong.
Some of it (mingw stuff especially) isn't really lacking, its just that
the comments here were actively wrong. Hopefully folks that know those
platforms can add back correct / modern information.

llvm-svn: 202370
2014-02-27 09:33:55 +00:00
Daniel Sanders 9f088ba322 Stop test/CodeGen/X86/v4i32load-crash.ll targeting non-X86-64 targets.
Summary:
Fixes an issue where a test attempts to use -mcpu=x86-64 on non-X86-64 targets.
This triggers an assertion in the MIPS backend since it doesn't know what ABI to
use by default for unrecognized processors.

CC: llvm-commits, rafael

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

llvm-svn: 202369
2014-02-27 09:24:31 +00:00
Alexey Samsonov f431a8386c [CMake] Introduce LLVM_BUILD_EXTERNAL_COMPILER_RT option
llvm-svn: 202363
2014-02-27 08:59:01 +00:00
Eric Christopher a9a1d27677 Don't emit anything into the debug_ranges section if we aren't emitting
any ranges - this includes CU ranges where we were previously emitting an
end list marker even if we didn't have a list.

Testcase includes a test for line table only code emission as the problem
was noticed while writing this test.

llvm-svn: 202357
2014-02-27 07:44:45 +00:00
Mark Seaborn 20f9ddbb6b Exception handling docs: Fix a typo
llvm-svn: 202354
2014-02-27 06:54:04 +00:00
Craig Topper 5346e75966 [X86] Fix Uses/Defs lists for INS, OUTS, SCAS, CMPS, LODS
llvm-svn: 202348
2014-02-27 05:08:25 +00:00
Craig Topper 40dd6211d5 [X86] Add RAX/EAX/AX Uses/Defs to XCHG RAX/EAX/AX instructions.
llvm-svn: 202347
2014-02-27 04:27:00 +00:00
Craig Topper 08301dee46 [X86] Add RAX/EAX/AX/AL Uses/Defs to the absolute memory location move instructions. Patch by Florian Lukas with some additional instructions fixed by me. Fixes PR18975.
llvm-svn: 202345
2014-02-27 04:07:57 +00:00
Craig Topper 8b88da45da Fix indentation.
llvm-svn: 202344
2014-02-27 03:30:36 +00:00
Craig Topper 64d94320f3 Fix odd indentation.
llvm-svn: 202342
2014-02-27 03:11:13 +00:00
Juergen Ributzka 95d11dee8b Revert "Use count 0."
This reverts commit r202283, because when we use GuardMalloc the test will fail
due to additional output to std err.

llvm-svn: 202341
2014-02-27 03:10:10 +00:00
Ben Langmuir 27a58bf770 Revert "Use StringRef in raw_fd_ostream constructor"
This reverts commit r202225, which may cause a performance regression.

llvm-svn: 202338
2014-02-27 02:09:10 +00:00
Michel Danzer 9e61c4b6cd R600/SI: Optimize SI_KILL for constant operands
If the SI_KILL operand is constant, we can either clear the exec mask if
the operand is negative, or do nothing otherwise.

Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
llvm-svn: 202337
2014-02-27 01:47:09 +00:00
Michel Danzer 6f273c57db R600/SI: Allow SI_KILL for geometry shaders
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
llvm-svn: 202336
2014-02-27 01:47:02 +00:00
Eric Christopher 740a833a3b If we're only emitting line tables for a particular CU then don't add
any ranges to the list of ranges for the CU as we don't want to emit
them anyway. This ensures that we will still emit ranges if we have
a compile unit compiled with only line tables and one compiled with
full debug info requested (we'll emit for the one with full debug info).

Update testcase metadata accordingly to continue emitting ranges.

llvm-svn: 202333
2014-02-27 01:25:00 +00:00
Eric Christopher 75d49db19b Add a debug info code generation level to the compile unit metadata
and update everything accordingly. This can be used to conditionalize
the amount of output in the backend based on the amount of debug
requested/metadata emission scheme by a front end (e.g. clang).

Paired with a commit to clang.

llvm-svn: 202332
2014-02-27 01:24:56 +00:00
Eric Christopher f0572c270e Formatting.
llvm-svn: 202323
2014-02-27 00:15:44 +00:00
Eric Christopher bc85ec702d Add an explanatory comment.
llvm-svn: 202321
2014-02-27 00:04:54 +00:00
Eric Christopher 9b1fe94833 Grammar and spelling.
llvm-svn: 202318
2014-02-26 23:54:42 +00:00
Adrian Prantl e31563c4aa Fix a type error that crept into r202313.
llvm-svn: 202317
2014-02-26 23:46:39 +00:00
Eric Christopher a13839f5ca Remove unnecessary llvm:: qualification.
llvm-svn: 202316
2014-02-26 23:27:16 +00:00
Andrew Trick 9f240f742b Use regnum regex in an XCore test case.
llvm-svn: 202315
2014-02-26 23:22:49 +00:00
Adrian Prantl 918b9a77ce Debug info: Refactor AsmPrinter::EmitDwarfRegOp to make the control flow
more obvious.

llvm-svn: 202313
2014-02-26 23:03:37 +00:00
Matt Arsenault 530dde4386 R600: Remove unnecessary build_vector pattern.
It is already fully handled in AMDGPUISelDAGToDAG.

llvm-svn: 202312
2014-02-26 23:00:58 +00:00
Andrew Trick 2560d11e72 Very temporarily XFAILing a test. Will be fixed shortly.
llvm-svn: 202310
2014-02-26 22:39:59 +00:00
Nico Rieck 0a0c674b7a Fix broken FileCheck prefixes
llvm-svn: 202308
2014-02-26 22:29:11 +00:00
Andrew Trick 52a00936b4 Add a limit to the heuristic that register allocates instructions in local order.
This handles pathological cases in which we see 2x increase in spill
code for large blocks (~50k instructions). I don't have a unit test
for this behavior.

Fixes rdar://16072279.

llvm-svn: 202304
2014-02-26 22:07:26 +00:00
Rafael Espindola 2869d85135 Use an install name dir of @executable_path/../lib instead of @rpath.
Using @executable_path/../lib matches what we have on Makefiles and works
with older versions of OS X too.

llvm-svn: 202302
2014-02-26 21:51:28 +00:00
Quentin Colombet 85c9e16291 Lower unsigned vsetcc to psubus in certain cases
The current approach to lower a vsetult is to flip the sign bit of the
operands, swap the operands and then use a (signed) pcmpgt.  psubus (unsigned
saturating subtract) can be used to emulate a vsetult more efficiently:

+    case ISD::SETULT: {
+      // If the comparison is against a constant we can turn this into a
+      // setule.  With psubus, setule does not require a swap.  This is
+      // beneficial because the constant in the register is no longer
+      // destructed as the destination so it can be hoisted out of a loop.

I also enable lowering via psubus in a few other cases where it's clearly
beneficial: setule and setuge if minu/maxu cannot be used.
    
rdar://problem/14338765

Patch by Adam Nemet <anemet@apple.com>.

llvm-svn: 202301
2014-02-26 21:39:12 +00:00
Rafael Espindola b3d4821ae5 Don't mix the plain and keyword signatures of target_link_libraries.
llvm-svn: 202299
2014-02-26 20:39:28 +00:00
Aaron Ballman 3d69c5cae4 Silencing an MSVC signed comparison warning.
llvm-svn: 202295
2014-02-26 20:22:20 +00:00
Hal Finkel 121caf6313 Fix the aggressive anti-dep breaker's subregister definition handling
The aggressive anti-dependency breaker scans instructions, bottom-up, within the
scheduling region in order to find opportunities where register renaming can
be used to break anti-dependencies.

Unfortunately, the aggressive anti-dep breaker was treating a register definition
as defining all of that register's aliases (including super registers). This behavior
is incorrect when the super register is live and there are other definitions of
subregisters of the super register.

For example, given the following sequence:

%CR2EQ<def> = CROR %CR3UN, %CR3UN<kill>
%CR2GT<def> = IMPLICIT_DEF
%X4<def> = MFOCRF8 %CR2

the analysis of the first subregister definition would work as expected:
Anti:   %CR2GT<def> = IMPLICIT_DEF
        Def Groups: CR2GT=g194->g0(via CR2)
        Antidep reg: CR2GT (zero group)
        Use Groups:

but the analysis of the second one would not:
Anti:   %CR2EQ<def> = CROR %CR3UN, %CR3UN<kill>
        Def Groups: CR2EQ=g195
        Antidep reg: CR2EQ
        Rename Candidates for Group g195: ...

because, when processing the %CR2GT<def>, we'd mark all super registers of
%CR2GT (%CR2 in this case) as defined. As a result, when processing
%CR2EQ<def>, %CR2 no longer appears to be live, and %CR2EQ<def>'s group is not
%unioned with the %CR2 group.

I don't have an in-tree test case for this yet (and even if I did, I don't have
a small one).

llvm-svn: 202294
2014-02-26 20:20:30 +00:00
Reid Kleckner 22869378d9 GlobalOpt: Apply fastcc to internal x86_thiscallcc functions
We should apply fastcc whenever profitable.  We can expand this list,
but there are lots of conventions with performance implications that we
don't want to change.

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

llvm-svn: 202293
2014-02-26 19:57:30 +00:00