Commit Graph

110598 Commits

Author SHA1 Message Date
Jingyue Wu
b043278834 [NVPTX] Do not emit .weak symbols for NVPTX
Summary:
".weak" symbols cannot be consumed by ptxas (PR21685). This patch makes the
weak directive in MCAsmPrinter customizable, and disables emitting ".weak"
symbols for NVPTX.

Test Plan: weak-linkage.ll

Reviewers: jholewinski

Reviewed By: jholewinski

Subscribers: majnemer, jholewinski, llvm-commits

Differential Revision: http://reviews.llvm.org/D6455

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223077 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-01 21:16:17 +00:00
Reid Kleckner
03c735b42c Parse 'ghccc' in .ll files as the GHC convention (cc 10)
Previously we just used "cc 10" in the .ll files, but that isn't very
human readable.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223076 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-01 21:04:44 +00:00
Ahmed Bougacha
14fe2e6948 [AArch64] Don't combine "select (setcc i1 LHS, RHS), vL, vR".
r208210 introduced an optimization that improves the vector select
codegen by doing the setcc on vectors directly.
This is a problem they the setcc operands are i1s, because the
optimization would create vectors of i1, which aren't legal.

Part of PR21549.

Differential Revision: http://reviews.llvm.org/D6308


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223075 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-01 20:59:00 +00:00
Ahmed Bougacha
217a4a87ce [AArch64] Fix v2i8->i16 bitcast legalization.
r213378 improved f16 bitcasts, so that they go directly through subregs,
instead of through the stack.  That code now causes an assertion failure
for bitcasts from other 16-bits types (most importantly v2i8).

Correct that by doing the custom lowering for i16 bitcasts only when the
input is an f16.

Part of PR21549.

Differential Revision: http://reviews.llvm.org/D6307


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223074 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-01 20:52:32 +00:00
Peter Zotov
787a41926a [OCaml] Move Llvm.clone_module to its own Llvm_transform_utils module.
This way most code won't link this (substantially large) library,
if compiled statically with LLVM.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223072 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-01 19:50:39 +00:00
Peter Zotov
a0a26f222b [OCaml] [cmake] Add CMake buildsystem for OCaml.
Closes PR15325.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223071 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-01 19:50:23 +00:00
Rafael Espindola
f97b79e09e Use a continue to reduce indentation and clang-format. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223067 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-01 19:17:46 +00:00
Rafael Espindola
6eee2bbbbb Use a range loop. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223066 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-01 19:08:07 +00:00
Pete Cooper
fcf3609fd7 Use C++ typed enums instead of 'unsigned char' for MCInst Kind. NFC.
This makes it much easier to see the value of operands in the debugger.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223060 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-01 18:46:43 +00:00
Ahmed Bougacha
eb1f2e8eb0 [MachineVerifier] Accept a MBB with a single landing pad successor.
The MachineVerifier used to check that there was always exactly one
unconditional branch to a non-landingpad (normal) successor.
If that normal successor to an invoke BB is unreachable, it seems
reasonable to only have one successor, the landing pad.
On targets other than AArch64 (and on AArch64 with a different testcase),
the branch folder turns the branch to the landing pad into a fallthrough.
The MachineVerifier, which relies on AnalyzeBranch, is unable to check
the condition, and doesn't complain. However, it does in this specific
testcase, where the branch to the landing pad remained.
Make the MachineVerifier accept it.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223059 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-01 18:43:53 +00:00
Rafael Espindola
e8f8c64e35 Drop SrcStructTypesSet. It is redundant.
At the only point in the code it is used, we haven't added any of the src types
to DstStructTypesSet yet.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223057 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-01 18:42:18 +00:00
Tim Northover
f7f88095a3 ARM: lower tail calls correctly when using GHC calling convention.
Patch by Ben Gamari.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223055 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-01 17:46:39 +00:00
Hans Wennborg
c9605b6067 Revert r223049, r223050 and r223051 while investigating test failures.
I didn't foresee affecting the Clang test suite :/

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223054 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-01 17:36:43 +00:00
Hans Wennborg
07c6024f48 SimplifyCFG: Omit range checks for switch lookup tables when default is unreachable
They would get optimized away later, but we might as well not emit them.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223051 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-01 17:08:38 +00:00
Hans Wennborg
b2fd944378 SimplifyCFG: don't remove unreachable default switch destinations
An unreachable default destination can be exploited by other optimizations, and
SDag lowering is now prepared to handle them efficiently.

For example, branches to the unreachable destination will be optimized away,
such as in the case of range checks for switch lookup tables.

On 64-bit Linux, this reduces the size of a clang bootstrap by 80 kB (and
Chromium by 30 kB).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223050 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-01 17:08:35 +00:00
Hans Wennborg
e6f4d335d7 SelectionDAG switch lowering: Replace unreachable default with most popular case.
This can significantly reduce the size of the switch, allowing for more
efficient lowering.

I also worked with the idea of exploiting unreachable defaults by
omitting the range check for jump tables, but always ended up with a
non-neglible binary size increase. It might be worth looking into some more.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223049 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-01 17:08:32 +00:00
Rafael Espindola
d9788e9372 Partial revert of r222986.
The explicit set of destination types is not fully redundant when lazy loading
since the TypeFinder will not find types used only in function bodies.

This keeps the logic to drop the name of mapped types since it still helps
with avoiding further renaming.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223043 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-01 16:32:20 +00:00
Matt Arsenault
0b2f9a266d R600/SI: Various instruction format bit test cleanups
- Fix missing SALU format bits
- Remove unused isSALUInstr
- Add isVALU
- Switch isDS to use a bit like the others
- Move SIInstrInfo::is* functions to header
- Reorder so they are approximately sorted by type (SALU, VALU, memory)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223038 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-01 15:52:46 +00:00
Vladimir Medic
462763dc0b The andi16, addiusp and jraddiusp micromips instructions were missing dedicated decoder methods in MipsDisassembler.cpp to properly decode immediate operands. These methods are added together with corresponding tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223006 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-01 11:12:04 +00:00
Evgeniy Stepanov
f1b5d9ae6e [msan] Add compile-time checks for missing origins.
This change makes MemorySanitizer instrumentation a bit more strict
about instructions that have no origin id assigned to them.

This would have caught the bug that was fixed in r222918.

No functional change.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222997 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-01 09:53:51 +00:00
Jay Foad
8b9cea42db [PowerPC] Fix unwind info with dynamic stack realignment
Summary:
PowerPC DWARF unwind info defined CFA as SP + offset even in a function
where the stack had been dynamically realigned. This clearly doesn't
work because the offset from SP to CFA is not a constant. Fix it by
defining CFA as BP instead.

This was causing the AddressSanitizer null_deref test to fail 50% of
the time, depending on whether SP happened to be 32-byte aligned on
entry to a particular function or not.

Reviewers: willschm, uweigand, hfinkel

Reviewed By: hfinkel

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D6410

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222996 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-01 09:42:32 +00:00
Sonam Kumari
5e6e75a48e Removed extra whitespace. (Testing commit access). NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222994 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-01 09:27:46 +00:00
Charlie Turner
94df8b11bc Add post-decode checking of HVC instruction.
Add checkDecodedInstruction for post-decode checking of instructions, to catch
the corner cases like HVC that don't fit into the general pattern. Needed to
check for an invalid condition field in instruction encoding despite HVC not
taking a predicate.

Patch by Matthew Wahab.

Change-Id: I48e28de981d7a9e43569594da3c45fb478b4f795

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222992 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-01 08:50:27 +00:00
Yury Gribov
434494196b [asan] Change dynamic alloca instrumentation to only consider allocas that are dominating all exits from function.
Reviewed in http://reviews.llvm.org/D6412


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222991 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-01 08:47:58 +00:00
Charlie Turner
eed2e8bf98 Add Thumb HVC and ERET virtualisation extension instructions.
Patch by Matthew Wahab.

Change-Id: I131f71c1150d5fa797066a18e09d526c19bf9016

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222990 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-01 08:39:19 +00:00
Charlie Turner
42563acbd4 Add ARM ERET and HVC virtualisation extension instructions.
Patch by Matthew Wahab.

Change-Id: Iad75f078fbaa4ecc7d7a4820ad9b3930679cbbbb

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222989 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-01 08:33:28 +00:00
Akira Hatanaka
92cc5cf7a8 Fix capitalization. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222988 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-01 06:14:52 +00:00
Akira Hatanaka
ca780b4578 [stack protector] Set edge weights for newly created basic blocks.
This commit fixes a bug in stack protector pass where edge weights were not set
when new basic blocks were added to lists of successor basic blocks.

Differential Revision: http://reviews.llvm.org/D5766


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222987 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-01 04:27:03 +00:00
Rafael Espindola
7a551b7c6d Change how we keep track of which types are in the dest module.
Instead of keeping an explicit set, just drop the names of types we choose
to map to some other type.

This has the advantage that the name of the unused will not cause the context
to rename types on module read.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222986 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-01 04:15:59 +00:00
Rafael Espindola
805b8166cf Add a test showing what the linker IdentifiedStructTypes is for.
Without this it could just be deleted and all tests would pass.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222985 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-01 03:20:57 +00:00
Rafael Espindola
6c8ce66b03 Relax an assert a bit to avoid a crash on unreachable code.
Patch by Duncan Exon Smith with a small tweak by me.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222984 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-01 02:55:24 +00:00
Hal Finkel
186abcb853 [PowerPC] Add asm support for cache-inhibited ld/st instructions
Add assembler support for the fixed-point cache-inhibited load/store
instructions. These are hypervisor-level only, so don't get too excited ;)

Fixes PR21650.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222976 91177308-0d34-0410-b5e6-96231b3b80d8
2014-11-30 10:15:56 +00:00
Craig Topper
73642a847d Revert r222957 "Replace std::map<K, V*> with std::map<K, V> to handle ownership and deletion of the values."
Upon further review I think the MultiClass is being copied into the map instead of being moved due to the copy constructor on the nested Record type. This ultimately got exposed when the vector in DefPrototype vector was changed to hold unique_ptrs in another commit. This caused gcc 4.7 to fail due to the use of the copy constructor on unique_ptr with the error pointing back to one of the insert calls from this commit. Not sure why clang was able to build.

This reverts commit 710cdf729f.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222971 91177308-0d34-0410-b5e6-96231b3b80d8
2014-11-30 01:20:17 +00:00
Hans Wennborg
066fdfa0dd Revert r222965 "Make MultiClass::DefPrototypes own their Records to fix memory leaks."
The bots started failing with the error below. I suspect this revision was the cause.

FAILED: /home/bb/bin/g++47   -DGTEST_HAS_RTTI=0 -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -fPIC -fvisibility-inlines-hidden -Wall -W -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wno-maybe-uninitialized -Wno-comment -std=c++11 -ffunction-sections -fdata-sections -O3 -DNDEBUG -Ilib/TableGen -I/home/bb/cmake-llvm-x86_64-linux/llvm-project/llvm/lib/TableGen -Iinclude -I/home/bb/cmake-llvm-x86_64-linux/llvm-project/llvm/include    -fno-exceptions -fno-rtti -MMD -MT lib/TableGen/CMakeFiles/LLVMTableGen.dir/TGParser.cpp.o -MF "lib/TableGen/CMakeFiles/LLVMTableGen.dir/TGParser.cpp.o.d" -o lib/TableGen/CMakeFiles/LLVMTableGen.dir/TGParser.cpp.o -c /home/bb/cmake-llvm-x86_64-linux/llvm-project/llvm/lib/TableGen/TGParser.cpp
In file included from /usr/lib/gcc/x86_64-redhat-linux/4.7.2/../../../../include/c++/4.7.2/bits/stl_tempbuf.h:62:0,
                 from /usr/lib/gcc/x86_64-redhat-linux/4.7.2/../../../../include/c++/4.7.2/bits/stl_algo.h:64,
                 from /usr/lib/gcc/x86_64-redhat-linux/4.7.2/../../../../include/c++/4.7.2/algorithm:63,
                 from /home/bb/cmake-llvm-x86_64-linux/llvm-project/llvm/include/llvm/ADT/StringRef.h:13,
                 from /home/bb/cmake-llvm-x86_64-linux/llvm-project/llvm/lib/TableGen/TGLexer.h:17,
                 from /home/bb/cmake-llvm-x86_64-linux/llvm-project/llvm/lib/TableGen/TGParser.h:17,
                 from /home/bb/cmake-llvm-x86_64-linux/llvm-project/llvm/lib/TableGen/TGParser.cpp:14:
/usr/lib/gcc/x86_64-redhat-linux/4.7.2/../../../../include/c++/4.7.2/bits/stl_construct.h: In instantiation of 'void std::_Construct(_T1*, _Args&& ...) [with _T1 = std::unique_ptr<llvm::Record>; _Args = {const std::unique_ptr<llvm::Record, std::default_delete<llvm::Record> >&}]':
/usr/lib/gcc/x86_64-redhat-linux/4.7.2/../../../../include/c++/4.7.2/bits/stl_uninitialized.h:77:3:   required from 'static _ForwardIterator std::__uninitialized_copy<_TrivialValueTypes>::__uninit_copy(_InputIterator, _InputIterator, _ForwardIterator) [with _InputIterator = __gnu_cxx::__normal_iterator<const std::unique_ptr<llvm::Record>*, std::vector<std::unique_ptr<llvm::Record> > >; _ForwardIterator = std::unique_ptr<llvm::Record>*; bool _TrivialValueTypes = false]'
/usr/lib/gcc/x86_64-redhat-linux/4.7.2/../../../../include/c++/4.7.2/bits/stl_uninitialized.h:119:41:   required from '_ForwardIterator std::uninitialized_copy(_InputIterator, _InputIterator, _ForwardIterator) [with _InputIterator = __gnu_cxx::__normal_iterator<const std::unique_ptr<llvm::Record>*, std::vector<std::unique_ptr<llvm::Record> > >; _ForwardIterator = std::unique_ptr<llvm::Record>*]'
/usr/lib/gcc/x86_64-redhat-linux/4.7.2/../../../../include/c++/4.7.2/bits/stl_uninitialized.h:260:63:   required from '_ForwardIterator std::__uninitialized_copy_a(_InputIterator, _InputIterator, _ForwardIterator, std::allocator<_Tp>&) [with _InputIterator = __gnu_cxx::__normal_iterator<const std::unique_ptr<llvm::Record>*, std::vector<std::unique_ptr<llvm::Record> > >; _ForwardIterator = std::unique_ptr<llvm::Record>*; _Tp = std::unique_ptr<llvm::Record>]'
/usr/lib/gcc/x86_64-redhat-linux/4.7.2/../../../../include/c++/4.7.2/bits/stl_vector.h:310:9:   required from 'std::vector<_Tp, _Alloc>::vector(const std::vector<_Tp, _Alloc>&) [with _Tp = std::unique_ptr<llvm::Record>; _Alloc = std::allocator<std::unique_ptr<llvm::Record> >]'
/home/bb/cmake-llvm-x86_64-linux/llvm-project/llvm/include/llvm/TableGen/Record.h:1664:8:   required from 'constexpr std::pair<_T1, _T2>::pair(_U1&&, _U2&&) [with _U1 = std::basic_string<char>&; _U2 = llvm::MultiClass; <template-parameter-2-3> = void; _T1 = std::basic_string<char>; _T2 = llvm::MultiClass]'
/usr/lib/gcc/x86_64-redhat-linux/4.7.2/../../../../include/c++/4.7.2/bits/stl_pair.h:273:72:   required from 'constexpr std::pair<typename std::__decay_and_strip<_T1>::__type, typename std::__decay_and_strip<_T2>::__type> std::make_pair(_T1&&, _T2&&) [with _T1 = std::basic_string<char>&; _T2 = llvm::MultiClass; typename std::__decay_and_strip<_T2>::__type = llvm::MultiClass; typename std::__decay_and_strip<_T1>::__type = std::basic_string<char>]'
/home/bb/cmake-llvm-x86_64-linux/llvm-project/llvm/lib/TableGen/TGParser.cpp:2295:78:   required from here
/usr/lib/gcc/x86_64-redhat-linux/4.7.2/../../../../include/c++/4.7.2/bits/stl_construct.h:77:7: error: use of deleted function 'std::unique_ptr<_Tp, _Dp>::unique_ptr(const std::unique_ptr<_Tp, _Dp>&) [with _Tp = llvm::Record; _Dp = std::default_delete<llvm::Record>]'
In file included from /usr/lib/gcc/x86_64-redhat-linux/4.7.2/../../../../include/c++/4.7.2/memory:86:0,
                 from /home/bb/cmake-llvm-x86_64-linux/llvm-project/llvm/include/llvm/ADT/STLExtras.h:25,
                 from /home/bb/cmake-llvm-x86_64-linux/llvm-project/llvm/include/llvm/ADT/ArrayRef.h:14,
                 from /home/bb/cmake-llvm-x86_64-linux/llvm-project/llvm/include/llvm/Support/SourceMgr.h:19,
                 from /home/bb/cmake-llvm-x86_64-linux/llvm-project/llvm/lib/TableGen/TGParser.h:19,
                 from /home/bb/cmake-llvm-x86_64-linux/llvm-project/llvm/lib/TableGen/TGParser.cpp:14:
/usr/lib/gcc/x86_64-redhat-linux/4.7.2/../../../../include/c++/4.7.2/bits/unique_ptr.h:262:7: error: declared here
ninja: build stopped: subcommand failed.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222970 91177308-0d34-0410-b5e6-96231b3b80d8
2014-11-30 00:43:50 +00:00
Hans Wennborg
e1e5343d13 Qualify one more make_unique call.
The previous patch had effect, but missed this one. It seems MSVC
gets ADL-confused by the calls where the first argument is a function call?

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222968 91177308-0d34-0410-b5e6-96231b3b80d8
2014-11-30 00:31:49 +00:00
Hans Wennborg
45f731aead Speculatively qualify some llvm::make_unique calls trying to please MSVC
It was failing with this kind of error:

C:\b\build\slave\CrWinClang\build\src\third_party\llvm\lib\TableGen\TGParser.cpp(1243) : error C2668: 'llvm::make_unique' : ambiguous call to overloaded function

        C:\b\build\slave\CrWinClang\build\src\third_party\llvm\include\llvm/ADT/STLExtras.h(408): could be 'std::unique_ptr<llvm::Record,std::default_delete<_Ty>> llvm::make_unique<llvm::Record,std::string,llvm::SMLoc&,llvm::RecordKeeper&,bool>(std::string &&,llvm::SMLoc &,llvm::RecordKeeper &,bool &&)'
        with
        [
            _Ty=llvm::Record
        ]
        C:\b\depot_tools\win_toolchain\vs2013_files\win8sdk\bin\..\..\VC\include\memory(1637): or       'std::unique_ptr<llvm::Record,std::default_delete<_Ty>> std::make_unique<llvm::Record,std::string,llvm::SMLoc&,llvm::RecordKeeper&,bool>(std::string &&,llvm::SMLoc &,llvm::RecordKeeper &,bool &&)' [found using argument-dependent lookup]
        with
        [
            _Ty=llvm::Record
        ]
        while trying to match the argument list '(std::string, llvm::SMLoc, llvm::RecordKeeper, bool)'

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222967 91177308-0d34-0410-b5e6-96231b3b80d8
2014-11-30 00:24:43 +00:00
Craig Topper
d45efb5467 Use an unsigned type because there seems to be no reason for it to be signed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222966 91177308-0d34-0410-b5e6-96231b3b80d8
2014-11-30 00:24:32 +00:00
Craig Topper
a1fa859a92 Make MultiClass::DefPrototypes own their Records to fix memory leaks.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222965 91177308-0d34-0410-b5e6-96231b3b80d8
2014-11-30 00:19:28 +00:00
Hans Wennborg
809b955259 Switch lowering: reformat some for loops etc. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222962 91177308-0d34-0410-b5e6-96231b3b80d8
2014-11-29 21:24:12 +00:00
Hans Wennborg
5c6c5e23bd Switch lowering: Fix broken 'Figure out which block is next' code
This doesn't seem to have worked in a long time, but other optimizations
would clean it up.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222961 91177308-0d34-0410-b5e6-96231b3b80d8
2014-11-29 21:17:05 +00:00
Simon Pilgrim
1c86b63b9b Target triple OS detection tidyup. NFC
Use Triple::isOS*() helpers where possible.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222960 91177308-0d34-0410-b5e6-96231b3b80d8
2014-11-29 19:18:21 +00:00
David Blaikie
9611a1f8eb Remove some unnecessary vector::reserve/assign calls.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222959 91177308-0d34-0410-b5e6-96231b3b80d8
2014-11-29 18:13:42 +00:00
David Blaikie
e722713c0a Remove indirection of vector<T*> in favor of deque<T>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222958 91177308-0d34-0410-b5e6-96231b3b80d8
2014-11-29 18:13:39 +00:00
Craig Topper
710cdf729f Replace std::map<K, V*> with std::map<K, V> to handle ownership and deletion of the values.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222957 91177308-0d34-0410-b5e6-96231b3b80d8
2014-11-29 18:12:59 +00:00
Craig Topper
355d06974a Remove 'else' after 'return'. Fix formatting of a 'switch' statement.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222955 91177308-0d34-0410-b5e6-96231b3b80d8
2014-11-29 16:05:27 +00:00
Jozef Kolek
b087448a5f [mips][microMIPS] Implement NOP aliases
This patch implements microMIPS 16-bit (MOVE16 $0, $0) and
32-bit (SLL $0, $0, 0) NOP aliases.

http://reviews.llvm.org/D6440


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222953 91177308-0d34-0410-b5e6-96231b3b80d8
2014-11-29 13:29:24 +00:00
David Blaikie
c7d3454376 Use deque<T> rather than vector<T*> since it provides the same invalidation semantics (at least when removal is not needed) without the extra indirection/ownership complexity
Order matters for this container, it seems (using a forward_list and
replacing the original push_backs with emplace_fronts caused test
failures). I didn't look too deeply into why.

(& in retrospect, I might go back & change some of the forward_lists I
introduced to deques anyway - since most don't require removal, deque is
a more memory-friendly data structure (moderate locality while not
invalidating pointers))

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222950 91177308-0d34-0410-b5e6-96231b3b80d8
2014-11-29 07:04:51 +00:00
David Blaikie
71f69c81db Constify some things in preparation for CodeGenSubRegIndex to be stored by value in their container, removing the indirection
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222949 91177308-0d34-0410-b5e6-96231b3b80d8
2014-11-29 07:04:49 +00:00
Craig Topper
2935bbc520 Make RecordKeeper::addClass/addDef take unique_ptrs instead of creating one internally.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222948 91177308-0d34-0410-b5e6-96231b3b80d8
2014-11-29 05:52:51 +00:00
Craig Topper
2d370703cd Use unique_ptr to remove some explicit deletes on some error case returns. At least one spot of weird ownership passing that needs some future cleanup.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222947 91177308-0d34-0410-b5e6-96231b3b80d8
2014-11-29 05:31:10 +00:00