Tim Northover [Fri, 14 Nov 2014 22:45:33 +0000 (22:45 +0000)]
ARM: refactor .cfi_def_cfa_offset emission.
We use to track quite a few "adjusted" offsets through the FrameLowering code
to account for changes in the prologue instructions as we went and allow the
emission of correct CFA annotations. However, we were missing a couple of cases
and the code was almost impenetrable.
It's easier to just add any stack-adjusting instruction to a list and emit them
together.
llvm-svn: 222057
Tim Northover [Fri, 14 Nov 2014 22:45:31 +0000 (22:45 +0000)]
ARM: correctly calculate the offset of FP in its push.
When we folded the DPR alignment gap into a push, we weren't noting the extra
distance from the beginning of the push to the FP, and so FP ended up pointing
at an incorrect offset.
The .cfi_def_cfa_offset directives are still wrong in this case, but I think
that can be improved by refactoring.
llvm-svn: 222056
Tim Northover [Fri, 14 Nov 2014 22:45:23 +0000 (22:45 +0000)]
ARM: simplify test.
The test's DWARF stubs were there just to trigger the emission of .cfi
directives. Fortunately, the NetBSD ABI already demands proper DWARF unwind
info, so it's easier to just use that triple.
llvm-svn: 222055
Aaron Ballman [Fri, 14 Nov 2014 22:34:56 +0000 (22:34 +0000)]
[c++1z] Support [[deprecated]] attributes on namespaces. Note that it only applies to situations where the namespace is mentioned. Thus, use on anonymous namespaces is diagnosed.
llvm-svn: 222054
Eric Fiselier [Fri, 14 Nov 2014 22:27:43 +0000 (22:27 +0000)]
Add -g -fno-omit-frame-pointer when compiling tests with sanitizers
llvm-svn: 222053
Eric Fiselier [Fri, 14 Nov 2014 22:23:57 +0000 (22:23 +0000)]
Initialize pointer in string conversion helpers to prevent MSAN diagnostic.
Since the initialization of the pointer happens across the libc library boundry
MSAN will not know the pointer was initialized. This fixes MSAN failures in
test/strings/string.conversions.
llvm-svn: 222052
Eric Fiselier [Fri, 14 Nov 2014 22:18:03 +0000 (22:18 +0000)]
add debug info when compiling sanitizer tests
llvm-svn: 222051
Eric Christopher [Fri, 14 Nov 2014 22:10:16 +0000 (22:10 +0000)]
Rerun AutoRegen.sh.
llvm-svn: 222050
Anton Korobeynikov [Fri, 14 Nov 2014 22:09:15 +0000 (22:09 +0000)]
Recommit r222044 with a test fix - it does not make sense to hunt
for a typedef before arithmetic conversion in all rare corner cases.
llvm-svn: 222049
Aaron Ballman [Fri, 14 Nov 2014 21:57:30 +0000 (21:57 +0000)]
Removing an unused variable; NFC.
llvm-svn: 222048
Anton Korobeynikov [Fri, 14 Nov 2014 21:54:46 +0000 (21:54 +0000)]
Again revert r222044 to resolve darwin objc test fails.
llvm-svn: 222047
David Blaikie [Fri, 14 Nov 2014 21:53:50 +0000 (21:53 +0000)]
Turn a leaked object into a stack variable instead.
llvm-svn: 222046
Kevin Enderby [Fri, 14 Nov 2014 21:52:18 +0000 (21:52 +0000)]
Add the code and test cases for 64-bit ARM to llvm-objdump’s Mach-O symbolizer.
FYI, removed the unused MCInstrAnalysis as it does not exist for 64-bit ARM and
was causing a “couldn't initialize disassembler for target” error.
llvm-svn: 222045
Anton Korobeynikov [Fri, 14 Nov 2014 21:41:07 +0000 (21:41 +0000)]
Follow-up to D6217
Summary:
Ok, here is somewhat addition to D6217 aiming to preserve old darwin behavior wrt the typedefed types. The actual change to SemaChecking turned out to be pretty gross, in particular:
1. We need to extract the typedef'ed type for proper diagnostics
2. We need to walk over paren expressions as well
Reviewers: chandlerc, rsmith
Reviewed By: rsmith
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D6256
llvm-svn: 222044
Rui Ueyama [Fri, 14 Nov 2014 21:33:07 +0000 (21:33 +0000)]
[PECOFF] Fix section alignment.
If you have something like
__declspec(align(8192)) int foo = 1;
in your code, the compiler makes the data to be aligned to 8192-byte
boundary, and the linker align the section containing the data to 8192.
LLD always aligned the section to 4192. So, as long as alignment
requirement is smaller than 4192, it was correct, but for larger
requirements, it's wrong.
This patch fixes the issue.
llvm-svn: 222043
Steven Wu [Fri, 14 Nov 2014 21:23:56 +0000 (21:23 +0000)]
Add DiagID and Warning Flag to DiagnosticsLog
llvm-svn: 222042
Frederic Riss [Fri, 14 Nov 2014 21:23:26 +0000 (21:23 +0000)]
Add a test for r222029 that doesn't rely on the default target being a COFF platform.
llvm-svn: 222041
David Majnemer [Fri, 14 Nov 2014 21:21:15 +0000 (21:21 +0000)]
InstCombine: Fix infinite loop caused by visitFPTrunc
We would attempt to replace a fptrunc of an frem with an identical
fptrunc. This would cause the new fptrunc to be added to the worklist.
Of course, this results in an infinite loop because we will keep
visiting the newly created fptruncs.
This fixes PR21576.
llvm-svn: 222040
Chad Rosier [Fri, 14 Nov 2014 21:09:13 +0000 (21:09 +0000)]
Reapply r221924: "[GVN] Perform Scalar PRE on gep indices that feed loads before
doing Load PRE"
This commit updates the failing test in
Analysis/TypeBasedAliasAnalysis/gvn-nonlocal-type-mismatch.ll
The failing test is sensitive to the order in which we process loads. This
version turns on the RPO traversal instead of the while DT traversal in GVN.
The new test code is functionally same just the order of loads that are
eliminated is swapped.
This new version also fixes an issue where GVN splits a critical edge and
potentially invalidate the RPO/DT iterator.
llvm-svn: 222039
Bill Schmidt [Fri, 14 Nov 2014 21:05:45 +0000 (21:05 +0000)]
Change order of tablegen generated fast-isel instruction code to be
based on instruction complexity
The order that tablegen fast-isel instruction code is generated is
currently based on the text of the predicate (using string
less-than). This patch changes this to instead use the instruction
complexity. Because the complexities are not unique a C++ multimap is
used instead of a map.
This fixes the problem where code with no predicate always comes out
first (the empty string always compares as less than all other
strings) thus making the code with predicates dead code. See the FMUL
code in PPCFastISel.cpp for an example. It also more closely matches
the normal codegen ordering. Some error checking in the tablegen
fast-isel code is fixed as well.
Patch by Bill Seurer.
llvm-svn: 222038
Tom Stellard [Fri, 14 Nov 2014 20:43:28 +0000 (20:43 +0000)]
R600/SI: Mark s_movk_i32 as rematerializable
llvm-svn: 222037
Tom Stellard [Fri, 14 Nov 2014 20:43:26 +0000 (20:43 +0000)]
R600/SI: Fix spilling of m0 register
If we have spilled the value of the m0 register, then we need to restore
it with v_readlane_b32 to a regular sgpr, because v_readlane_b32 can't
write to m0.
v_readlane_b32 can't write to m0, so
llvm-svn: 222036
Eric Fiselier [Fri, 14 Nov 2014 20:38:07 +0000 (20:38 +0000)]
Add -gline-tables-only when compiling w/ sanitizers in RELEASE
llvm-svn: 222035
Frederic Riss [Fri, 14 Nov 2014 20:33:40 +0000 (20:33 +0000)]
COFF: Add support for Dwarf accelerator tables.
This allows COFF targets to emit accelerator tables
when requested by -dwarf-accel-tables=Enable instead
of aborting. The test DebugInfo/cross-cu-inlining.ll
covers this on COFF platforms.
llvm-svn: 222034
Aaron Ballman [Fri, 14 Nov 2014 20:31:50 +0000 (20:31 +0000)]
MinGW doesn't implement std::to_string; working around it. NFC.
llvm-svn: 222033
Matt Arsenault [Fri, 14 Nov 2014 20:08:52 +0000 (20:08 +0000)]
R600/SI: Combine min3/max3 instructions
llvm-svn: 222032
Shawn Best [Fri, 14 Nov 2014 19:41:33 +0000 (19:41 +0000)]
add Makefile rule for test program CREATE_STD_THREADS
Effectively removes -lpthreads from linux/gcc build of test programs in test/api/multithreaded. This was done due to that combination causing a test program to hang due, likely due to an issue with gcc linker and libstdc++ conflicting pthreads code in test program and pthread used by lldb. Issue has been documented at:
http://llvm.org/bugs/show_bug.cgi?id=21553
Differential Revision: http://reviews.llvm.org/D5838
llvm-svn: 222031
David Majnemer [Fri, 14 Nov 2014 19:35:59 +0000 (19:35 +0000)]
yaml2obj, COFF: Correctly calculate SizeOfImage and SizeOfHeaders
SizeOfHeaders must be aligned to the FileAlignment.
SizeOfImage must be at least the SizeOfHeaders aligned to the
SectionAlignment.
llvm-svn: 222030
Frederic Riss [Fri, 14 Nov 2014 19:30:08 +0000 (19:30 +0000)]
[dwarfdump] Handle relocations in Dwarf accelerator tables
ELF targets (and maybe COFF) use relocations when referring
to strings in the .debug_str section. Handle that in the
accelerator table dumper. This commit restores the
test/DebugInfo/cross-cu-inlining.ll test to its expected
platform independant form, validating that the fix works
(this test failed on linux boxes).
llvm-svn: 222029
David Blaikie [Fri, 14 Nov 2014 19:27:22 +0000 (19:27 +0000)]
Remove some redundant virtual on overridden functions
llvm-svn: 222027
Rui Ueyama [Fri, 14 Nov 2014 19:21:06 +0000 (19:21 +0000)]
[PECOFF] Remove dead code
AddressOfEntryPoint is overridden after we layout all atoms (until then,
we don't know the entry point address for obvious reason.)
I believe this code is leftover from very early version of the
PE/COFF port that we only had an entry function in a test object file.
llvm-svn: 222026
Eric Fiselier [Fri, 14 Nov 2014 19:10:43 +0000 (19:10 +0000)]
[libcxx] Fix memory leak in strstream tests.
Summary: The strstream function `str()` sets `freeze(true)`. When `freeze` is true the destructor is not allowed to free any dynamically allocated memory. The memory leak causes ASAN to fail on these tests. To ensure memory is deallocated `strstream.freeze(false)` is called at the end of the tests.
Reviewers: danalbert, mclow.lists
Reviewed By: mclow.lists
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D6261
llvm-svn: 222025
David Blaikie [Fri, 14 Nov 2014 19:09:44 +0000 (19:09 +0000)]
Remove some redundant virtual specifiers on overriden functions.
llvm-svn: 222024
David Blaikie [Fri, 14 Nov 2014 19:06:36 +0000 (19:06 +0000)]
Remove redundant virtual on overriden functions.
llvm-svn: 222023
Duncan P. N. Exon Smith [Fri, 14 Nov 2014 18:45:40 +0000 (18:45 +0000)]
IR: Make MDString inherit from Metadata
llvm-svn: 222022
Eric Christopher [Fri, 14 Nov 2014 18:44:53 +0000 (18:44 +0000)]
Silence inconsistent override warnings.
llvm-svn: 222021
Matt Arsenault [Fri, 14 Nov 2014 18:43:41 +0000 (18:43 +0000)]
R600/SI: Fix verifier error from a branch on IMPLICIT_DEF
SIILowerI1Copies wasn't correctly handling this case.
llvm-svn: 222020
Duncan P. N. Exon Smith [Fri, 14 Nov 2014 18:42:09 +0000 (18:42 +0000)]
IR: Take an LLVMContext in Metadata::Metadata()
llvm-svn: 222019
Duncan P. N. Exon Smith [Fri, 14 Nov 2014 18:42:06 +0000 (18:42 +0000)]
Add a blank line, NFC
llvm-svn: 222018
Matt Arsenault [Fri, 14 Nov 2014 18:40:49 +0000 (18:40 +0000)]
Fix unused variable warning without asserts
llvm-svn: 222017
Yaron Keren [Fri, 14 Nov 2014 18:33:42 +0000 (18:33 +0000)]
Typo fix.
llvm-svn: 222016
Matt Arsenault [Fri, 14 Nov 2014 18:30:06 +0000 (18:30 +0000)]
R600/SI: Match integer min / max instructions
llvm-svn: 222015
Eric Fiselier [Fri, 14 Nov 2014 18:28:36 +0000 (18:28 +0000)]
[libcxx] Fix vector annotator size increase in `vector::insert(pos, count, value)`
Summary:
The size of the vector is being increased by `__n` during the call to `__move_range` and not by 1.
This fixes a test failure in `containers/sequences/vector/vector.modifiers/insert_iter_size_value.pass.cpp` when using ASAN.
Reviewers: danalbert, kcc, mclow.lists
Reviewed By: mclow.lists
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D6264
llvm-svn: 222014
Hans Wennborg [Fri, 14 Nov 2014 18:24:08 +0000 (18:24 +0000)]
clang-cl: Ignore the new /Zo[-] option (PR21571)
Also fix the ignored options test which didn't fail properly on
unknown options.
llvm-svn: 222013
Matt Arsenault [Fri, 14 Nov 2014 18:18:16 +0000 (18:18 +0000)]
R600/SI: Use S_BFE_I64 for 64-bit sext_inreg
llvm-svn: 222012
Daniel Jasper [Fri, 14 Nov 2014 17:30:15 +0000 (17:30 +0000)]
clang-format: [Java] Further improve generics formatting.
llvm-svn: 222011
Daniel Jasper [Fri, 14 Nov 2014 17:26:49 +0000 (17:26 +0000)]
clang-format: Correctly detect multiplication in ctor initializer.
Before:
Constructor() : a(a), area(width *height) {}
After:
Constructor() : a(a), area(width * height) {}
llvm-svn: 222010
Fariborz Jahanian [Fri, 14 Nov 2014 17:12:50 +0000 (17:12 +0000)]
[Sema]. Warn when logical expression is a pointer
which evaluates to true. rdar://
18716393.
Reviewed by Richard Trieu
llvm-svn: 222009
Chad Rosier [Fri, 14 Nov 2014 17:09:19 +0000 (17:09 +0000)]
[Reassociate] Canonicalize the operands of all binary operators.
llvm-svn: 222008
Frederic Riss [Fri, 14 Nov 2014 17:08:18 +0000 (17:08 +0000)]
Tentatively appease the bots.
If this workaround gets the bots green, then we have to find out
why the -dwarf-accel-tables=Enable option doesn't work as
expected on non-darwin platforms.
llvm-svn: 222007
Chad Rosier [Fri, 14 Nov 2014 17:08:15 +0000 (17:08 +0000)]
[Reassociate] Canonicalize operands of vector binary operators.
Prior to this commit fmul and fadd binary operators were being canonicalized for
both scalar and vector versions. We now canonicalize add, mul, and, or, and xor
vector instructions.
llvm-svn: 222006
Chad Rosier [Fri, 14 Nov 2014 17:05:59 +0000 (17:05 +0000)]
[Reassociate] Canonicalize constants to RHS operand.
llvm-svn: 222005
Oleksiy Vyalov [Fri, 14 Nov 2014 16:25:18 +0000 (16:25 +0000)]
Apply SOCK_CLOEXEC flag to socket API functions in order to avoid handle leakage to a forked child process.
http://reviews.llvm.org/D6204
llvm-svn: 222004
Frederic Riss [Fri, 14 Nov 2014 16:15:53 +0000 (16:15 +0000)]
Reapply "[dwarfdump] Add support for dumping accelerator tables."
This reverts commit r221842 which was a revert of r221836 and of the
test parts of r221837.
This new version fixes an UB bug pointed out by David (along with
addressing some other review comments), makes some dumping more
resilient to broken input data and forces the accelerator tables
to be dumped in the tests where we use them (this decision is
platform specific otherwise).
llvm-svn: 222003
Cameron McInally [Fri, 14 Nov 2014 15:43:00 +0000 (15:43 +0000)]
[AVX512] Add 512b masked integer shift by immediate patterns.
llvm-svn: 222002
Jay Foad [Fri, 14 Nov 2014 15:30:39 +0000 (15:30 +0000)]
[ASan] Improved stack overflow detection for PowerPC64
Summary:
AsanOnSIGSEGV has some heuristics for detecting stack overflow, but
they don't cope with a PowerPC store-with-update instruction which
modifies sp and stores to the modified address in one instruction.
This patch adds some PowerPC-specific code to check for this case.
This fixes the last few cases of the stack-overflow test.
Reviewers: kcc, samsonov, eugenis
Reviewed By: eugenis
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D6253
llvm-svn: 222001
Evgeniy Stepanov [Fri, 14 Nov 2014 15:13:23 +0000 (15:13 +0000)]
[sanitizer] Extend a comment in SlowUnwind.
This better explains a change in r221520.
llvm-svn: 222000
Chad Rosier [Fri, 14 Nov 2014 15:01:38 +0000 (15:01 +0000)]
[Reassociate] Improve rank debug information. NFC.
llvm-svn: 221999
Aaron Ballman [Fri, 14 Nov 2014 14:40:49 +0000 (14:40 +0000)]
Silencing a -Wparentheses warning; NFC.
llvm-svn: 221998
Timur Iskhodzhanov [Fri, 14 Nov 2014 14:16:34 +0000 (14:16 +0000)]
Replace weird whitespace symbols with good old spaces
llvm-svn: 221997
Timur Iskhodzhanov [Fri, 14 Nov 2014 14:10:15 +0000 (14:10 +0000)]
Add one illustrative class hierarchy as an example in a comment to the VFTableBuilder code
llvm-svn: 221996
Tom Stellard [Fri, 14 Nov 2014 14:08:04 +0000 (14:08 +0000)]
R600/SI: Fix assembly names for exec_hi and exec_lo
llvm-svn: 221995
Tom Stellard [Fri, 14 Nov 2014 14:08:00 +0000 (14:08 +0000)]
R600/SI: Start implementing an assembler
This was done using the Sparc and PowerPC AsmParsers as guides. So far it
is very simple and only supports sopp instructions.
llvm-svn: 221994
Aaron Ballman [Fri, 14 Nov 2014 14:01:55 +0000 (14:01 +0000)]
Oops, the underline was too short for sphinx to like.
llvm-svn: 221993
Aaron Ballman [Fri, 14 Nov 2014 13:48:34 +0000 (13:48 +0000)]
Correcting some grammar and typos, and adding CERT as a collaborator.
llvm-svn: 221992
Aaron Ballman [Fri, 14 Nov 2014 13:44:02 +0000 (13:44 +0000)]
Complete support for the SD-6 standing document (based off N4200) with support for __has_cpp_attribute.
llvm-svn: 221991
Daniel Jasper [Fri, 14 Nov 2014 13:27:28 +0000 (13:27 +0000)]
clang-format: Give clang-format-diff.py a -v option.
With it, it prints the file being formatted. Apparently people are
formatting thousands of files and some progress indication is helpful.
llvm-svn: 221990
Daniel Jasper [Fri, 14 Nov 2014 13:14:45 +0000 (13:14 +0000)]
clang-format: Improve function parameter packing.
Before:
void SomeLoooooooooooongFunction(
std::unique_ptr<
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa>
aaaaaaaaaaaaaaaaaaaaaaaaaa, int
bbbbbbbbbbbbb);
After:
void SomeLoooooooooooongFunction(
std::unique_ptr<
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa>
aaaaaaaaaaaaaaaaaaaaaaaaaa,
int
bbbbbbbbbbbbb);
llvm-svn: 221989
Bill Schmidt [Fri, 14 Nov 2014 13:10:13 +0000 (13:10 +0000)]
[PowerPC] Enable vec_perm for long long and double vector types for VSX
VSX makes the "vector long long" and "vector double" types available.
This patch enables the vec_perm interface for these types. The same
builtin is generated regardless of the specified type, so no
additional work or testing is needed in the back end. Tests are added
to ensure this builtin is generated by the front end.
llvm-svn: 221988
Daniel Jasper [Fri, 14 Nov 2014 13:03:40 +0000 (13:03 +0000)]
clang-format: Support assignments as conditional operands.
Before:
return a != b
// comment
? a
: a = a != b
// comment
? a =
b : a;
After:
return a != b
// comment
? a
: a = a != b
// comment
? a = b
: a;
llvm-svn: 221987
Evgeniy Stepanov [Fri, 14 Nov 2014 13:02:28 +0000 (13:02 +0000)]
[asan] Revert r221882.
This code is not part of ASan runtime (as it may be linked into a different
DSO), and thus can not call non-exported functions.
llvm-svn: 221986
Daniel Jasper [Fri, 14 Nov 2014 12:31:14 +0000 (12:31 +0000)]
clang-format: Improve indentation of comments in expressions.
Before:
int i = (a)
// comment
+ b;
return aaaa == bbbb
// comment
? aaaa
: bbbb;
After:
int i = (a)
// comment
+ b;
return aaaa == bbbb
// comment
? aaaa
: bbbb;
llvm-svn: 221985
Bill Schmidt [Fri, 14 Nov 2014 12:10:51 +0000 (12:10 +0000)]
[PowerPC] Add VSX builtins for vec_div
This patch adds builtin support for xvdivdp and xvdivsp, along with a
new test case. The builtins are accessed using vec_div in altivec.h.
Builtins are listed (mostly) alphabetically there, so inserting these
changed the line numbers for deprecation warnings tested in
test/Headers/altivec-intrin.c.
There is a companion patch for LLVM.
llvm-svn: 221984
Bill Schmidt [Fri, 14 Nov 2014 12:10:40 +0000 (12:10 +0000)]
[PowerPC] Add VSX builtins for vec_div
This patch adds builtin support for xvdivdp and xvdivsp, along with a
test case. Straightforward stuff.
There's a companion patch for Clang.
llvm-svn: 221983
Tobias Grosser [Fri, 14 Nov 2014 11:12:31 +0000 (11:12 +0000)]
Use nullptr instead of '0' for pointers
llvm-svn: 221982
Daniel Jasper [Fri, 14 Nov 2014 10:15:56 +0000 (10:15 +0000)]
clang-format: [Java] Fix line break behavior of class declarations.
Change breaking preferences:
1. Break before "extends"
2. Break before "implements"
3. Break within the implements list.
llvm-svn: 221981
Stephane Sezer [Fri, 14 Nov 2014 09:46:21 +0000 (09:46 +0000)]
Properly specify the regex used to match register indexes.
Summary: Something like "core:1" would match and try to be interpreted by the following code otherwise.
Test Plan: Run tests and make sure the ones failing previously now pass.
Reviewers: tfiala, clayborg
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D6257
llvm-svn: 221980
Daniel Jasper [Fri, 14 Nov 2014 09:05:32 +0000 (09:05 +0000)]
clang-format: [Java] Improve generic return type formatting.
Before:
public<R> ArrayList<R> get() {
After:
public <R> ArrayList<R> get() {
llvm-svn: 221979
Daniel Jasper [Fri, 14 Nov 2014 09:02:28 +0000 (09:02 +0000)]
clang-format: [Java] No altnerative operator names in Java.
Before:
someObject.and ();
After:
someObject.and();
llvm-svn: 221978
David Majnemer [Fri, 14 Nov 2014 08:38:17 +0000 (08:38 +0000)]
Calm down build bots
r221975 seemed to trigger an ambiguous conversion that only irritated
clang, not gcc.
llvm-svn: 221977
Daniel Jasper [Fri, 14 Nov 2014 08:22:46 +0000 (08:22 +0000)]
clang-format: [Java] Improve formatting of generics.
Before:
Function < F, ? extends T > function;
After:
Function<F, ? extends T> function;
llvm-svn: 221976
David Majnemer [Fri, 14 Nov 2014 08:15:42 +0000 (08:15 +0000)]
obj2yaml, yaml2obj: Add support for COFF executables
In support of serializing executables, obj2yaml now records the virtual address
and size of sections. It also serializes whatever we strictly need from
the PE header, it expects that it can reconstitute everything else via
inference.
yaml2obj can reconstitute a fully linked executable.
In order to get executables correctly serialized/deserialized, other
bugs were fixed as a circumstance. We now properly respect file and
section alignments. We also avoid writing out string tables unless they
are strictly necessary.
llvm-svn: 221975
Simon Atanasyan [Fri, 14 Nov 2014 07:15:43 +0000 (07:15 +0000)]
Follow-up to r221913. Fix some -Wcast-qual warning reasons.
llvm-svn: 221974
Rafael Espindola [Fri, 14 Nov 2014 07:02:38 +0000 (07:02 +0000)]
Use size_type for operator[].
This matches std::vector and is more efficient as it avoids
truncations.
With this the text segment of opt goes from
19705442 bytes
to
19703930 bytes.
llvm-svn: 221973
Shankar Easwaran [Fri, 14 Nov 2014 04:57:21 +0000 (04:57 +0000)]
[ELF] Dynamic section was not aligned properly.
The dynamic section was not aligned properly. The alignment of the section is
determined by the word size of the architecture.
llvm-svn: 221972
NAKAMURA Takumi [Fri, 14 Nov 2014 04:53:55 +0000 (04:53 +0000)]
SearchForAddressOfSymbol(): Disable 3 symbols, copysignf, fminf, and fmaxf, on msc17. *These were added in VS 2013*
llvm-svn: 221971
Alexey Bataev [Fri, 14 Nov 2014 04:08:45 +0000 (04:08 +0000)]
[OPENMP] Temporary fix for processing of global variables in loops.
Currently there is a bug in processing of global variables used as loop control variables in 'omp for/simd' constructs: these globals must be captured as private variables, but currently they are nor. This is a temporary bug fix for this problem until the correct solution is prepared. If a global var used as lcv without explicit mark as a private/linear/lastprivate the error message is emitted.
llvm-svn: 221970
Eric Fiselier [Fri, 14 Nov 2014 03:16:12 +0000 (03:16 +0000)]
Split string capacity test into two parts and mark one part as UNSUPPORTED when using sanitizers.
The test is split such that:
- max_size.pass.cpp tests that string::resize() fails to allocator for max_size
and max_size -1
- over_max_size.pass.cpp tests that string::resize() throws a length error for
max_size + 1
The test was split into two because max_size.pass.cpp cannot pass with
sanitizers but over_max_size.pass.cpp can.
llvm-svn: 221969
Alexey Samsonov [Fri, 14 Nov 2014 02:59:20 +0000 (02:59 +0000)]
[Sanitizer] Refactor SanitizerArgs parsing in Driver.
Remove flag parsing details from the public header.
Use SanitizerSet to represent the set of enabled sanitizers.
Cleanup the implementation: update the comments to
reflect reality, remove dead code.
No functionality change.
llvm-svn: 221968
Eric Fiselier [Fri, 14 Nov 2014 02:55:16 +0000 (02:55 +0000)]
Mark more tests as UNSUPPORTED with ASAN and MSAN.
These tests fail for 2 reasons when using ASAN and MSAN.
1. If allocator_may_return_null=0 they will fail because null is returned
or an exception is thrown.
2. When allocator_may_return_null=1 the new_handler is still not called. This
results in an assertion failures.
llvm-svn: 221967
Eric Fiselier [Fri, 14 Nov 2014 02:47:08 +0000 (02:47 +0000)]
Setup llvm-symbolizer when running the tests with sanitizers
llvm-svn: 221966
Matt Arsenault [Fri, 14 Nov 2014 02:21:58 +0000 (02:21 +0000)]
R600/SI: Make constant array static
llvm-svn: 221965
Eric Fiselier [Fri, 14 Nov 2014 02:07:52 +0000 (02:07 +0000)]
Add -O3 when testing with UBSAN. This triggers far undefined behaviour
llvm-svn: 221964
Reid Kleckner [Fri, 14 Nov 2014 02:01:10 +0000 (02:01 +0000)]
Remove -fseh-exceptions in favor of checking the triple
This option was misleading because it looked like it enabled the
language feature of SEH (__try / __except), when this option was really
controlling which EH personality function to use. Mingw only supports
SEH and SjLj EH on x86_64, so we can simply do away with this flag.
llvm-svn: 221963
Justin Bogner [Fri, 14 Nov 2014 01:50:32 +0000 (01:50 +0000)]
llvm-cov: Sink some reporting logic into CoverageMapping
This teaches CoverageMapping::getCoveredFunctions to filter to a
particular file and uses that to replace most of the logic found in
llvm-cov report.
llvm-svn: 221962
Tim Northover [Fri, 14 Nov 2014 01:30:14 +0000 (01:30 +0000)]
X86: use getConstant rather than getTargetConstant behind BUILD_VECTOR.
getTargetConstant should only be used when you can guarantee the instruction
selected will be able to cope with the raw value. BUILD_VECTOR is rather too
generic for this so we should use getConstant instead. In that case, an
instruction can still consume the constant, but if it doesn't it'll be
materialised through its own round of ISel.
Should fix PR21352.
llvm-svn: 221961
Duncan P. N. Exon Smith [Fri, 14 Nov 2014 01:17:09 +0000 (01:17 +0000)]
IR: Rewrite uniquing and creation of MDString
Stop using `Value::getName()` to get the string behind an `MDString`.
Switch to `StringMapEntry<MDString>` so that we can find the string by
its coallocation.
This is part of PR21532.
llvm-svn: 221960
Alexey Samsonov [Fri, 14 Nov 2014 00:46:39 +0000 (00:46 +0000)]
Cleanup SanitizerArgs: get rid of unused variable, make one method non-static. NFC.
llvm-svn: 221959
David Blaikie [Fri, 14 Nov 2014 00:41:46 +0000 (00:41 +0000)]
StringMap: Test and finish off supporting perfectly forwarded values in StringMap operations.
Followup to r221946.
llvm-svn: 221958
David Blaikie [Fri, 14 Nov 2014 00:41:42 +0000 (00:41 +0000)]
Fix 80 cols caught by the linter...
We have a linter running in our build now?
llvm-svn: 221957