Commit Graph

174494 Commits

Author SHA1 Message Date
Tobias Grosser 5f860fdfe9 Do not run GPGPU test cases without nvptx target
Tag the GPGPU codegen test cases as unsupported if the nvptx target is not
included in the current llvm build.

Contributed-by:  Yabin Hu <yabin.hwu@gmail.com>
llvm-svn: 208779
2014-05-14 14:18:14 +00:00
Timur Iskhodzhanov b2e723e448 [ASan tests] Update relative paths from POSIX-only tests to their shared libraries
llvm-svn: 208778
2014-05-14 14:16:09 +00:00
Timur Iskhodzhanov 6a9121904d [ASan tests] Create a Posix/ directory for tests that we don't plan to run on Windows
llvm-svn: 208777
2014-05-14 14:12:02 +00:00
Kostya Serebryany b9e31d7fcd [asan] use some LIKELY/UNLIKELY
llvm-svn: 208776
2014-05-14 14:03:31 +00:00
Timur Iskhodzhanov 86e2470a5b [ASan/Win] Enable demangling of global variable names
llvm-svn: 208775
2014-05-14 13:55:59 +00:00
Aaron Ballman 2f3fc6badd Formatting and style changes; no functional changes intended.
llvm-svn: 208774
2014-05-14 13:03:55 +00:00
Evgeniy Stepanov 99d3791a88 [sanitizer] Fix crash in getgrnam_r and similar interceptors.
When no matching record is found, getgrnam_r return 0 but sets result to NULL.
Should fix PR19734.

llvm-svn: 208773
2014-05-14 12:32:40 +00:00
Alexander Potapenko 04e2f43756 [libsanitizer] Notify the runtime about file being closed before the actual call to fclose().
This shall fix spurious false positive race reports between fclose() and fopen64().

llvm-svn: 208772
2014-05-14 11:48:37 +00:00
Alexander Kornienko a3b8f998ac Remove empty directory left after r207995.
llvm-svn: 208771
2014-05-14 11:34:48 +00:00
Evgeniy Stepanov b4aa2b422b Regression test for ARM EHABI breakage in r208166.
llvm-svn: 208770
2014-05-14 11:13:31 +00:00
Evgeniy Stepanov ed31ca4bdc [asan] Fix compiler warnings.
llvm-svn: 208769
2014-05-14 10:56:19 +00:00
Alexey Bataev 301a2d9249 [OPENMP] Fix warning in Release builds.
llvm-svn: 208768
2014-05-14 10:40:54 +00:00
Evgeniy Stepanov aaf4bb2394 [asan] Set debug location in ASan function prologue.
Most importantly, it gives debug location info to the coverage callback.

This change also removes 2 cases of unnecessary setDebugLoc when IRBuilder
is created with the same debug location.

llvm-svn: 208767
2014-05-14 10:30:15 +00:00
Daniel Jasper 2e8600c02b clang-format: Add clang-format-diff usage examples for SVN.
llvm-svn: 208766
2014-05-14 09:36:11 +00:00
Daniel Jasper 17605d3961 clang-format: Add option to allow short blocks on a single line.
With AllowShortBlocksOnASingleLine, clang-format allows:
  if (a) { return; }

Based on patch by Gonzalo BG, thank you!

llvm-svn: 208765
2014-05-14 09:33:35 +00:00
Sylvestre Ledru 75a58f4028 Update of the documentation: I think we are now happy with Phabricator
llvm-svn: 208764
2014-05-14 09:22:15 +00:00
Kostya Serebryany d5e1091c73 [asan] tyring to fix the Android build
llvm-svn: 208763
2014-05-14 09:21:22 +00:00
Serge Pavlov e6de9e39a8 Fix the case when reordering shuffle and binop produces a constant.
This resolves PR19737.

llvm-svn: 208762
2014-05-14 09:05:09 +00:00
Hao Liu 9f9492b657 [ARM64]Fix the bug right shift uint64_t by 64 generates incorrect result.
llvm-svn: 208761
2014-05-14 08:59:30 +00:00
Kostya Serebryany 7534a60753 [asan] Respect personality in kernel area detector, patch by Yuri Gribov
llvm-svn: 208760
2014-05-14 08:13:11 +00:00
Jay Foad 5ace2cd512 Fix strange typo in markup.
llvm-svn: 208759
2014-05-14 08:10:16 +00:00
NAKAMURA Takumi 5182b5ae0c Sema::FindAllocationFunctions(): Fix \param. [-Wdocumentation]
llvm-svn: 208758
2014-05-14 08:07:56 +00:00
Jay Foad e48d9e8efe Update the comments for ComputeMaskedBits, which lost its Mask parameter
in r154011.

llvm-svn: 208757
2014-05-14 08:00:07 +00:00
John McCall 2976f8b011 Create a redeclaration when an elaborated type specifier
resolves to an existing declaration if there are attributes
present.

This gives us something to apply the attributes to.

llvm-svn: 208756
2014-05-14 07:54:17 +00:00
Evgeniy Stepanov adc3ff9f48 [sanitizer] Move open_memstream test under Linux.
llvm-svn: 208755
2014-05-14 07:27:18 +00:00
Rui Ueyama b18489c8bf [PECOFF] Find symbols with @number suffix for dllexported symbols
As written in the comment in this patch, symbol names specified with
/export option is resolved in a special way; for /export:foo, linker
finds a foo@<number> symbol if such symbols exists.

On Windows, a function in stdcall calling convention is mangled with
a leading underscore and following "@" and numbers. This name
mangling is kind of automatic, so you can sometimes omit _ and @number
when specifying a symbol. /export option is that case.

Previously, if a file in an archive file foo.lib provides a symbol
_fn@8, and /export:fn is specified, LLD failed to resolve the symbol.
It only tried to find _fn, and failed to find _fn@8. With this patch,
_fn@8 will be searched on the second iteration.

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

llvm-svn: 208754
2014-05-14 06:29:32 +00:00
Rui Ueyama 551aacd6bc Add observers to Input Graph
Make it possible to add observers to an Input Graph, so that files
returned from an Input Graph can be examined before they are
passed to Resolver.

To implement some PE/COFF features we need to know all the symbols
that *can* be solved, including ones in archive files that are not
yet to be read.

Currently, Resolver only maintains a set of symbols that are
already read. It has no knowledge on symbols in skipped files in
an archive file.

There are many ways to implement that. I chose to apply the
observer pattern here because it seems most non-intrusive. We don't
want to mess up Resolver with architecture specific features.
Even in PE/COFF, the feature that needs this mechanism is minor.
So I chose not to modify Resolver, but add a hook to Input Graph.

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

llvm-svn: 208753
2014-05-14 05:31:54 +00:00
Simon Atanasyan ae6bb33ac2 [obj2yaml] Support ELF input format in the obj2yaml tool.
The ELF header e_flags field in the MIPS related test cases handled
incorrectly. The obj2yaml prints too many flags. I will fix that in the
next patches.

The patch reviewed by Michael Spencer and Sean Silva.

llvm-svn: 208752
2014-05-14 05:07:47 +00:00
Saleem Abdulrasool 27351f2022 ARM: implement support for the UDF mnemonic
The UDF instruction is a reserved undefined instruction space.  The assembler
mnemonic was introduced with ARM ARM rev C.a.  The instruction is not predicated
and the immediate constant is ignored by the CPU.  Add support for the three
encodings for this instruction.

The changes to the invalid instruction test is due to the fact that the invalid
instructions actually overlap with the undefined instruction.  Introduction of
the new instruction results in a partial decode as an undefined sequence.  Drop
the tests as they are invalid instruction patterns anyways.

llvm-svn: 208751
2014-05-14 03:47:39 +00:00
Nick Lewycky f0cf8fa941 Optimize integral reciprocal (udiv 1, x and sdiv 1, x) to not use division. This fires exactly once in a clang bootstrap, but covers a few different results from http://www.cs.utah.edu/~regehr/souper/
llvm-svn: 208750
2014-05-14 03:03:05 +00:00
Greg Clayton 3698a715ee Don't assert and crash when sections are malformed.
<rdar://problem/16833247>

llvm-svn: 208749
2014-05-14 01:12:09 +00:00
David Blaikie 9b8c8cda0d Recommit r208506: DebugInfo: Include lexical scopes in inlined subroutines.
This was reverted in r208642 due to regressions surrounding file changes
within lexical scopes causing inlining information to be lost.

The issue was in LexicalScopes::getOrCreateInlinedScope, where I was
previously testing "isLexicalBlock" which is false for
"DILexicalBlockFile" (a scope used to represent changes in the current
file name) and assuming it was then a function (breaking out of the
inlined scope path and reaching for the parent non-inlined scopes). By
inverting the condition and testing for "isSubprogram" the correct
behavior is attained.

(also found some weirdness in Clang, see r208742 when reducing this test
case - the resulting test case doesn't apply with the Clang fix, but
I've added a more realistic test case to inline-scopes.ll which does
reproduce the issue and demonstrate the fix)

llvm-svn: 208748
2014-05-14 01:08:28 +00:00
Greg Fitzgerald 5a1cf70ac3 removed redundant lit variable
Thanks Alexey!

llvm-svn: 208747
2014-05-14 01:04:17 +00:00
Greg Fitzgerald 320713ffbe Add target flags to ubsan tests
llvm-svn: 208746
2014-05-14 00:46:01 +00:00
Greg Fitzgerald 07c88a16e8 Enable CAN_EXECUTE_TESTS if an EMULATOR is provided
llvm-svn: 208745
2014-05-14 00:36:15 +00:00
Greg Fitzgerald 1402830dc5 Add %run to tests that used %T/name.exe
llvm-svn: 208744
2014-05-14 00:32:15 +00:00
Eric Christopher 02e1804d8d Fix typo in function name.
llvm-svn: 208743
2014-05-14 00:31:15 +00:00
David Blaikie aabde05da1 DebugInfo: Avoid creating DILexicalScopeFiles when the filename in the current scope has not changed.
This looks like the right way for this check to work, but there is
another semi-obvious bug, I would think: why is CurLoc not zero'd out
between functions? The possibility for it to bleed between them seems
problematic. (& indeed I caused tests to fail when I fixed this a
different way, by setting CurLoc to SourceLocation() and the end of
EmitFunctionEnd... )

The changes to debug-info-blocks.m are due to a mismatch between the
source manager's file naming and CGDebugInfo's default handling when no
-main-file-name is specified. This actually reveals somewhat of a bug in
the debug info when using source files from standard in, too. See the
comment in CGDebugInfo::CreateCompileUnit for more details.

llvm-svn: 208742
2014-05-14 00:29:00 +00:00
Todd Fiala e24614f74e lldb: gdb remote support always falls back to $qC when no $qProcessInfo.
See thread here:
http://lists.cs.uiuc.edu/pipermail/lldb-dev/2014-May/003992.html

This is meant to address case 3 that I recently broke with an earlier
change to rectify usage of the $qC message for thread ids, specifically:

3. TOT lldb <=> gdbserver (without $qProcessInfo support and not Apple/iOS).

llvm-svn: 208741
2014-05-14 00:15:32 +00:00
Matt Arsenault 4b0402e317 R600/SI: Try to fix BFE operands when moving to VALU
This was broken by r208479

llvm-svn: 208740
2014-05-13 23:45:50 +00:00
Lang Hames d311c0ea46 [tools][llvm-rtdyld] Add a '-dylib <file>' option to llvm-rtdyld to load shared
libraries before linking and executing the target objects.

This allows programs that use external calls (e.g. to libc) to be run under
llvm-rtdyld.

llvm-svn: 208739
2014-05-13 22:37:41 +00:00
Alexey Samsonov 5716928ae2 [TSan] Build TSan-instrumented version of libcxx and use it in lit tests.
TSan can produce false positives in code that uses C++11 threading,
as it doesn't see synchronization inside standard library. See
http://lists.cs.uiuc.edu/pipermail/cfe-dev/2014-February/035408.html
for an example of such case.

We may build custom TSan-instrumented version libcxx to fight with that.
This change adds build rules for libcxx_tsan and integrates it into
testing infrastructure.

llvm-svn: 208737
2014-05-13 22:30:16 +00:00
Jason Molenda 060ca7596c Fix the quoting in my x packet documentation so it's
consistent with the rest of the entries.

llvm-svn: 208736
2014-05-13 22:21:34 +00:00
Lang Hames 890758d5b3 [RuntimeDyld] Fix handling of i386 PC-rel external relocations. This fixes
several more i386 MCJIT regression test failures.

<rdar://problem/16889891>

llvm-svn: 208735
2014-05-13 22:09:07 +00:00
Reid Kleckner 40ca913727 Push record return type classification into CGCXXABI
In the Microsoft C++ ABI, instance methods always return records
indirectly via the second hidden parameter.  This was implemented in
X86_32ABIInfo, but not WinX86_64ABIInfo.

Rather than exposing a handful of boolean methods in the CGCXXABI
interface, we can expose a single method that applies C++ ABI return
value classification rules.

llvm-svn: 208733
2014-05-13 22:05:45 +00:00
Jason Molenda b4892cd266 Add a new SBThread::SafeToCallFunctions API; this calls over to
the SystemRuntime to check if a thread will have any problems 
performing an inferior function call so the driver can skip
making that function call on that thread.  Often the function
call can be executed on another thread instead.
<rdar://problem/16777874> 

llvm-svn: 208732
2014-05-13 22:02:48 +00:00
Louis Gerbarg 1b91aa2cf5 Add missing line breaks to debug output in CodeGenPrepare
llvm-svn: 208731
2014-05-13 21:54:22 +00:00
Benjamin Kramer 3f085ba6d6 GVN: Fix non-determinism in map iteration.
Iterating over a DenseMaop is non-deterministic and results to unpredictable IR
output.

Based on a patch by Daniel Reynaud!

llvm-svn: 208728
2014-05-13 21:06:40 +00:00
Benjamin Kramer d97f95e2f2 GVN: rangify a couple of loops.
No functionality change.

llvm-svn: 208727
2014-05-13 21:06:36 +00:00
Eric Christopher d1309ee27d Save the optimization level the subtarget was created with in a
member variable and sink the initialization of crbits into the
subtarget feature reset code.

No functional change, but this refactor will be used in a future
commit.

llvm-svn: 208726
2014-05-13 20:49:08 +00:00