Ahmed Bougacha [Mon, 1 Dec 2014 20:59:00 +0000 (20:59 +0000)]
[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
Ahmed Bougacha [Mon, 1 Dec 2014 20:52:32 +0000 (20:52 +0000)]
[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
Peter Zotov [Mon, 1 Dec 2014 19:50:39 +0000 (19:50 +0000)]
[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
Peter Zotov [Mon, 1 Dec 2014 19:50:23 +0000 (19:50 +0000)]
[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
Rafael Espindola [Mon, 1 Dec 2014 19:17:46 +0000 (19:17 +0000)]
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
Rafael Espindola [Mon, 1 Dec 2014 19:08:07 +0000 (19:08 +0000)]
Use a range loop. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223066
91177308-0d34-0410-b5e6-
96231b3b80d8
Pete Cooper [Mon, 1 Dec 2014 18:46:43 +0000 (18:46 +0000)]
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
Ahmed Bougacha [Mon, 1 Dec 2014 18:43:53 +0000 (18:43 +0000)]
[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
Rafael Espindola [Mon, 1 Dec 2014 18:42:18 +0000 (18:42 +0000)]
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
Tim Northover [Mon, 1 Dec 2014 17:46:39 +0000 (17:46 +0000)]
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
Hans Wennborg [Mon, 1 Dec 2014 17:36:43 +0000 (17:36 +0000)]
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
Hans Wennborg [Mon, 1 Dec 2014 17:08:38 +0000 (17:08 +0000)]
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
Hans Wennborg [Mon, 1 Dec 2014 17:08:35 +0000 (17:08 +0000)]
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
Hans Wennborg [Mon, 1 Dec 2014 17:08:32 +0000 (17:08 +0000)]
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
Rafael Espindola [Mon, 1 Dec 2014 16:32:20 +0000 (16:32 +0000)]
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
Matt Arsenault [Mon, 1 Dec 2014 15:52:46 +0000 (15:52 +0000)]
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
Vladimir Medic [Mon, 1 Dec 2014 11:12:04 +0000 (11:12 +0000)]
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
Evgeniy Stepanov [Mon, 1 Dec 2014 09:53:51 +0000 (09:53 +0000)]
[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
Jay Foad [Mon, 1 Dec 2014 09:42:32 +0000 (09:42 +0000)]
[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
Sonam Kumari [Mon, 1 Dec 2014 09:27:46 +0000 (09:27 +0000)]
Removed extra whitespace. (Testing commit access). NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222994
91177308-0d34-0410-b5e6-
96231b3b80d8
Charlie Turner [Mon, 1 Dec 2014 08:50:27 +0000 (08:50 +0000)]
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
Yury Gribov [Mon, 1 Dec 2014 08:47:58 +0000 (08:47 +0000)]
[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
Charlie Turner [Mon, 1 Dec 2014 08:39:19 +0000 (08:39 +0000)]
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
Charlie Turner [Mon, 1 Dec 2014 08:33:28 +0000 (08:33 +0000)]
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
Akira Hatanaka [Mon, 1 Dec 2014 06:14:52 +0000 (06:14 +0000)]
Fix capitalization. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222988
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Mon, 1 Dec 2014 04:27:03 +0000 (04:27 +0000)]
[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
Rafael Espindola [Mon, 1 Dec 2014 04:15:59 +0000 (04:15 +0000)]
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
Rafael Espindola [Mon, 1 Dec 2014 03:20:57 +0000 (03:20 +0000)]
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
Rafael Espindola [Mon, 1 Dec 2014 02:55:24 +0000 (02:55 +0000)]
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
Hal Finkel [Sun, 30 Nov 2014 10:15:56 +0000 (10:15 +0000)]
[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
Craig Topper [Sun, 30 Nov 2014 01:20:17 +0000 (01:20 +0000)]
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
710cdf729f84b428bf41aa8d32dbdb35fff79fde.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222971
91177308-0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Sun, 30 Nov 2014 00:43:50 +0000 (00:43 +0000)]
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
Hans Wennborg [Sun, 30 Nov 2014 00:31:49 +0000 (00:31 +0000)]
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
Hans Wennborg [Sun, 30 Nov 2014 00:24:43 +0000 (00:24 +0000)]
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
Craig Topper [Sun, 30 Nov 2014 00:24:32 +0000 (00:24 +0000)]
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
Craig Topper [Sun, 30 Nov 2014 00:19:28 +0000 (00:19 +0000)]
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
Hans Wennborg [Sat, 29 Nov 2014 21:24:12 +0000 (21:24 +0000)]
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
Hans Wennborg [Sat, 29 Nov 2014 21:17:05 +0000 (21:17 +0000)]
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
Simon Pilgrim [Sat, 29 Nov 2014 19:18:21 +0000 (19:18 +0000)]
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
David Blaikie [Sat, 29 Nov 2014 18:13:42 +0000 (18:13 +0000)]
Remove some unnecessary vector::reserve/assign calls.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222959
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Sat, 29 Nov 2014 18:13:39 +0000 (18:13 +0000)]
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
Craig Topper [Sat, 29 Nov 2014 18:12:59 +0000 (18:12 +0000)]
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
Craig Topper [Sat, 29 Nov 2014 16:05:27 +0000 (16:05 +0000)]
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
Jozef Kolek [Sat, 29 Nov 2014 13:29:24 +0000 (13:29 +0000)]
[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
David Blaikie [Sat, 29 Nov 2014 07:04:51 +0000 (07:04 +0000)]
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
David Blaikie [Sat, 29 Nov 2014 07:04:49 +0000 (07:04 +0000)]
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
Craig Topper [Sat, 29 Nov 2014 05:52:51 +0000 (05:52 +0000)]
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
Craig Topper [Sat, 29 Nov 2014 05:31:10 +0000 (05:31 +0000)]
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
Duncan P. N. Exon Smith [Sat, 29 Nov 2014 03:17:43 +0000 (03:17 +0000)]
DebugIR: Remove empty directories from SVN
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222946
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Sat, 29 Nov 2014 03:15:47 +0000 (03:15 +0000)]
DebugIR: Delete -debug-ir
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222945
91177308-0d34-0410-b5e6-
96231b3b80d8
Saleem Abdulrasool [Sat, 29 Nov 2014 00:10:26 +0000 (00:10 +0000)]
Support: remove some variable names
If built with -Wunused-variable, clang objects to the declarations due to the
unused variable; drop the names. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222944
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Fri, 28 Nov 2014 23:00:22 +0000 (23:00 +0000)]
Revert "Simplify some more ownership using forward_list<T> rather than vector<unique_ptr<T>>"
This reverts commit r222935 and its follow-up r222938 ("Push unique_ptr
a bit further through some APIs and simplify some cleanup"), since it
causes bot failures (at least on Darwin):
http://lab.llvm.org:8080/green/job/clang-stage1-cmake-RA-incremental/1391/
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222943
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Fri, 28 Nov 2014 22:51:38 +0000 (22:51 +0000)]
R600/SI: Fix assertion on sign extend of 3 vectors
This was trying to create an MVT with 3x vectors which
created an invalid EVT
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222942
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Fri, 28 Nov 2014 22:15:06 +0000 (22:15 +0000)]
Reapply "Use std::map<K, V> rather than std::map<K, std::unique_ptr<V>>""
Just avoid using std::map::emplace since it's not implemented in
libstdc++ 4.7.
Reapplies r222937, reverted in r222939.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222940
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Fri, 28 Nov 2014 22:01:06 +0000 (22:01 +0000)]
Revert "Use std::map<K, V> rather than std::map<K, std::unique_ptr<V>>"
Seems libstdc++ on some buildbots is lacking std::map::emplace, which is
weird... reverting while I look into it.
This reverts commit r222937.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222939
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Fri, 28 Nov 2014 21:59:58 +0000 (21:59 +0000)]
Push unique_ptr a bit further through some APIs and simplify some cleanup
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222938
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Fri, 28 Nov 2014 21:37:54 +0000 (21:37 +0000)]
Use std::map<K, V> rather than std::map<K, std::unique_ptr<V>>
Pointers and references to map elements are never invalidated (except on
removal, which isn't used here) so there's no need for the indirection
unless there's polymorphism at work.
A little const correctness had to be fixed, since the indirection
allowed some benign const violations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222937
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Fri, 28 Nov 2014 21:29:14 +0000 (21:29 +0000)]
Revert "Masked Vector Load and Store Intrinsics."
This reverts commit r222632 (and follow-up r222636), which caused a host
of LNT failures on an internal bot. I'll respond to the commit on the
list with a reproduction of one of the failures.
Conflicts:
lib/Target/X86/X86TargetTransformInfo.cpp
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222936
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Fri, 28 Nov 2014 21:20:24 +0000 (21:20 +0000)]
Simplify some more ownership using forward_list<T> rather than vector<unique_ptr<T>>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222935
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Fri, 28 Nov 2014 21:20:22 +0000 (21:20 +0000)]
Forgotten formatting from previous commit
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222934
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Fri, 28 Nov 2014 20:35:57 +0000 (20:35 +0000)]
Simplify ownership by using forward_list<T> rather than vector<unique_ptr<T>>
Since the elements were not polymorphic, the unique_ptr was only used to
avoid pointer invalidation on container resizes - might as well skip the
indirection and use a container with suitable invalidation semantics.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222931
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Fri, 28 Nov 2014 20:30:39 +0000 (20:30 +0000)]
Fix a few memory leaks in CodeGenRegBank.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222930
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Fri, 28 Nov 2014 20:30:37 +0000 (20:30 +0000)]
Use unique_ptr to simplify deletion.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222929
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Fri, 28 Nov 2014 19:58:29 +0000 (19:58 +0000)]
InstCombine: FoldOrOfICmps harder
We may be in a situation where the icmps might not be near each other in
a tree of or instructions. Try to dig out related compare instructions
and see if they combine.
N.B. This won't fire on deep trees of compares because rewritting the
tree might end up creating a net increase of IR. We may have to resort
to something more sophisticated if this is a real problem.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222928
91177308-0d34-0410-b5e6-
96231b3b80d8
Bruno Cardoso Lopes [Fri, 28 Nov 2014 19:47:46 +0000 (19:47 +0000)]
[LICM] Store sink and indirectbr instructions
Loop simplify skips exit-block insertion when exits contain indirectbr
instructions. This leads to an assertion in LICM when trying to sink
stores out of non-dedicated loop exits containing indirectbr
instructions. This patch fix this issue by re-checking for dedicated
exits in LICM prior to store sink attempts.
Differential Revision: http://reviews.llvm.org/D6414
rdar://problem/
18943047
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222927
91177308-0d34-0410-b5e6-
96231b3b80d8
Bruno Cardoso Lopes [Fri, 28 Nov 2014 19:47:33 +0000 (19:47 +0000)]
[SwitchLowering] Handle multiple destinations on condensed case stmts
Switch cases statements with sequential values that branch to the same
destination BB may often be handled together in a single new source BB.
In this scenario we need to remove remaining incoming values from PHI
instructions in the destination BB, as to match the number of source
branches.
Differential Revision: http://reviews.llvm.org/D6415
rdar://problem/
19040894
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222926
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Fri, 28 Nov 2014 18:40:18 +0000 (18:40 +0000)]
Enable FeatureFastUAMem for btver2
Allow unaligned 16-byte memop codegen for btver2. No functional changes for any other subtargets.
Replace the existing supposed small memcpy test with an actual test of a small memcpy.
The previous test wasn't using FileCheck either.
This patch should allow us to close PR21541 ( http://llvm.org/bugs/show_bug.cgi?id=21541 ).
Differential Revision: http://reviews.llvm.org/D6360
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222925
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 28 Nov 2014 16:41:24 +0000 (16:41 +0000)]
Add back r222727 with a fix.
The original patch would fail when:
* A dst opaque type (%A) is matched with a src type (%A).
* A src opaque (%E) type is then speculatively matched with %A and the
speculation fails afterward.
* When rolling back the speculation we would cancel the source %A to dest
%A mapping.
The fix is to keep an explicit list of which resolutions are speculative.
Original message:
Fix overly aggressive type merging.
If we find out that two types are *not* isomorphic, we learn nothing about
opaque sub types in both the source and destination.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222923
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 28 Nov 2014 16:26:14 +0000 (16:26 +0000)]
Add an assert and use a range loop. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222922
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 28 Nov 2014 15:45:31 +0000 (15:45 +0000)]
Add a testcase reduced from clang lto bootstrap on OS X.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222921
91177308-0d34-0410-b5e6-
96231b3b80d8
Charlie Turner [Fri, 28 Nov 2014 15:01:06 +0000 (15:01 +0000)]
Fix wrong encoding of MRSBanked.
Patch by Matthew Wahab.
Change-Id: Ia2a001ca2760028ea360fe77b56f203a219eefbc
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222920
91177308-0d34-0410-b5e6-
96231b3b80d8
Evgeniy Stepanov [Fri, 28 Nov 2014 11:17:58 +0000 (11:17 +0000)]
[msan] Fix origin propagation for select of floats.
MSan does not assign origin for instrumentation temps (i.e. the ones that do
not come from the application code), but "select" instrumentation erroneously
tried to use one of those.
https://code.google.com/p/memory-sanitizer/issues/detail?id=78
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222918
91177308-0d34-0410-b5e6-
96231b3b80d8
Charlie Turner [Fri, 28 Nov 2014 11:14:47 +0000 (11:14 +0000)]
Test all <build attribute, value> pairs.
Add more tests to make sure the encoding/decoding of build attributes works
correctly for all permissible values of build attributes. For cases where there
are an infinite number of such values, a representative subset has been settled
for.
Change-Id: I2643c9624c211b2d56405306e16eec2d487bc5d6
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222917
91177308-0d34-0410-b5e6-
96231b3b80d8
Ankur Garg [Fri, 28 Nov 2014 10:38:18 +0000 (10:38 +0000)]
Removed extra line from a comment to test first commit. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222916
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Fri, 28 Nov 2014 05:01:21 +0000 (05:01 +0000)]
Fix another memory leak in TableGen AsmMatcher by deleting CodeGenInstAliases.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222912
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Fri, 28 Nov 2014 03:58:26 +0000 (03:58 +0000)]
Add missing 'override' keyword.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222911
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Fri, 28 Nov 2014 03:53:02 +0000 (03:53 +0000)]
Use unique_ptr to fix some memory leaks in Tablegen AsmMatcherEmitter.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222909
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Fri, 28 Nov 2014 03:53:00 +0000 (03:53 +0000)]
Use range-based for loops and const-correct a few things.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222908
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Thu, 27 Nov 2014 21:29:20 +0000 (21:29 +0000)]
Stop using ArrayRef of a const type.
I *think* this is what the GCC bots are complaining about.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222905
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Thu, 27 Nov 2014 21:02:42 +0000 (21:02 +0000)]
AArch64: treat [N x Ty] as a block during procedure calls.
The AAPCS treats small structs and homogeneous floating (or vector) aggregates
specially, and guarantees they either get passed as a contiguous block of
registers, or prevent any future use of those registers and get passed on the
stack.
This concept can fit quite neatly into LLVM's own type system, mapping an HFA
to [N x float] and so on, and small structs to [N x i64]. Doing so allows
front-ends to emit AAPCS compliant code without having to duplicate the
register counting logic.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222903
91177308-0d34-0410-b5e6-
96231b3b80d8
Zoran Jovanovic [Thu, 27 Nov 2014 18:28:59 +0000 (18:28 +0000)]
[mips][microMIPS] Implement SWM16 and LWM16 instructions
Differential Revision: http://reviews.llvm.org/D5579
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222901
91177308-0d34-0410-b5e6-
96231b3b80d8
Jozef Kolek [Thu, 27 Nov 2014 18:18:42 +0000 (18:18 +0000)]
[mips][microMIPS] Implement BREAK16 and SDBBP16 instructions
Patch by Radovan Obradovic.
Differential Revision: http://reviews.llvm.org/D5048
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222900
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Sanders [Thu, 27 Nov 2014 17:28:10 +0000 (17:28 +0000)]
[mips] Add synci instruction.
Patch by Amaury Pouly
Reviewers: dsanders
Reviewed By: dsanders
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D6421
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222899
91177308-0d34-0410-b5e6-
96231b3b80d8
Will Newton [Thu, 27 Nov 2014 17:20:48 +0000 (17:20 +0000)]
Widen ELFYAML relocation type to 32 bits
The current 8 bits is sufficient for ELF32 targets but ELF64 requires
32 bits. Add a test for AArch64 that exposes the issue.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222898
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 27 Nov 2014 17:13:56 +0000 (17:13 +0000)]
Commit back the correct bits of r222760 (was r222538).
I also added a test.
Original message:
Allow FDE references outside the +/-2GB range supported by PC relative
offsets for code models other than small/medium. For JIT application,
memory layout is less controlled and can result in truncations
otherwise.
Patch from Akos Kiss.
Differential Revision: http://reviews.llvm.org/D6079
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222897
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 27 Nov 2014 17:13:51 +0000 (17:13 +0000)]
Revert "Reapply 222538 and update tests to explicitly request small code model and PIC:"
This reverts commit r222760.
It changed our behaviour on PIC so we don't match gas anymore. It also
included lots of unnecessary changes to tests.
If those changes are desirable, there should be an independent discussion
as they are out of scope for that patch.
I will recommit the other bits.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222896
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Thu, 27 Nov 2014 17:01:10 +0000 (17:01 +0000)]
Revert "Fix overly aggressive type merging."
This reverts commit r222727, which causes LTO bootstrap failures.
Last passing @ r222698:
http://lab.llvm.org:8080/green/job/clang-Rlto_master_build/532/
First failing @ r222843:
http://lab.llvm.org:8080/green/job/clang-Rlto_master_build/533/
Internal bootstraps pointed at a much narrower range: r222725 is
passing, and r222731 is failing.
LTO crashes while handling libclang.dylib:
http://lab.llvm.org:8080/green/job/clang-Rlto_master_build/533/consoleFull#-
158682280549ba4694-19c4-4d7e-bec5-
911270d8a58c
GEP is not of right type for indices!
%InfoObj.i.i = getelementptr inbounds %"class.llvm::OnDiskIterableChainedHashTable"* %.lcssa, i64 0, i32 0, i32 4, !dbg !123627
%"class.clang::serialization::reader::ASTIdentifierLookupTrait" = type { %"class.clang::ASTReader.31859"*, %"class.clang::serialization::ModuleFile.31870"*, %"class.clang::IdentifierInfo"* }LLVM ERROR: Broken function found, compilation aborted!
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Looks like the new algorithm doesn't merge types aggressively enough.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222895
91177308-0d34-0410-b5e6-
96231b3b80d8
Erik Eckstein [Thu, 27 Nov 2014 15:13:14 +0000 (15:13 +0000)]
reinstate r222872: Peephole optimization in switch table lookup: reuse the guarding table comparison if possible.
Fixed missing dominance check.
Original commit message:
This optimization tries to reuse the generated compare instruction, if there is a comparison against the default value after the switch.
Example:
if (idx < tablesize)
r = table[idx]; // table does not contain default_value
else
r = default_value;
if (r != default_value)
...
Is optimized to:
cond = idx < tablesize;
if (cond)
r = table[idx];
else
r = default_value;
if (cond)
...
Jump threading will then eliminate the second if(cond).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222891
91177308-0d34-0410-b5e6-
96231b3b80d8
Evgeniy Stepanov [Thu, 27 Nov 2014 14:54:02 +0000 (14:54 +0000)]
[msan] Remove indirect call wrapping code.
This functionality was only used in MSanDR, which is deprecated.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222889
91177308-0d34-0410-b5e6-
96231b3b80d8
Jozef Kolek [Thu, 27 Nov 2014 14:41:44 +0000 (14:41 +0000)]
[mips][microMIPS] Implement disassembler support for 16-bit instructions LI16, ADDIUR1SP, ADDIUR2 and ADDIUS5
Differential Revision: http://reviews.llvm.org/D6419
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222887
91177308-0d34-0410-b5e6-
96231b3b80d8
Charlie Turner [Thu, 27 Nov 2014 12:13:56 +0000 (12:13 +0000)]
Stop uppercasing build attribute data.
The string data for string-valued build attributes were being unconditionally
uppercased. There is no mention in the ARM ABI addenda about case conventions,
so it's technically implementation defined as to whether the data are
capitialised in some way or not. However, there are good reasons not to
captialise the data.
* It's less work.
* Some vendors may legitimately have case-sensitive checks for these
attributes which would fail on LLVM generated object files.
* There could be locale issues with uppercasing.
The original reasons for uppercasing appear to have stemmed from an
old codesourcery toolchain behaviour, see
http://comments.gmane.org/gmane.comp.compilers.llvm.cvs/87133
This patch makes the object file emitted no longer captialise string
data, it encodes as seen in the assembly source.
Change-Id: Ibe20dd6e60d2773d57ff72a78470839033aa5538
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222882
91177308-0d34-0410-b5e6-
96231b3b80d8
Suyog Sarda [Thu, 27 Nov 2014 11:22:49 +0000 (11:22 +0000)]
Use FileCheck instead of grep. Change by Ankur Garg.
Differential Revision: http://reviews.llvm.org/D6430
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222879
91177308-0d34-0410-b5e6-
96231b3b80d8
Erik Eckstein [Thu, 27 Nov 2014 10:59:08 +0000 (10:59 +0000)]
Revert "Peephole optimization in switch table lookup: reuse the guarding table comparison if possible."
It is breaking the clang bootstrag.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222877
91177308-0d34-0410-b5e6-
96231b3b80d8
Suyog Sarda [Thu, 27 Nov 2014 10:57:24 +0000 (10:57 +0000)]
Use FileCheck instead of grep. Change by Sonam.
Differential Revision: http://reviews.llvm.org/D6432
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222876
91177308-0d34-0410-b5e6-
96231b3b80d8
Erik Eckstein [Thu, 27 Nov 2014 08:33:51 +0000 (08:33 +0000)]
Peephole optimization in switch table lookup: reuse the guarding table comparison if possible.
This optimization tries to reuse the generated compare instruction, if there is a comparison against the default value after the switch.
Example:
if (idx < tablesize)
r = table[idx]; // table does not contain default_value
else
r = default_value;
if (r != default_value)
...
Is optimized to:
cond = idx < tablesize;
if (cond)
r = table[idx];
else
r = default_value;
if (cond)
...
\endcode
Jump threading will then eliminate the second if(cond).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222872
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Thu, 27 Nov 2014 07:25:21 +0000 (07:25 +0000)]
InstCombine: Restore optimizations lost in r210006
This restores our ability to optimize:
(X & C) == 0 ? X ^ C : X into X | C
(X & C) != 0 ? X ^ C : X into X & ~C
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222871
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Thu, 27 Nov 2014 06:36:22 +0000 (06:36 +0000)]
Add LLVMObject to LLVMExecutionEngine.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222869
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Thu, 27 Nov 2014 06:32:46 +0000 (06:32 +0000)]
InstSimplify: Restore optimizations lost in r210006
This restores our ability to optimize:
(X & C) ? X & ~C : X into X & ~C
(X & C) ? X : X & ~C into X
(X & C) ? X | C : X into X
(X & C) ? X : X | C into X | C
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222868
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Thu, 27 Nov 2014 05:40:13 +0000 (05:40 +0000)]
[MCJIT] Remove the local symbol table from RuntimeDlyd - it's not needed.
All symbols have to be stored in the global symbol to enable
cross-rtdyld-instance linking, so the local symbol table content is
redundant.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222867
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Thu, 27 Nov 2014 04:18:50 +0000 (04:18 +0000)]
[MCJIT] Update CMakeLists.txt for llvm-rtdyld to add Object as a requirement.
Hopefully this will fix
http://bb.pgr.jp/builders/clang-3stage-x86_64-linux/builds/8271/steps/stage1_build/logs/stdio
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222866
91177308-0d34-0410-b5e6-
96231b3b80d8