Rafael Espindola [Mon, 15 Jun 2015 13:36:27 +0000 (13:36 +0000)]
gold-plugin: save the .o when given -save-temps.
The plugin now save the bitcode before and after optimizations and the
.o that is passed to the linker.
llvm-svn: 239726
Michael Kruse [Mon, 15 Jun 2015 10:52:28 +0000 (10:52 +0000)]
Orthography: substracting -> subtracting
This is a test commit for being granted commit-after-approval access.
llvm-svn: 239725
Daniel Sanders [Mon, 15 Jun 2015 10:34:38 +0000 (10:34 +0000)]
Revert r239721 - Replace string GNU Triples with llvm::Triple in InitMCObjectFileInfo. NFC.
It appears to cause sparc-little-endian.s to assert on Windows and Darwin.
llvm-svn: 239724
Denis Protivensky [Mon, 15 Jun 2015 09:44:25 +0000 (09:44 +0000)]
[LinkerScript] Allow destruction of PHDR
This is needed for static variable defined in sources.
llvm-svn: 239723
Daniel Jasper [Mon, 15 Jun 2015 09:23:17 +0000 (09:23 +0000)]
clang-format: [JS] Tweak behavior for multiline array initializer parameters
Before:
var someVariable = SomeFuntion(aaaa, [
aaaaaaaaaaaaaaaaaaaaaaaaaaa,
bbbbbbbbbbbbbbbbbbbbbbbbbbb,
ccccccccccccccccccccccccccc
],
aaaa);
After:
var someVariable = SomeFuntion(aaaa,
[
aaaaaaaaaaaaaaaaaaaaaaaaaaa,
bbbbbbbbbbbbbbbbbbbbbbbbbbb,
ccccccccccccccccccccccccccc
],
aaaa);
llvm-svn: 239722
Daniel Sanders [Mon, 15 Jun 2015 09:19:41 +0000 (09:19 +0000)]
Replace string GNU Triples with llvm::Triple in InitMCObjectFileInfo. NFC.
Summary:
This affects other tools so the previous C++ API has been retained as a
deprecated function for the moment. Clang has been updated with a trivial
patch (not covered by the pre-commit review) to avoid breaking -Werror builds.
Other in-tree tools will be fixed with similar trivial patches.
This continues the patch series to eliminate StringRef forms of GNU triples
from the internals of LLVM that began in r239036.
Reviewers: rengolin
Reviewed By: rengolin
Subscribers: llvm-commits, rengolin
Differential Revision: http://reviews.llvm.org/D10366
llvm-svn: 239721
Arnaud A. de Grandmaison [Mon, 15 Jun 2015 09:09:06 +0000 (09:09 +0000)]
[MachineSink] Improve runtime performance. NFC.
This patch fixes a compilation time issue, when MachineSink faces PHIs
with a huge number of operands. This can happen for example in goto table
based interpreters, where some basic blocks can have several of those PHIs,
each one with several hundreds operands. MachineSink was spending a
significant time re-building and re-sorting the list of successors of
the current MachineBasicBlock. The computing and sorting of the current
MachineBasicBlock successors is now cached.
llvm-svn: 239720
Denis Protivensky [Mon, 15 Jun 2015 08:00:51 +0000 (08:00 +0000)]
[LinkerScript] Add matching of output sections to segments
Add method to query segments for specified output section name.
Return error if the section is assigned to unknown segment.
Check matching of sections to segments during layout on the subject of correctness.
NOTE: no actual functionality of using custom segments is implemented.
Differential Revision: http://reviews.llvm.org/D10359
llvm-svn: 239719
Jingyue Wu [Mon, 15 Jun 2015 05:46:29 +0000 (05:46 +0000)]
[ValueTracking] do not overwrite analysis results already computed
Summary:
ValueTracking used to overwrite the analysis results computed from
assumes and dominating conditions. This patch fixes this issue.
Test Plan: test/Analysis/ValueTracking/assume.ll
Reviewers: hfinkel, majnemer
Reviewed By: majnemer
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D10283
llvm-svn: 239718
Rui Ueyama [Mon, 15 Jun 2015 03:03:23 +0000 (03:03 +0000)]
COFF: Use ulittle32_t::operator|=. NFC.
llvm-svn: 239717
Rui Ueyama [Mon, 15 Jun 2015 03:00:15 +0000 (03:00 +0000)]
[Support][Endian] Define |= and &= for u{big,little}{16,32,64}_t.
llvm-svn: 239716
Hao Liu [Mon, 15 Jun 2015 02:56:40 +0000 (02:56 +0000)]
[AArch64] Delete two empty files, which should be removed by r239713.
llvm-svn: 239715
Rui Ueyama [Mon, 15 Jun 2015 02:46:18 +0000 (02:46 +0000)]
COFF: Add a brief description about LTO.
llvm-svn: 239714
Hao Liu [Mon, 15 Jun 2015 01:56:40 +0000 (01:56 +0000)]
[AArch64] Revert r239711 again. We need to discuss how to share code between AArch64 and ARM backend.
llvm-svn: 239713
Rui Ueyama [Mon, 15 Jun 2015 01:35:56 +0000 (01:35 +0000)]
COFF: Fix resource table size.
The size field shouldn't include trailing padding.
llvm-svn: 239712
Hao Liu [Mon, 15 Jun 2015 01:35:49 +0000 (01:35 +0000)]
[AArch64] Match interleaved memory accesses into ldN/stN instructions.
Re-commit after adding "-aarch64-neon-syntax=generic" to fix the failure on OS X.
This patch was firstly committed in r239514, then reverted in r239544 because of a syntax incompatible failure on OS X.
llvm-svn: 239711
Rui Ueyama [Mon, 15 Jun 2015 01:23:58 +0000 (01:23 +0000)]
COFF: Support base relocations.
PE/COFF executables/DLLs usually contain data which is called
base relocations. Base relocations are a list of addresses that
need to be fixed by the loader if load-time relocation is needed.
Base relocations are in .reloc section.
We emit one base relocation entry for each IMAGE_REL_AMD64_ADDR64
relocation.
In order to save disk space, base relocations are grouped by page.
Each group is called a block. A block starts with a 32-bit page
address followed by 16-bit offsets in the page. That is more
efficient representation of addresses than just an array of 32-bit
addresses.
llvm-svn: 239710
Devin Coughlin [Mon, 15 Jun 2015 01:00:42 +0000 (01:00 +0000)]
[analyzer] Remove ObjCContainersChecker size information when a CFMutableArrayRef escapes
Update ObjCContainersChecker to be notified when pointers escape so it can
remove size information for escaping CFMutableArrayRefs. When such pointers
escape, un-analyzed code could mutate the array and cause the size information
to be incorrect.
rdar://problem/
19406485
llvm-svn: 239709
Eric Fiselier [Sun, 14 Jun 2015 23:30:09 +0000 (23:30 +0000)]
Fix std::function allocator constructors in C++03.
The C++03 version of function tried to default construct the allocator
in the uses allocator constructors when no allocation was performed. These
constructors would fail to compile when used with allocators that had no
default constructor.
llvm-svn: 239708
Rui Ueyama [Sun, 14 Jun 2015 22:21:29 +0000 (22:21 +0000)]
COFF: Change const name. NFC.
llvm-svn: 239707
Rui Ueyama [Sun, 14 Jun 2015 22:16:47 +0000 (22:16 +0000)]
COFF: Set Chunk to OutputSection backreference in addChunk().
When we add a chunk to an OutputSection, we always want to create
a backreference from an OutputSection to a Chunk. To make sure
we always do, do that in addChunk(). NFC.
llvm-svn: 239706
Rui Ueyama [Sun, 14 Jun 2015 22:01:39 +0000 (22:01 +0000)]
COFF: Add an assertion. NFC.
r239458 changed callee side of this function, so Live can never be
true when this function is called.
llvm-svn: 239705
Rui Ueyama [Sun, 14 Jun 2015 21:50:50 +0000 (21:50 +0000)]
COFF: Support Windows resource files.
Resource files are data files containing i18n messages, icon images, etc.
MSVC has a tool to convert a resource file to a regular COFF file so that
you can just link that file to embed resources to an executable.
However, you can directly pass resource files to the linker. If you do that,
the linker invokes the tool automatically. This patch implements that feature.
llvm-svn: 239704
NAKAMURA Takumi [Sun, 14 Jun 2015 21:47:29 +0000 (21:47 +0000)]
[CMake] Try to fix r239612, not to miss resources/windows_version_resource.rc in clang build.
- Who defines ${LLVM_SOURCE_DIR} ?
- Would windows_version_resource.rc be available in an *installed* llvm tree?
I suggest it may be installed in ${PREFIX}/share.
llvm-svn: 239703
Benjamin Kramer [Sun, 14 Jun 2015 21:01:20 +0000 (21:01 +0000)]
[InstSimplify] fsub nnan x, x -> 0.0 is valid without ninf
Both inf - inf and (-inf) - (-inf) are NaN, so it's already covered by
nnan.
llvm-svn: 239702
Benjamin Kramer [Sun, 14 Jun 2015 18:53:58 +0000 (18:53 +0000)]
[InstSimplify] Add self-fdiv identities for -ffinite-math-only.
When NaNs and Infs are ignored we can fold
X / X -> 1.0
-X / X -> -1.0
X / -X -> -1.0
llvm-svn: 239701
Igor Breger [Sun, 14 Jun 2015 13:07:47 +0000 (13:07 +0000)]
AVX-512: Implemented DAG lowering for shuff62x2/shufi62x2 instuctions ( Shuffle Packed Values at 128-bit Granularity )
Tests added , vector-shuffle-512-v8.ll test re-generated.
Differential Revision: http://reviews.llvm.org/D10300
llvm-svn: 239697
Michael Kuperstein [Sun, 14 Jun 2015 13:03:27 +0000 (13:03 +0000)]
Add test for parsing the XOR operator in Intel syntax inline assembly.
LLVM side of the patch was committed as r239695.
Differential Revision: http://reviews.llvm.org/D10384
Patch by marina.yatsina@intel.com
llvm-svn: 239696
Michael Kuperstein [Sun, 14 Jun 2015 12:59:45 +0000 (12:59 +0000)]
Add support for parsing the XOR operator in Intel syntax inline assembly.
Differential Revision: http://reviews.llvm.org/D10385
Patch by marina.yatsina@intel.com
llvm-svn: 239695
Igor Breger [Sun, 14 Jun 2015 12:44:55 +0000 (12:44 +0000)]
AVX-512: Implemented cvtsi2ss/d cvtusi2ss/d instructions with round control for KNL.
Added intrinsics for cvtsi2ss/d instructions.
Added tests for intrinsics and encoding.
Differential Revision: http://reviews.llvm.org/D10430
llvm-svn: 239694
Daniel Jasper [Sun, 14 Jun 2015 07:16:57 +0000 (07:16 +0000)]
clang-format: [JS] Fix corner case in template string parsing.
Before, these would not properly detected because of the char/string
literal found when re-lexing after the first `:
var x = `'`; // comment with matching quote '
var x = `"`; // comment with matching quote "
llvm-svn: 239693
NAKAMURA Takumi [Sun, 14 Jun 2015 00:23:40 +0000 (00:23 +0000)]
AsmPrinter.cpp: Avoid crashes for targeting like "arm-mingw32". CurrentFnSym might not be <MCSymbolELF> here.
llvm-svn: 239692
NAKAMURA Takumi [Sun, 14 Jun 2015 00:23:33 +0000 (00:23 +0000)]
Reformat.
llvm-svn: 239691
Colin LeMahieu [Sat, 13 Jun 2015 21:46:39 +0000 (21:46 +0000)]
[Hexagon] Adding some codegen tests and updating some to match spec.
llvm-svn: 239690
Ed Schouten [Sat, 13 Jun 2015 21:33:49 +0000 (21:33 +0000)]
Add some basic support for CloudABI on i686.
Some people want to experiment with building i686 CloudABI binaries. I
am not entirely sure this is a good idea, as I'd rather see Intel x32
support appear.
As it only requires a two-line change, let's at least provide compiler
to ease experimenting.
llvm-svn: 239689
Benjamin Kramer [Sat, 13 Jun 2015 19:50:38 +0000 (19:50 +0000)]
[Statepoints] Skip a vector copy when uniquing values.
No functionality change intended.
llvm-svn: 239688
Benjamin Kramer [Sat, 13 Jun 2015 19:50:29 +0000 (19:50 +0000)]
[ExecutionEngine] ArrayRefize argument passing.
No functionality change intended.
llvm-svn: 239687
Yaron Keren [Sat, 13 Jun 2015 17:50:47 +0000 (17:50 +0000)]
C++11 Rangify loops in AssemblyWriter::printModule, NFC.
llvm-svn: 239686
Rafael Espindola [Sat, 13 Jun 2015 17:23:15 +0000 (17:23 +0000)]
Don't use std::errc.
As noted on Errc.h:
// * std::errc is just marked with is_error_condition_enum. This means that
// common patters like AnErrorCode == errc::no_such_file_or_directory take
// 4 virtual calls instead of two comparisons.
And on some libstdc++ those virtual functions conclude that
------------------------
int main() {
std::error_code foo = std::make_error_code(std::errc::no_such_file_or_directory);
return foo == std::errc::no_such_file_or_directory;
}
-------------------------
should exit with 0.
llvm-svn: 239685
Rafael Espindola [Sat, 13 Jun 2015 17:23:13 +0000 (17:23 +0000)]
Don't use std::errc.
As noted on Errc.h:
// * std::errc is just marked with is_error_condition_enum. This means that
// common patters like AnErrorCode == errc::no_such_file_or_directory take
// 4 virtual calls instead of two comparisons.
And on some libstdc++ those virtual functions conclude that
------------------------
int main() {
std::error_code foo = std::make_error_code(std::errc::no_such_file_or_directory);
return foo == std::errc::no_such_file_or_directory;
}
-------------------------
should exit with 0.
llvm-svn: 239684
Rafael Espindola [Sat, 13 Jun 2015 17:23:04 +0000 (17:23 +0000)]
Don't use std::errc.
As noted on Errc.h:
// * std::errc is just marked with is_error_condition_enum. This means that
// common patters like AnErrorCode == errc::no_such_file_or_directory take
// 4 virtual calls instead of two comparisons.
And on some libstdc++ those virtual functions conclude that
------------------------
int main() {
std::error_code foo = std::make_error_code(std::errc::no_such_file_or_directory);
return foo == std::errc::no_such_file_or_directory;
}
-------------------------
should exit with 0.
llvm-svn: 239683
Simon Pilgrim [Sat, 13 Jun 2015 16:25:12 +0000 (16:25 +0000)]
[DAGCombiner] Added BSWAP(BSWAP(x)) -> x combine pattern.
llvm-svn: 239682
Sanjay Patel [Sat, 13 Jun 2015 15:33:15 +0000 (15:33 +0000)]
hoist loop-invariant; NFCI
llvm-svn: 239681
Sanjay Patel [Sat, 13 Jun 2015 15:32:45 +0000 (15:32 +0000)]
remove function names from comments and clean up; NFC
llvm-svn: 239680
Simon Pilgrim [Sat, 13 Jun 2015 15:23:58 +0000 (15:23 +0000)]
[SelectionDAG] Added assertions + UNDEF handling for BSWAP node creation.
llvm-svn: 239679
Sanjay Patel [Sat, 13 Jun 2015 15:06:33 +0000 (15:06 +0000)]
remove unnecessary casts; NFCI
llvm-svn: 239678
Simon Atanasyan [Sat, 13 Jun 2015 14:48:14 +0000 (14:48 +0000)]
[Mips] Support R_MIPS_PC16 relocation handling
llvm-svn: 239677
Simon Atanasyan [Sat, 13 Jun 2015 14:48:04 +0000 (14:48 +0000)]
[Mips] Use standard relocations R_MIPS_HI16/LO16 instead of custom variants
No functional changes.
llvm-svn: 239676
Simon Pilgrim [Sat, 13 Jun 2015 14:08:15 +0000 (14:08 +0000)]
[DAGCombiner] Added BSWAP vector constant folding support.
llvm-svn: 239675
Simon Pilgrim [Sat, 13 Jun 2015 12:57:36 +0000 (12:57 +0000)]
Stripped trailing whitespace. NFC.
llvm-svn: 239674
Benjamin Kramer [Sat, 13 Jun 2015 12:53:21 +0000 (12:53 +0000)]
[LinkerTest] Don't leak error string.
llvm-svn: 239673
Simon Pilgrim [Sat, 13 Jun 2015 12:51:39 +0000 (12:51 +0000)]
Stripped trailing whitespace. NFC.
llvm-svn: 239672
Rafael Espindola [Sat, 13 Jun 2015 12:50:13 +0000 (12:50 +0000)]
Update for llvm api change.
llvm-svn: 239671
Rafael Espindola [Sat, 13 Jun 2015 12:50:07 +0000 (12:50 +0000)]
Update for llvm api change.
llvm-svn: 239670
Rafael Espindola [Sat, 13 Jun 2015 12:49:52 +0000 (12:49 +0000)]
Bring in a BumpPtrStringSaver from lld and simplify the interface.
StringSaver now always saves to a BumpPtrAllocator.
The only reason for having the virtual saveImpl is so lld can have a
thread safe version.
The reason for the distinct BumpPtrStringSaver class is to avoid the
virtual destructor.
llvm-svn: 239669
Eric Fiselier [Sat, 13 Jun 2015 08:25:24 +0000 (08:25 +0000)]
Cleanup result_of tests and fix issues with the C++03 result_of.
The two main fixes this patch contains are:
- use __identity_t instead of common_type. common_type was used as an
identity metafunction but the decay resulted in incorrect results.
- Pointers to free functions were not counted as functions. Remove the pointer
before checking if a type is a function.
llvm-svn: 239668
Eric Fiselier [Sat, 13 Jun 2015 07:31:55 +0000 (07:31 +0000)]
Remove warnings about old CMake options
llvm-svn: 239667
Eric Fiselier [Sat, 13 Jun 2015 07:18:32 +0000 (07:18 +0000)]
Fix PR12999 - unordered_set::insert calls operator new when no insert occurs
Summary:
when `unordered_set::insert(value_type&&)` was called it would be treated like `unordered_set::emplace(Args&&)` and it would allocate and construct a node before trying to insert it.
This caused unnecessary allocations when the value was already in the set. This patch adds an overload to `__hash_table::__insert_unique` that specifically handles `value_type&&` more link `value_type const &`.
This patch also adds a single unified insert function for values into `__hash_table` called `__insert_unique_value` that handles the cases for `__insert_unique(value_type&&)` and `__insert_unique(value_type const &)`.
This patch fixes PR12999: http://llvm.org/bugs/show_bug.cgi?id=12999.
Reviewers: mclow.lists, titus, danalbert
Reviewed By: danalbert
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D7570
llvm-svn: 239666
Eric Fiselier [Sat, 13 Jun 2015 07:11:40 +0000 (07:11 +0000)]
Add `-verify-ignore-unexpected` option to ignore unexpected diagnostics in VerifyDiagnosticsConsumer
Summary:
The goal of this patch is to make `-verify` easier to use when testing libc++. The `notes` attached to compile error diagnostics are numerous and relatively unstable when they reference libc++ header internals. This patch allows libc++ to write stable compilation failure tests by allowing unexpected diagnostic messages to be ignored where they are not relevant.
This patch adds a new CC1 flag called `-verify-ignore-unexpected`. `-verify-ignore-unexpected` tells `VerifyDiagnosticsConsumer` to ignore *all* unexpected diagnostic messages. `-verify-ignore-unexpected=<LevelList>` can be used to only ignore certain diagnostic levels. `<LevelList>` is a comma separated list of diagnostic levels to ignore. The supported levels are `note`, `remark`, `warning` and `error`.
Reviewers: bogner, grosser, EricWF
Reviewed By: EricWF
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D10138
llvm-svn: 239665
Eric Fiselier [Sat, 13 Jun 2015 07:08:02 +0000 (07:08 +0000)]
[libcxx] Fix detection of __is_final.
Summary: Currently we only enable the use of __is_final(...) with Clang. GCC also provides __is_final(...) since 4.7 in all standard modes. This patch creates the macro _LIBCPP_HAS_IS_FINAL to note the availability of `__is_final`.
Reviewers: danalbert, mclow.lists
Reviewed By: mclow.lists
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D8795
llvm-svn: 239664
Eric Fiselier [Sat, 13 Jun 2015 06:55:44 +0000 (06:55 +0000)]
[LIT] Fix failing LIT tests
Summary:
I spend some time trying to get the LIT test suite passing. Here are the changes that I needed to make on my machine.
I made the following changes for the following reasons.
1. google-test.py: The Google test format now checks for "[ PASSED ] 1 test." to check if a test passes.
2. discovery.py: The output appears in a different order on my machine than it did in the test.
3. unittest-adaptor.py: The output appears in a different order on my machine than it did in the test.
4. The classname is now formed differently in `getJUnitXML(...)`.
I'm not sure what is causing the output order to differ in discovery.py and unittest-adaptor.py. Does anybody have any thoughts?
Reviewers: ddunbar, danalbert, jroelofs
Reviewed By: jroelofs
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D9864
llvm-svn: 239663
Eric Fiselier [Sat, 13 Jun 2015 06:27:17 +0000 (06:27 +0000)]
[libcxx] Use __decltype instead of __typeof__
Summary:
Both clang and GCC provide C++11 decltype semantics as __decltype in c++03 mode. We should use this instead of __typeof__ when availble.
GCC added __decltype in 4.6.0, and AFAIK clang provided __decltype ever since 3.3. Unfortunately `__has_builtin(__decltype)` doesn't work for clang so we need to check the compiler version instead.
Reviewers: mclow.lists
Reviewed By: mclow.lists
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D10426
llvm-svn: 239662
Tom Stellard [Sat, 13 Jun 2015 05:11:14 +0000 (05:11 +0000)]
AMDGPU: s/R600/AMDGPU/ in the Makefiles
Now the library names in the Makefiles match the library names in
LLVMBuild.txt.
This should hopefully fix the remaining bot failures.
llvm-svn: 239661
Tom Stellard [Sat, 13 Jun 2015 03:46:48 +0000 (03:46 +0000)]
configure: Remove non-portable fall-through operator: ;&
This was added in r239657.
llvm-svn: 239660
Matthias Braun [Sat, 13 Jun 2015 03:42:16 +0000 (03:42 +0000)]
Rename TargetSubtargetInfo::enablePostMachineScheduler() to enablePostRAScheduler()
r213101 changed the behaviour of this method to not only affect the
PostMachineScheduler scheduler but also the PostRAScheduler scheduler,
renaming should make this fact clear. Also document that the preferred
way is to specify this in the scheduling model instead of overriding
this method.
Differential Revision: http://reviews.llvm.org/D10427
llvm-svn: 239659
Matthias Braun [Sat, 13 Jun 2015 03:42:11 +0000 (03:42 +0000)]
MachineLICM: Use TargetSchedModel instead of just itineraries
This will use Itinieraries if available, but will also work if just a
MCSchedModel is available.
Differential Revision: http://reviews.llvm.org/D10428
llvm-svn: 239658
Tom Stellard [Sat, 13 Jun 2015 03:28:10 +0000 (03:28 +0000)]
R600 -> AMDGPU rename
llvm-svn: 239657
Hans Wennborg [Sat, 13 Jun 2015 02:53:50 +0000 (02:53 +0000)]
Revert r239213: "clang-cl: Implement /GL in terms of -flto."
Reverting until it's easier to use this in a real-world build, e.g.
when the linker can handle it.
llvm-svn: 239656
Eric Fiselier [Sat, 13 Jun 2015 02:36:07 +0000 (02:36 +0000)]
Make __void_t unary and always provide it.
llvm-svn: 239655
Eric Fiselier [Sat, 13 Jun 2015 02:23:00 +0000 (02:23 +0000)]
LWG2442: call_once() shouldn't DECAY_COPY(). Patch from K-Ballo.
This patch fixes LWG issue 2422 by removing the DECAY_COPY from call once.
The review can be found here: http://reviews.llvm.org/D10191
llvm-svn: 239654
Eric Fiselier [Sat, 13 Jun 2015 02:18:44 +0000 (02:18 +0000)]
Enable __is_trivially* intrinsics for GCC 5.1
Until GCC 5.1 the __is_trivially* intrinsics were not provided. Enable use of
the builtins for GCC 5.1.
Also enable Reference qualified member functions for GCC 4.9 and greater.
This patch also defines _GNUC_VER to 0 when __GNUC__ is not defined because
libc++ assumes _GNUC_VER is always defined.
llvm-svn: 239653
Saleem Abdulrasool [Sat, 13 Jun 2015 01:21:58 +0000 (01:21 +0000)]
docs: grammar adjustments in clang manpage
Fix a few typos and run-on sentences in the clang POD documentation.
Patch by Brian R. Gaeke!
llvm-svn: 239652
Ahmed Bougacha [Sat, 13 Jun 2015 01:16:10 +0000 (01:16 +0000)]
[CodeGen] Don't evaluate immediate inlineasm arguments using isICE().
Instead, just EvaluateAsInt().
Follow-up to r239549: rsmith points out that isICE() is expensive;
seems like it's not the right concept anyway, as it fails on
`static const' in C, and will actually trigger the assert below on:
test/Sema/inline-asm-validate-x86.c
llvm-svn: 239651
Matt Wala [Sat, 13 Jun 2015 01:08:00 +0000 (01:08 +0000)]
Revert 239644.
llvm-svn: 239650
Eric Fiselier [Sat, 13 Jun 2015 00:33:13 +0000 (00:33 +0000)]
Refactor is_member_function_pointer to use is_function and not __member_function_traits.
Replacing the dependancy on __member_function_traits with is_function allows
is_member_function_pointer to work more often. In particular it allows it to
work when we don't have variadic templates but the function has an arity > 3.
llvm-svn: 239649
Eric Fiselier [Sat, 13 Jun 2015 00:23:07 +0000 (00:23 +0000)]
Prevent dependancy on libatomic when using GCC to provide <atomic>.
The __atomic_is_lock_free(...) function sometimes requires linkage to libatomic
if it cannot be evaluated at compile time. Remove __c11_atomic_is_lock_free
and use __atomic_is_lock_free(sizeof(Tp)) directly so that it can be evaluated
at compile time.
llvm-svn: 239648
Tim Northover [Fri, 12 Jun 2015 23:37:11 +0000 (23:37 +0000)]
AArch64: map bare-metal arm64-macho triple to MachO MC layer.
Far better than an assertion about expecting ELF.
llvm-svn: 239647
Eli Bendersky [Fri, 12 Jun 2015 23:26:42 +0000 (23:26 +0000)]
Fix returning error message in LLVMLinkModules
On error, the temporary output stream wouldn't be flushed and therefore the
caller would see an empty error message.
Patch by Antoine Pitrou
Differential Revision: http://reviews.llvm.org/D10241
llvm-svn: 239646
Lang Hames [Fri, 12 Jun 2015 23:13:06 +0000 (23:13 +0000)]
[Orc] Tidy up initialization based on review feedback for r239561 from dblaikie.
NFC.
llvm-svn: 239645
Matt Wala [Fri, 12 Jun 2015 22:49:11 +0000 (22:49 +0000)]
[Scalarizer] Fix potential for stale data in Scattered across invocations
Summary:
Scalarizer has two data structures that hold information about changes
to the function, Gathered and Scattered. These are cleared in finish()
at the end of runOnFunction() if finish() detects any changes to the
function.
However, finish() was checking for changes by only checking if
Gathered was non-empty. The function visitStore() only modifies
Scattered without touching Gathered. As a result, Scattered could have
ended up having stale data if Scalarizer only scalarized store
instructions. Since the data in Scattered is used during the execution
of the pass, this introduced dangling pointer errors.
The fix is to check whether both Scattered and Gathered are empty
before deciding what to do in finish().
Reviewers: srhines
Reviewed By: srhines
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D10422
llvm-svn: 239644
Alexey Samsonov [Fri, 12 Jun 2015 22:31:32 +0000 (22:31 +0000)]
[CodeGen] Use IRBuilder to create llvm.lifetime intrinsics.
Summary:
In addition to easier syntax, IRBuilder makes sure to set correct
debug locations for newly added instructions (bitcast and
llvm.lifetime itself). This restores the original behavior, which
was modified by r234581 (reapplied as r235553).
Extend one of the tests to check for debug locations.
Test Plan: regression test suite
Reviewers: aadg, dblaikie
Subscribers: cfe-commits, majnemer
Differential Revision: http://reviews.llvm.org/D10418
llvm-svn: 239643
Lang Hames [Fri, 12 Jun 2015 22:22:50 +0000 (22:22 +0000)]
[Orc] Tidy up the CompileOnDemand layer based on commit review from dblaikie.
NFC.
llvm-svn: 239642
Davide Italiano [Fri, 12 Jun 2015 21:37:55 +0000 (21:37 +0000)]
[COFF] Spell the namespace correctly.
llvm-svn: 239641
Lang Hames [Fri, 12 Jun 2015 21:31:15 +0000 (21:31 +0000)]
[Orc] Fix a bug in the CompileOnDemand layer where stub decls were not cloned
into partitions. Also, add an option to clone stub definitions (not just decls)
into partitions: these definitions could be inlined in some places to avoid the
overhead of calling via the stub.
Found by inspection - no test case yet, although I plan to add a unit test for
this once the CompileOnDemand layer refactoring settles down.
llvm-svn: 239640
Hans Wennborg [Fri, 12 Jun 2015 21:23:23 +0000 (21:23 +0000)]
[ms] Don't try to delay lookup for failures in SFINAE context (PR23823)
The underlying problem in PR23823 already existed before my recent change
in r239558, but that change made it worse (failing not only for undeclared
symbols, but also failed overload resolution). This makes Clang not try to
delay the lookup in SFINAE context. I assume no current code is relying on
SFINAE working with lookups that need to be delayed, because that never
seems to have worked.
Differential Revision: http://reviews.llvm.org/D10417
llvm-svn: 239639
Alexey Samsonov [Fri, 12 Jun 2015 21:05:32 +0000 (21:05 +0000)]
[CGCall] Fix potential invalid iterator decrement in findDominatingStoreToReturnValue.
If llvm.lifetime.end turns out to be the first instruction in the last
basic block, we can decrement the iterator twice, going past rend.
At the moment, this can never happen because llvm.lifetime.end always
goes immediately after bitcast, but relying on this is very brittle.
llvm-svn: 239638
Tom Stellard [Fri, 12 Jun 2015 20:47:06 +0000 (20:47 +0000)]
R600/SI: Add assembler support for FLAT instructions
- Add glc, slc, and tfe operands to flat instructions
- Add missing flat instructions
- Fix the encoding of flat_load_dwordx3 and flat_store_dwordx3.
llvm-svn: 239637
Yaron Keren [Fri, 12 Jun 2015 20:18:20 +0000 (20:18 +0000)]
Rangify several for loops in ValueEnumerator constructor.
llvm-svn: 239636
Eric Christopher [Fri, 12 Jun 2015 20:13:50 +0000 (20:13 +0000)]
Quote the user provided string in the warning message and update
tests accordingly.
llvm-svn: 239635
Colin LeMahieu [Fri, 12 Jun 2015 19:57:32 +0000 (19:57 +0000)]
[Hexagon] Making intrinsic tests agnostic to register allocation. Narrowing intrinsic parameters to appropriate width.
llvm-svn: 239634
Tim Northover [Fri, 12 Jun 2015 19:21:35 +0000 (19:21 +0000)]
Driver: only set -mlinker-version based on host if it's valid
We were adding an extra "-mlinker-version" argument to the invocation
based on a value inferred from "ld -v". This is set by the build
systems to either a sane value or an empty string (e.g. for custom
built ld), which we don't want to pass on.
No test really possible because the value depends on both host system
and how CMake was invoked.
llvm-svn: 239633
Douglas Katzman [Fri, 12 Jun 2015 18:44:57 +0000 (18:44 +0000)]
Wrap some long lines in LLVMBuild files. NFC
As suggested by jroelofs in a prior review (D9752),
it makes sense to generally prefer multi-line format.
llvm-svn: 239632
Douglas Katzman [Fri, 12 Jun 2015 18:31:38 +0000 (18:31 +0000)]
Add 'shave' processor name to Triple
Based on ArchType, Clang's driver can select a non-Clang compiler.
String parsing in Clang would have sufficed if it were only that,
however this change anticipates true llvm support.
Differential Revision: http://reviews.llvm.org/D10413
llvm-svn: 239631
Ahmed Bougacha [Fri, 12 Jun 2015 18:28:47 +0000 (18:28 +0000)]
[builtins] Hide long double fp_test.h helpers if it's not fp128.
Like we do for the various __*tf* tests, check that long double is the
128bit type we expect directly in the header. The latter is now used by
unrelated tests (__*hf* since r237161), and those tests will break for
no reason if uint128_t doesn't exist, and long double isn't fp128.
llvm-svn: 239630
David Blaikie [Fri, 12 Jun 2015 18:22:03 +0000 (18:22 +0000)]
Refix a use of explicit pointer types in GEP constant folding
In the glorious future of opaque pointer types, it won't be possible to
retrieve the pointee type of a pointer type which is what's being done
in this GEP loop - but the first iteration is always a pointer type and
the loop doesn't care about that case, except whether or not the index
is a constant.
So pull that special case out before the loop and start at the second
iteration (index 1) instead.
Originally committed in r236670 and reverted with a test case in
r239015. This change keeps the test case working while also avoiding
depending on pointee types.
llvm-svn: 239629
Matt Wala [Fri, 12 Jun 2015 18:16:51 +0000 (18:16 +0000)]
Fix a typo in a comment in MemCpyOpt (test commit)
llvm-svn: 239628
Yaron Keren [Fri, 12 Jun 2015 18:13:20 +0000 (18:13 +0000)]
Rangify two for loops in BitcodeReader.cpp.
llvm-svn: 239627
Pete Cooper [Fri, 12 Jun 2015 18:07:34 +0000 (18:07 +0000)]
Remove unnecessary MCExpr.h include from MCSymbol.h
MCSymbol.h already forwards declares MCExpr and only uses MCExpr* so doesn't
need to include the header.
llvm-svn: 239626
David Majnemer [Fri, 12 Jun 2015 17:55:44 +0000 (17:55 +0000)]
[MS ABI] Lock-in the derived memptr rep. for base-to-derived conversions
We would get this right in the case where an explicit cast was formed
but not when we were performing an implicit conversion.
This fixes PR23828.
llvm-svn: 239625
Pete Cooper [Fri, 12 Jun 2015 17:48:21 +0000 (17:48 +0000)]
Remove a bunch of inline keywords from User. NFC.
This came up in the patch review for http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-
20150608/281362.html.
llvm-svn: 239624