Eric Fiselier [Tue, 4 Nov 2014 17:03:47 +0000 (17:03 +0000)]
Mark another test as UNSUPPORTED with ASAN and MSAN
llvm-svn: 221275
Sanjay Patel [Tue, 4 Nov 2014 16:27:42 +0000 (16:27 +0000)]
remove function names from comments; NFC
llvm-svn: 221274
Sanjay Patel [Tue, 4 Nov 2014 16:09:50 +0000 (16:09 +0000)]
fix typo in comment
llvm-svn: 221273
Alexander Kornienko [Tue, 4 Nov 2014 15:25:22 +0000 (15:25 +0000)]
[clang-tidy] Don't print a message if there's no error.
llvm-svn: 221272
Yaron Keren [Tue, 4 Nov 2014 14:54:37 +0000 (14:54 +0000)]
Re-enable this test on Windows since it passes with GnuWin32 env.exe.
llvm-svn: 221271
NAKAMURA Takumi [Tue, 4 Nov 2014 14:41:53 +0000 (14:41 +0000)]
Disable 3 tests in llvm/test/Transforms/GCOVProfiling/ for now. Investigating.
llvm-svn: 221270
NAKAMURA Takumi [Tue, 4 Nov 2014 13:41:33 +0000 (13:41 +0000)]
Remove "REQUIRES:shell" from tests. They work for me.
llvm-svn: 221269
Simon Atanasyan [Tue, 4 Nov 2014 13:33:36 +0000 (13:33 +0000)]
[yaml2obj] Allow yaml2obj tool to recognize EF_MIPS_NAN2008 flag
llvm-svn: 221268
NAKAMURA Takumi [Tue, 4 Nov 2014 13:32:29 +0000 (13:32 +0000)]
clang/test/Tooling: Remove mention to PR15590 out of a couple of tests. They are suppressed with another issue.
llvm-svn: 221267
NAKAMURA Takumi [Tue, 4 Nov 2014 13:32:17 +0000 (13:32 +0000)]
clang/test/Tooling: [PR15590] Avoid backslashes in JSON. Should work on win32.
llvm-svn: 221266
NAKAMURA Takumi [Tue, 4 Nov 2014 13:19:29 +0000 (13:19 +0000)]
Re-enable tests in llvm/test/Object, corresponding to line_iterator's
change in r221153.
llvm-svn: 221265
NAKAMURA Takumi [Tue, 4 Nov 2014 13:05:23 +0000 (13:05 +0000)]
clang/test/VFS/umbrella-mismatch.m: Let it work on win32 to avoid backslashes in yaml.
FIXME: Is it intentional? s;OUT_DIR;%/S/Inputs;
llvm-svn: 221264
NAKAMURA Takumi [Tue, 4 Nov 2014 13:05:10 +0000 (13:05 +0000)]
clang/test/Coverage/html-diagnostics.c: Use find(1) to avoid globbing.
llvm-svn: 221263
NAKAMURA Takumi [Tue, 4 Nov 2014 13:00:48 +0000 (13:00 +0000)]
llvm/test/Transforms/GCOVProfiling/linezero.ll: Use %/T instead of %T in regex. This works on win32.
llvm-svn: 221262
NAKAMURA Takumi [Tue, 4 Nov 2014 12:59:18 +0000 (12:59 +0000)]
clang/test/Modules: Remove "REQUIRES:shell" since they work for me.
llvm-svn: 221261
Rafael Espindola [Tue, 4 Nov 2014 12:48:22 +0000 (12:48 +0000)]
Use findProgramByName. NFC.
llvm-svn: 221260
Daniel Jasper [Tue, 4 Nov 2014 12:41:02 +0000 (12:41 +0000)]
clang-format: Use identifier table for keywords in other languages.
Slightly easier to write, more efficient and prevents bugs by
misspelling them.
No functional changes intended.
llvm-svn: 221259
Rafael Espindola [Tue, 4 Nov 2014 12:35:47 +0000 (12:35 +0000)]
Remove FindProgramByName. NFC.
llvm-svn: 221258
Rafael Espindola [Tue, 4 Nov 2014 12:34:32 +0000 (12:34 +0000)]
Use llvm::sys::findProgramByName. NFC.
llvm-svn: 221257
Daniel Jasper [Tue, 4 Nov 2014 10:53:14 +0000 (10:53 +0000)]
clang-format: [Java] Fix class declaration line breaks.
Before:
@SomeAnnotation()
abstract
class
aaaaaaaaa<a> extends
bbbbbbbbbbbb<b> implements
cccccccccccc {
}
After:
@SomeAnnotation()
abstract class
aaaaaaaaa<a> extends
bbbbbbbbbbbb<b>
implements
cccccccccccc {
}
llvm-svn: 221256
Daniel Jasper [Tue, 4 Nov 2014 10:40:26 +0000 (10:40 +0000)]
clang-format: Fix vim integration if g:clang_format_binary doesn't exist
llvm-svn: 221254
Yaron Keren [Tue, 4 Nov 2014 09:22:41 +0000 (09:22 +0000)]
Fix Visual C++ warning, Program.inc(85): warning C4018: '<' : signed/unsigned mismatch.
llvm-svn: 221252
Tobias Grosser [Tue, 4 Nov 2014 09:18:24 +0000 (09:18 +0000)]
Use argument type directly from fflush if available in translation unit
When our RuntimeDebugBuilder calles fflush(NULL) to flush all output streams, it
is important that the types we use in the call match the ones used in a
declaration of fflush possible already available in the translation unit.
As we just pass on a NULL pointer, the type of the pointer value does not really
matter. However, as LLVM complains in case of mismatched types, we make sure
to create a NULL pointer of identical type.
No test case, as RuntimeDebugBuilder is not permanently used in Polly. Calls to
it are until now only used to add informative output during debugging sessions.
llvm-svn: 221251
Charlie Turner [Tue, 4 Nov 2014 09:07:40 +0000 (09:07 +0000)]
Add missing tests for build attribute encodings in object files.
test/MC/ARM/directive-eabi_attribute.s was missing several tests of object file
encodings relative to the existing tests for assembly file encodings. This
commit adds the missing tests.
Change-Id: Ie110ca02b65e8f4d4c77f437bd09d03607fa5c0d
llvm-svn: 221250
David Majnemer [Tue, 4 Nov 2014 08:55:13 +0000 (08:55 +0000)]
Driver: Pass some std::strings by reference instead of value
No functional change intended. This fixes PR21463.
llvm-svn: 221249
Alexander Kornienko [Tue, 4 Nov 2014 08:51:24 +0000 (08:51 +0000)]
[clang-tidy] Move -extra-arg handling to CommonOptionsProvider
Summary:
Handle -extra-arg and -extra-arg-before options in the
CommonOptionsProvider so they can be used in all clang tools. Adjust arguments
in a CompilationDatabase wrapper instead of adding ArgumentsAdjuster to the
tool.
Reviewers: djasper, klimek
Reviewed By: klimek
Subscribers: klimek, cfe-commits
Differential Revision: http://reviews.llvm.org/D6073
llvm-svn: 221248
David Majnemer [Tue, 4 Nov 2014 08:41:48 +0000 (08:41 +0000)]
llvm-objdump: Pass DiceTableEntry by reference
DiceTableEntry is 24 bytes on my machine, it's probably better to pass
them by reference.
This fixes PR21464.
llvm-svn: 221247
NAKAMURA Takumi [Tue, 4 Nov 2014 08:17:15 +0000 (08:17 +0000)]
sys::findProgramByName(): [Win32] Tweak to pass lowercase .exe to SearchPath() to appease clang Driver's tests.
It seems SearchPath() doesn't show actual extension on the filesystem.
FIXME: Shall we use FindFirstFile() here?
llvm-svn: 221246
David Majnemer [Tue, 4 Nov 2014 08:03:31 +0000 (08:03 +0000)]
CodeGen: Enable DWARF emission for MS ABI targets
This is experimental, just barely enough to get things to not
immediately combust.
A note for those who are curious:
Only lld can successfully link the object files, other linkers truncate
the section names making the debug sections illegible to debuggers.
Even with this in mind, we believe we are having trouble with SECREL
relocations.
llvm-svn: 221245
Yaron Keren [Tue, 4 Nov 2014 07:53:30 +0000 (07:53 +0000)]
#include <winbase.h> is not enough for Visual C++ 2013, it errors:
1>C:\Program Files (x86)\Windows Kits\8.1\Include\um\minwinbase.h(46):
error C2146: syntax error : missing ';' before identifier 'nLength'
1>C:\Program Files (x86)\Windows Kits\8.1\Include\um\minwinbase.h(46):
error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
...
including <windows.h> is actually required.
llvm-svn: 221244
David Majnemer [Tue, 4 Nov 2014 05:54:50 +0000 (05:54 +0000)]
test: Restore llvm-lit (at least for my machine)
r221137 feeds None into os.path.join which is not valid.
llvm-svn: 221242
Jason Molenda [Tue, 4 Nov 2014 05:48:11 +0000 (05:48 +0000)]
Add recognition for another x86 epilogue sequence (ret followed by
a nop). Fixes an instruction stepping problem when trying to step
over the final instructions of an epilogue.
<rdar://problem/
18068877>
llvm-svn: 221241
Eric Fiselier [Tue, 4 Nov 2014 05:36:15 +0000 (05:36 +0000)]
Actually mark the tests an unsupported with MSAN (not just ASAN)
llvm-svn: 221240
Jason Molenda [Tue, 4 Nov 2014 05:35:32 +0000 (05:35 +0000)]
Add one extra sanity check to RegisterContextLLDB::TryFallbackUnwindPlan
so it doesn't try the arch default if a comiler-generated (eh_frame,
compact unwind info) based unwind plan has failed.
llvm-svn: 221239
Jason Molenda [Tue, 4 Nov 2014 05:28:40 +0000 (05:28 +0000)]
Back out r221229 -- instead of trying to identify the end of the unwind,
let's let lldb try the arch default unwind every time but not destructively --
it doesn't permanently replace the main unwind method for that function from
now on.
This fix is for <rdar://problem/
18683658>.
I tested it against Ryan Brown's go program test case and also a
collection of core files of tricky unwind scenarios
<rdar://problem/
15664282> <rdar://problem/
15835846>
<rdar://problem/
15982682> <rdar://problem/
16099440>
<rdar://problem/
17364005> <rdar://problem/
18556719>
that I've fixed over the last 6-9 months.
llvm-svn: 221238
David Majnemer [Tue, 4 Nov 2014 05:17:58 +0000 (05:17 +0000)]
Minimize test case further
No functional change intended.
llvm-svn: 221237
Eric Fiselier [Tue, 4 Nov 2014 05:11:41 +0000 (05:11 +0000)]
Mark tests that replace operator new/delete as UNSUPPORTED with ASAN and MSAN.
tests that replace operator new/delete won't link when using ASAN and MSAN
because these sanitizers also replace new/delete.
llvm-svn: 221236
Shankar Easwaran [Tue, 4 Nov 2014 04:50:58 +0000 (04:50 +0000)]
[ELF] Update TODO
llvm-svn: 221235
Shankar Easwaran [Tue, 4 Nov 2014 04:25:00 +0000 (04:25 +0000)]
[ELF] Fix MSVC buildbot.
For some reason, MSVC doesnot like the style.
Checking to make sure this fixes the problem with the build.
llvm-svn: 221234
Shankar Easwaran [Tue, 4 Nov 2014 03:57:04 +0000 (03:57 +0000)]
[ELF] Fix program headers.
The ELF writer creates a invalid binary for few cases with large filesize and
memory size for segments. This patch addresses the functionality and updates the
test. This patch also cleans up parts of the ELF writer for future enhancements
to support Linker scripts.
llvm-svn: 221233
Eric Christopher [Tue, 4 Nov 2014 03:14:57 +0000 (03:14 +0000)]
Fix one more [-Werror,-Winconsistent-missing-override] error.
llvm-svn: 221232
Eric Christopher [Tue, 4 Nov 2014 03:13:17 +0000 (03:13 +0000)]
Fix a bunch of [-Werror,-Winconsistent-missing-override] errors.
llvm-svn: 221231
Rui Ueyama [Tue, 4 Nov 2014 02:40:55 +0000 (02:40 +0000)]
Remove virtual from a member function that's not overridden.
llvm-svn: 221230
Jason Molenda [Tue, 4 Nov 2014 02:31:50 +0000 (02:31 +0000)]
After we've completed a full backtrace, we'll have one frame which
is "invalid" -- it is past the end of the stack trace. Add a new
method IsCompletedStackWalk() so we can tell if an invalid stack
frame is from a complete backtrace or if it might be worth re-trying
the last unwind with a different method.
This fixes the unwinder problems Ryan Brown was having with go
programs. The unwinder can (under the right circumstances) still
destructively replace unwind plans permanently - I'll work on
that in a different patch.
<rdar://problem/
18683658>
llvm-svn: 221229
NAKAMURA Takumi [Tue, 4 Nov 2014 02:16:53 +0000 (02:16 +0000)]
R600/LLVMBuild.txt: Add TransformUtils.
llvm-svn: 221228
Tim Northover [Tue, 4 Nov 2014 02:16:03 +0000 (02:16 +0000)]
Docs: give binutils/gold instructions for CMake too.
Patch by Steve King.
llvm-svn: 221227
Reid Kleckner [Tue, 4 Nov 2014 02:02:14 +0000 (02:02 +0000)]
Revert "Transforms: reapply SVN r219899"
This reverts commit r220811 and r220839. It made an incorrect change to
musttail handling.
llvm-svn: 221226
Alexey Samsonov [Tue, 4 Nov 2014 01:55:20 +0000 (01:55 +0000)]
[TSan] Don't strip binary/library name until the moment we print it.
This commit changes the place where TSan runtime turns full path
to binary or shared library into its basename
(/usr/foo/mybinary -> mybinary). Instead of doing it as early as possible
(when we obtained the full path from the symbolizer), we now do it as
late as possible (right before printing the error report).
This seems like a right thing to do - stripping to basename is a detail
of report formatting implementation, and should belong there. Also, we
might need the full path at some point - for example, to match the
suppressions.
llvm-svn: 221225
Eric Fiselier [Tue, 4 Nov 2014 01:54:44 +0000 (01:54 +0000)]
Add test for type properties of std::reference_wrapper
llvm-svn: 221224
Mark Heffernan [Tue, 4 Nov 2014 01:51:01 +0000 (01:51 +0000)]
Remove setPreservesCFG from instcombine. The pass, in particular, does not
preserve LoopSimplify because instcombine may replace branch predicates
with undef which loop simplify then replaces with always exit. Replace
setPreservesCFG with the more constrained preservation of DomTree and
LoopInfo.
llvm-svn: 221223
Michael J. Spencer [Tue, 4 Nov 2014 01:30:55 +0000 (01:30 +0000)]
[llvm-api-change] Use findProgramByName.
llvm-svn: 221222
Michael J. Spencer [Tue, 4 Nov 2014 01:29:59 +0000 (01:29 +0000)]
Use findProgramByName.
llvm-svn: 221221
Michael J. Spencer [Tue, 4 Nov 2014 01:29:29 +0000 (01:29 +0000)]
[Support][Program] Add findProgramByName(Name, OptionalPaths)
llvm-svn: 221220
Reid Kleckner [Tue, 4 Nov 2014 01:28:33 +0000 (01:28 +0000)]
Use the LLVM_GNUC_PREREQ macro instead of the longhand version check
llvm-svn: 221219
Reid Kleckner [Tue, 4 Nov 2014 01:15:53 +0000 (01:15 +0000)]
Remove the END_WITH_NULL macro now that Clang doesn't use it
llvm-svn: 221218
Reid Kleckner [Tue, 4 Nov 2014 01:13:43 +0000 (01:13 +0000)]
Use the new LLVM_END_WITH_NULL name
llvm-svn: 221217
Kevin Enderby [Tue, 4 Nov 2014 01:12:39 +0000 (01:12 +0000)]
Remove the static version of getScatteredRelocationType() now that r221211 added
a public version MachOObjectFile::getScatteredRelocationType().
This should fix the build bot for the unused function error.
llvm-svn: 221216
Reid Kleckner [Tue, 4 Nov 2014 01:12:21 +0000 (01:12 +0000)]
Rename END_WITH_NULL to LLVM_END_WITH_NULL and move to Compiler.h
We shouldn't put this kind of attribute stuff in DataTypes.h.
Leave the END_WITH_NULL name for now so I can update clang without
making build spam.
llvm-svn: 221215
Sanjoy Das [Tue, 4 Nov 2014 00:59:21 +0000 (00:59 +0000)]
The patchpoint lowering logic would crash with live constants equal to
the tombstone or empty keys of a DenseMap<int64_t, T>. This patch
fixes the issue (and adds a tests case).
llvm-svn: 221214
Greg Clayton [Tue, 4 Nov 2014 00:56:30 +0000 (00:56 +0000)]
Fixed SBTarget::ReadMemory() to work correctly and the TestTargetAPI.py test case that was reading target memory in TargetAPITestCase.test_read_memory_with_dsym and TargetAPITestCase.test_read_memory_with_dwarf.
The problem was that SBTarget::ReadMemory() was making a new section offset lldb_private::Address by doing:
size_t
SBTarget::ReadMemory (const SBAddress addr,
void *buf,
size_t size,
lldb::SBError &error)
{
...
lldb_private::Address addr_priv(addr.GetFileAddress(), NULL);
bytes_read = target_sp->ReadMemory(addr_priv, false, buf, size, err_priv);
This is wrong. If you get the file addresss from the "addr" argument and try to read memory using that, it will think the file address is a load address and it will try to resolve it accordingly. This will work fine if your executable is loaded at the same address (no slide), but it won't work if there is a slide.
The fix is to just pass along the "addr.ref()" instead of making a new addr_priv as this will pass along the lldb_private::Address that is inside the SBAddress (which is what we want), and not always change it into something that becomes a load address (if we are running), or abmigious file address (think address zero when you have 150 shared libraries that have sections that start at zero, which one would you pick). The main reason for passing a section offset address to SBTarget::ReadMemory() is so you _can_ read from the actual section + offset that is specified in the SBAddress.
llvm-svn: 221213
David Majnemer [Tue, 4 Nov 2014 00:53:57 +0000 (00:53 +0000)]
PECOFF: Use the string table for long section names in EXEs/DLLs
Normally, PE files have section names of eight characters or less.
However, this is problematic for DWARF because DWARF section names are
things like .debug_aranges.
Instead of truncating the section name, redirect the section name into
the string table.
Differential Revision: http://reviews.llvm.org/D6104
llvm-svn: 221212
Kevin Enderby [Tue, 4 Nov 2014 00:43:16 +0000 (00:43 +0000)]
Add the code and test cases for 32-bit Intel to llvm-objdump’s Mach-O symbolizer.
llvm-svn: 221211
Colin LeMahieu [Tue, 4 Nov 2014 00:14:36 +0000 (00:14 +0000)]
[Hexagon] Reverting 220584 to address ASAN errors.
llvm-svn: 221210
Sanjoy Das [Tue, 4 Nov 2014 00:06:57 +0000 (00:06 +0000)]
Change logic in StackMaps::recordStackMapOpers to use the isInt<32>
predicate instead of bitwise operations.
This is not a functional change.
llvm-svn: 221209
Sean Callanan [Tue, 4 Nov 2014 00:06:34 +0000 (00:06 +0000)]
Added a test case for reading ivars from the
Objective-C runtime. We'll need to do more
(subclasses, partially-defined classes, etc.)
but this tests that at least the basics work.
llvm-svn: 221208
Zachary Turner [Tue, 4 Nov 2014 00:00:12 +0000 (00:00 +0000)]
Implement a framework for live debugging on Windows.
When processes are launched for debugging on Windows now, LLDB
will detect changes such as DLL loads and unloads, breakpoints,
thread creation and deletion, etc.
These notifications are not yet propagated to LLDB in a way that
LLDB understands what is happening with the process. This only
picks up the notifications from the OS in a way that they can be
sent to LLDB with subsequent patches.
Reviewed by: Scott Graham
Differential Revision: http://reviews.llvm.org/D6037
llvm-svn: 221207
Reid Kleckner [Mon, 3 Nov 2014 23:52:09 +0000 (23:52 +0000)]
Lower __builtin_fabs* to @llvm.fabs.*
mingw64's headers implement fabs by calling __builtin_fabs, so using the
library call results in an infinite loop. If the backend legalizes
@llvm.fabs as a call to fabs later, things should work out, as the crt
provides a definition.
llvm-svn: 221206
Reid Kleckner [Mon, 3 Nov 2014 23:51:40 +0000 (23:51 +0000)]
Remove dead AST type argument to EmitFAbs
llvm-svn: 221205
Akira Hatanaka [Mon, 3 Nov 2014 23:24:10 +0000 (23:24 +0000)]
Rename variables to conform to llvm coding standards.
Differential Revision: http://reviews.llvm.org/D6062
llvm-svn: 221204
Hal Finkel [Mon, 3 Nov 2014 23:19:16 +0000 (23:19 +0000)]
Use AA in LoadCombine
LoadCombine can be smarter about aborting when a writing instruction is
encountered, instead of aborting upon encountering any writing instruction, use
an AliasSetTracker, and only abort when encountering some write that might
alias with the loads that could potentially be combined.
This was originally motivated by comments made (and a test case provided) by
David Majnemer in response to PR21448. It turned out that LoadCombine was not
responsible for that PR, but LoadCombine should also be improved so that
unrelated stores (and @llvm.assume) don't interrupt load combining.
llvm-svn: 221203
David Blaikie [Mon, 3 Nov 2014 23:10:59 +0000 (23:10 +0000)]
Use common range handling for the CU's ranges
This generalizes the range handling for ranges in both the skeleton and
full unit, laying the foundation for the addition of more ranges (rather
than just the CU's special case) in the skeleton CU with fission+gmlt.
llvm-svn: 221202
Greg Clayton [Mon, 3 Nov 2014 23:10:56 +0000 (23:10 +0000)]
Fix this test to set a breakpoint at the correct location that will always get hit so it doesn't intermittently fail on MacOSX.
llvm-svn: 221201
Rafael Espindola [Mon, 3 Nov 2014 23:09:25 +0000 (23:09 +0000)]
Remove local handling of ASAN_OPTIONS and UBSAN_OPTIONS.
They are now forwarded by TestingConfig.py.
llvm-svn: 221200
Akira Hatanaka [Mon, 3 Nov 2014 23:06:31 +0000 (23:06 +0000)]
[AArch64] Make function processLogicalImmediate more efficient. NFC.
llvm-svn: 221199
Rafael Espindola [Mon, 3 Nov 2014 23:04:56 +0000 (23:04 +0000)]
Handle ASAN_OPTIONS and UBSAN_OPTIONS in TestingConfig.py
Currently they are passed to tests of llvm itself, but not, for example, lld.
With this patch the options are visible in every test.
llvm-svn: 221198
Greg Clayton [Mon, 3 Nov 2014 23:02:08 +0000 (23:02 +0000)]
Fixed a test suite error on MacOSX where people were using ".data" as the data section name for all file formats. Instead fix the test by finding the section by section type so the test is agnostic to the file format (and passes on MacOSX).
llvm-svn: 221197
Greg Clayton [Mon, 3 Nov 2014 22:58:38 +0000 (22:58 +0000)]
Fixed a test suite error on MacOSX where people were using ".data" as the data section name for all file formats. Instead fix the test by finding the section by section type so the test is agnostic to the file format (and passes on MacOSX).
llvm-svn: 221196
Alexey Samsonov [Mon, 3 Nov 2014 22:46:13 +0000 (22:46 +0000)]
[TSan] Remove bogus unused global variables
llvm-svn: 221195
Alexey Samsonov [Mon, 3 Nov 2014 22:23:44 +0000 (22:23 +0000)]
[TSan] Use StackTrace from sanitizer_common where applicable
Summary:
This change removes `__tsan::StackTrace` class. There are
now three alternatives:
# Lightweight `__sanitizer::StackTrace`, which doesn't own a buffer
of PCs. It is used in functions that need stack traces in read-only
mode, and helps to prevent unnecessary allocations/copies (e.g.
for StackTraces fetched from StackDepot).
# `__sanitizer::BufferedStackTrace`, which stores buffer of PCs in
a constant array. It is used in TraceHeader (non-Go version)
# `__tsan::VarSizeStackTrace`, which owns buffer of PCs, dynamically
allocated via TSan internal allocator.
Test Plan: compiler-rt test suite
Reviewers: dvyukov, kcc
Reviewed By: kcc
Subscribers: llvm-commits, kcc
Differential Revision: http://reviews.llvm.org/D6004
llvm-svn: 221194
Alexey Samsonov [Mon, 3 Nov 2014 22:18:12 +0000 (22:18 +0000)]
[TSan} Build Go version with -std=c++11
llvm-svn: 221192
Rafael Espindola [Mon, 3 Nov 2014 22:17:49 +0000 (22:17 +0000)]
refactor duplicated code. NFC.
llvm-svn: 221191
Alexey Samsonov [Mon, 3 Nov 2014 22:17:39 +0000 (22:17 +0000)]
[TSan] Fix signed-compare warning in the unit test
llvm-svn: 221190
Tobias Grosser [Mon, 3 Nov 2014 22:11:20 +0000 (22:11 +0000)]
Revert "Temporary disable formatting error"
This reverts commit r221159, as clang-format is again back to its old behaviour
and we do not cause any buildbot error messages any more.
llvm-svn: 221189
Reid Kleckner [Mon, 3 Nov 2014 21:56:03 +0000 (21:56 +0000)]
Move the no-prototype calling conv check after decl merging
Now we don't warn on this code:
void __stdcall f(void);
void __stdcall f();
My previous commit regressed this functionality because I didn't update
the relevant test case which used a definition.
llvm-svn: 221188
David Majnemer [Mon, 3 Nov 2014 21:55:12 +0000 (21:55 +0000)]
InstCombine: Remove infinite loop caused by FoldOpIntoPhi
FoldOpIntoPhi could create an infinite loop if the PHI could potentially
reach a BB it was considering inserting instructions into. The
instructions it would insert would eventually lead to other combines
firing which would, again, lead to FoldOpIntoPhi firing.
The solution is to handicap FoldOpIntoPhi so that it doesn't attempt to
insert instructions that the PHI might reach.
This fixes PR21377.
llvm-svn: 221187
David Blaikie [Mon, 3 Nov 2014 21:52:56 +0000 (21:52 +0000)]
Push the CURangeList down into the skeleton CU (where available) rather than the full CU
So that it may be shared between skeleton/full compile unit, for CU
ranges and other ranges to be added for fission+gmlt.
(at some point we might want some kind of object shared between the
skeleton and full compile units for all those things we only want one of
in that scope, rather than having the full unit always look through to
the skeleton... - alternatively, we might be able to have the skeleton
pointer (or another, separate pointer) point to the skeleton or to the
unit itself in non-fission, so we don't have to special case its
absence)
llvm-svn: 221186
Ahmed Bougacha [Mon, 3 Nov 2014 21:25:18 +0000 (21:25 +0000)]
[X86] Add debug print name for X86ISD::[US]MUL8. NFC-ish.
The opcodes were added in r220516, but I forgot to add the print names.
llvm-svn: 221185
Reid Kleckner [Mon, 3 Nov 2014 21:24:50 +0000 (21:24 +0000)]
Don't diagnose no-prototype callee-cleanup function definitions
We already have a warning on the call sites of code like this:
void f() { }
void g() { f(1, 2, 3); }
t.c:2:21: warning: too many arguments in call to 'f'
We can limit ourselves to diagnosing unprototyped forward declarations
of f to cut down on noise.
llvm-svn: 221184
Rafael Espindola [Mon, 3 Nov 2014 21:24:43 +0000 (21:24 +0000)]
[lit] Forward LD_PRELOAD to tests.
With this patch I can use asan to test the gold plugin without having
to build gold itself with asan.
llvm-svn: 221183
David Blaikie [Mon, 3 Nov 2014 21:15:30 +0000 (21:15 +0000)]
Add DwarfCompileUnit::BaseAddress to track the base address used by relative addressing in debug_ranges and debug_loc
This is one of a few steps to generalize range handling to include the
CU range (thus the CU's range list will be moved into the range list
list, losing track of the base address in the process), which means
generalizing ranges from both the skeleton and full unit under fission.
And... then I can used that generalized support for ranges in
fission+gmlt where there'll be a bunch more ranges in the skeleton.
llvm-svn: 221182
Greg Clayton [Mon, 3 Nov 2014 21:02:54 +0000 (21:02 +0000)]
The change previously committed as 220983 broke large binary memory reads. I kept the "idx - 1" fix from 220983, but reverted the while loop that was incorrectly added.
The details are: large packets (like large memory reads (m packets) or large binary memory reads (x packet)) can get responses that come in across multiple read() calls. The while loop that was added meant that if only a partial packet came in (like only "$abc" coming for a response) GDBRemoteCommunication::CheckForPacket() was called, it would deadlock in the while loop because no more data is going to come in as this function needs to be called again with more data from another read. So the original fix will need to be corrected and resubmitted.
<rdar://problem/
18853744>
llvm-svn: 221181
Rafael Espindola [Mon, 3 Nov 2014 20:55:23 +0000 (20:55 +0000)]
Fix leak found by asan.
llvm-svn: 221180
Rafael Espindola [Mon, 3 Nov 2014 20:49:17 +0000 (20:49 +0000)]
Fix a leak found by asan.
llvm-svn: 221179
Akira Hatanaka [Mon, 3 Nov 2014 20:37:04 +0000 (20:37 +0000)]
[ARM, inline-asm] Fix ARMTargetLowering::getRegForInlineAsmConstraint to return
register class tGPRRegClass if the target is thumb1.
This commit fixes a crash that occurs during register allocation which was
triggered when a virtual register defined by an inline-asm instruction had to
be spilled.
rdar://problem/
18740489
llvm-svn: 221178
Reid Kleckner [Mon, 3 Nov 2014 20:35:30 +0000 (20:35 +0000)]
MSVC requires redeclarations to repeat noexcept
llvm-svn: 221177
Ahmed Bougacha [Mon, 3 Nov 2014 20:26:35 +0000 (20:26 +0000)]
[X86] 8bit divrem: Improve codegen for AH register extraction.
For 8-bit divrems where the remainder is used, we used to generate:
divb %sil
shrw $8, %ax
movzbl %al, %eax
That was to avoid an H-reg access, which is problematic mainly because
it isn't possible in REX-prefixed instructions.
This patch optimizes that to:
divb %sil
movzbl %ah, %eax
To do that, we explicitly extend AH, and extract the L-subreg in the
resulting register. The extension is done using the NOREX variants of
MOVZX. To support signed operations, MOVSX_NOREX is also added.
Further, this introduces a new SDNode type, [us]divrem_ext_hreg, which is
then lowered to a sequence containing a single zext (rather than 2).
Differential Revision: http://reviews.llvm.org/D6064
llvm-svn: 221176
Hal Finkel [Mon, 3 Nov 2014 20:21:32 +0000 (20:21 +0000)]
EarlyCSE should ignore calls to @llvm.assume
EarlyCSE uses a simple generation scheme for handling memory-based
dependencies, and calls to @llvm.assume (which are marked as writing to memory
to ensure the preservation of control dependencies) disturb that scheme
unnecessarily. Skipping calls to @llvm.assume is legal, and the alternative
(adding AA calls in EarlyCSE) is likely undesirable (we have GVN for that).
Fixes PR21448.
llvm-svn: 221175
Roman Divacky [Mon, 3 Nov 2014 19:50:48 +0000 (19:50 +0000)]
Require asserts to unbreak the buildbots.
llvm-svn: 221174
Tom Stellard [Mon, 3 Nov 2014 19:49:05 +0000 (19:49 +0000)]
Reapply: R600: Make sure to inline all internal functions
Function calls aren't supported yet.
This was reverted due to build breakages, which should be fixed now.
llvm-svn: 221173
Fariborz Jahanian [Mon, 3 Nov 2014 19:46:18 +0000 (19:46 +0000)]
Further restrict issuance of 'override' warning if method
is argument to a macro which is defined in system header.
llvm-svn: 221172