Commit Graph

215494 Commits

Author SHA1 Message Date
Davide Italiano b883b01a8e [SimplifyLibCalls] Make a function shorter. NFC.
llvm-svn: 252970
2015-11-12 23:39:00 +00:00
Colin LeMahieu 7a92c6ecbb [Hexagon] Adding checks for values out of operand range and correct new-value producer usage.
llvm-svn: 252969
2015-11-12 23:28:01 +00:00
Colin LeMahieu a1fa71ead9 [Hexagon] Adding test to make sure labels and register pairs are correctly parsed.
llvm-svn: 252968
2015-11-12 22:54:14 +00:00
Richard Smith 4b213d73d8 Avoid duplicated diagnostic when lookup for a nested-name-specifier fails due to ambiguity.
llvm-svn: 252967
2015-11-12 22:40:09 +00:00
Chris Bieneman 14679e9f68 [CMake] [Darwin] Forcing -fPIC on for all darwin builtins except macho_embedded
We need to add -fPIC to the flags for the builtins in case PIC was turned off at a higher level. We also want to set ENABLE_PIC to Off when building the macho_embedded builtins so the top-level settings don't impact that build.

llvm-svn: 252966
2015-11-12 22:37:03 +00:00
Chris Bieneman 73d0562542 [CMake] [Darwin] [Builitins] Removing muloti4 from the blacklists for arm.
llvm-svn: 252965
2015-11-12 22:37:01 +00:00
Chris Bieneman 77e5eea728 [CMake] [Darwin] [Builtins] Sorting and uniquing blacklists. NFC.
llvm-svn: 252964
2015-11-12 22:36:57 +00:00
Jim Ingham 127be38fb8 Another little stepping optimization: if any of the source step commands are running through a range
of addresses, and the range has no branches, instead of running to the last instruction and
single-stepping over that, run to the first instruction after the end of the range.  If there
are no branches in the current range, then the bytes right after it have to be in the current
function, and have to be instructions not data in code, so this is safe.  And it cuts down one
extra stepi per source range step.

Incidentally, this also works around a bug in the llvm Intel assembler where it treats the "rep" 
prefix as a separate instruction from the repeated instruction.  If that were at the end of a
line range, then we would put a trap in place of the repeated instruction, which is undefined
behavior.  Current processors just ignore the repetition in this case, which changes program behavior.
Since there would never be a line range break after the rep prefix, always doing the range stepping 
to the beginning of the new range avoids this problem.

<rdar://problem/23461686>

llvm-svn: 252963
2015-11-12 22:32:09 +00:00
Sanjay Patel fbaf5a9534 specify triple and tighten checks using update_llc_test_checks.py
llvm-svn: 252962
2015-11-12 22:27:38 +00:00
NAKAMURA Takumi 525c4e0446 Mark clang/test/Driver/ms-bitfields.c as REQUIRES:clang-driver.
llvm-svn: 252961
2015-11-12 22:25:38 +00:00
Richard Smith 97135cc94a [modules] Simplify and generalize the existing rule for finding hidden
declarations in redeclaration lookup. A declaration is now visible to
lookup if:

 * It is visible (not in a module, or in an imported module), or
 * We're doing redeclaration lookup and it's externally-visible, or
 * We're doing typo correction and looking for unimported decls.

We now support multiple modules having different internal-linkage or no-linkage
definitions of the same name for all entities, not just for functions,
variables, and some typedefs. As previously, if multiple such entities are
visible, any attempt to use them will result in an ambiguity error.

This patch fixes the linkage calculation for a number of entities where we
previously didn't need to get it right (using-declarations, namespace aliases,
and so on).  It also classifies enumerators as always having no linkage, which
is a slight deviation from the C++ standard's definition, but not an observable
change outside modules (this change is being discussed on the -core reflector
currently).

This also removes the prior special case for tag lookup, which made some cases
of this work, but also led to bizarre, bogus "must use 'struct' to refer to type
'Foo' in this scope" diagnostics in C++.

llvm-svn: 252960
2015-11-12 22:19:45 +00:00
Richard Smith 990668b7d0 DR407: Rationalize how we handle tags being hidden by typedefs. Even with
DR407, the C++ standard doesn't really say how this should work. Here's what we
do (which is consistent with DR407 as far as I can tell):

 * When performing name lookup for an elaborated-type-specifier, a tag
   declaration hides a typedef declaration that names the same type.
 * When performing any other kind of lookup, a typedef declaration hides
   a tag declaration that names the same type.

In any other case where lookup finds both a typedef and a tag (that is, when
they name different types), the lookup will be ambiguous. If lookup finds a
tag and a typedef that name the same type, and finds anything else, the lookup
will always be ambiguous (even if the other entity would hide the tag, it does
not also hide the typedef).

llvm-svn: 252959
2015-11-12 22:04:34 +00:00
Reid Kleckner b8e3bff98a [Windows] Fix halt_on_error-1.c test on Windows with %env_asan_opts
llvm-svn: 252958
2015-11-12 21:58:28 +00:00
Richard Smith 5e3fb7616d Revert r240335.
This failed to solve the problem it was aimed at, and introduced just as many
issues as it resolved. Realistically, we need to deal with the possibility that
multiple modules might define different internal linkage symbols with the same
name, and this isn't a problem unless two such symbols are simultaneously
visible.

The case where two modules define equivalent internal linkage symbols is
handled by r252063: if lookup finds multiple sufficiently-similar entities from
different modules, we just pick one of them as an extension (but we keep them
separate).

llvm-svn: 252957
2015-11-12 21:55:58 +00:00
Tom Stellard 0967c91e0c Revert "Remove unnecessary call to getAllocatableRegClass"
This reverts commit r252565.

This also includes the revert of the commit mentioned below in order to
avoid breaking tests in AMDGPU:

Revert "AMDGPU: Set isAllocatable = 0 on VS_32/VS_64"

This reverts commit r252674.

llvm-svn: 252956
2015-11-12 21:43:25 +00:00
Richard Smith 03fd3915ee Additional tests from r252690 that I forgot to 'svn add'.
From a patch by Nicholas Allegra!

llvm-svn: 252955
2015-11-12 21:42:39 +00:00
Jonathan Peyton 90862c40ad Add debug trace message for hierarchical barrier
Trace when thread is waiting at join phase for oncore children.

llvm-svn: 252954
2015-11-12 21:40:39 +00:00
Jonathan Peyton d6c8de1ef2 Remove outdated comment
llvm-svn: 252953
2015-11-12 21:34:29 +00:00
Jonathan Peyton 00afbd01ad Fix for ittnotify loop reporting
Fix ittnotify loop metadata reporting for schedule(runtime) and
chunked schedule set via OMP_SCHEDULE. The bug was that chunk=1 
reported always.

llvm-svn: 252952
2015-11-12 21:26:22 +00:00
Akira Hatanaka f3aa82f666 Revert r252949.
It broke some of the bots including clang-x64-ninja-win7.

llvm-svn: 252951
2015-11-12 21:19:18 +00:00
Adrian McCarthy d9fa2b5487 Implement RegisterContext for Mini Dumps.
Differential Revision: http://reviews.llvm.org/D14591

llvm-svn: 252950
2015-11-12 21:16:15 +00:00
Akira Hatanaka 61b81a563a Provide a way to specify inliner's attribute compatibility and merging
rules using table-gen. NFC.

This commit adds new classes CompatRule and MergeRule to Attributes.td,
which are used to generate code to check attribute compatibility and
merge attributes of the caller and callee.

rdar://problem/19836465

llvm-svn: 252949
2015-11-12 20:59:43 +00:00
Sanjoy Das 53da2fe729 Revert r243347 "Add TargetTransformInfo::isZExtFree."
r243347 was intended to support a change to LSR (r243348).  That change
to LSR has since had to be reverted (r243939) because it was buggy, and
now the code added in r243347 is untested and unexercised.  Given that,
I think it is appropriate to revert r243347 for now, with the intent of
adding it back in later if I get around to checking in a fixed version
of r243348.

llvm-svn: 252948
2015-11-12 20:51:52 +00:00
Sanjoy Das e8b81649cf [ImplicitNulls] Fix wrapping by breaking up a condition, NFC
llvm-svn: 252947
2015-11-12 20:51:49 +00:00
Sanjoy Das edc394f1ed [ImplicitNull] Extract out a HazardDetector class, NFC
This will make later functional changes easier to follow.

llvm-svn: 252946
2015-11-12 20:51:44 +00:00
Mike Aizatsky ba8a5b1f91 disabling sancov tests: too many failures on different platforms.
Differential Revision: http://reviews.llvm.org/D14624

llvm-svn: 252945
2015-11-12 20:47:12 +00:00
Mike Aizatsky 67e3d651f5 sancov tests - platform independent separators
llvm-svn: 252943
2015-11-12 20:17:49 +00:00
Johannes Doerfert a4b77c079b [FIX] Bail if access function is not divisible by element size.
llvm-svn: 252942
2015-11-12 20:15:32 +00:00
Johannes Doerfert 55b3d8b831 Consistenly use getTypeAllocSize for size estimation.
Only when we check for wrapping we want to use the store size, for all
  other cases we use the alloc size now.

Suggested by: Tobias Grosser <tobias@grosser.es>

llvm-svn: 252941
2015-11-12 20:15:08 +00:00
Vyacheslav Klochkov 1ff9cbdfc0 My first/test commit. Removed a trailing whitespace.
llvm-svn: 252940
2015-11-12 20:11:57 +00:00
Zachary Turner 5b1ffdf674 Finish PyCallable -> PythonCallable conversion.
This finishes the effort to port python-wrapper.swig code over to
using PythonDataObjects.

Also included in this patch is the removal of `PyCallable` from
`python-wrapper.swig`, as it is no longer used after having been
replaced by `PythonCallable` everywhere.

There might be additional cleanup as followup patches, but it should
be all fairly simple and minor.

llvm-svn: 252939
2015-11-12 20:11:02 +00:00
Tobias Grosser 8241795d20 Revert "Fix bug 25440: GVN assertion after coercing loads"
This reverts 252919 which broke LNT: MultiSource/Applications/SPASS

llvm-svn: 252936
2015-11-12 20:04:21 +00:00
Rui Ueyama b2f6fc177c Early continue. NFC.
llvm-svn: 252935
2015-11-12 19:45:58 +00:00
Rui Ueyama 92ce0e9122 ELF2: Make type a bit stricter. NFC.
llvm-svn: 252934
2015-11-12 19:42:43 +00:00
Mike Aizatsky 14a06ac05e sancov test suite
Differential Revision: http://reviews.llvm.org/D14589

llvm-svn: 252933
2015-11-12 19:34:21 +00:00
Teresa Johnson ba5d68dfff [ThinLTO] Update test to be more tolerant of ordering changes
Update the ThinLTO function importing test to use DAG forms of checks so
that it is more tolerant of changes to relative ordering between
imported decls/defs. This reduces the number of changes required by the
comdat importing patch I am sending for review shortly.

llvm-svn: 252932
2015-11-12 19:31:46 +00:00
Benjamin Kramer 7c576d8bcf [Hexagon] Allocate MCInst in the MCContext to avoid leaking it.
Found by leaksanitizer.

llvm-svn: 252931
2015-11-12 19:30:40 +00:00
Evgeniy Stepanov 833c75e554 [asan] Mark halt_on_error-torture test unsupported on android.
Android libc is missing rand_r until API 21. ASan supports API 19.

llvm-svn: 252930
2015-11-12 19:30:38 +00:00
Chris Bieneman b3df467fc8 [CMake] [builtins] Removing a few non-source files from the arm list.
I was a little too aggressive about adding sources from the arm subdirectory.

llvm-svn: 252929
2015-11-12 19:27:29 +00:00
Chris Bieneman 7beed7eb6c [CMake] Actually adding the TODO comment I mentioned in r252927.
Turns out you need to save before committing.

llvm-svn: 252928
2015-11-12 19:17:05 +00:00
Chris Bieneman a2151fdceb [CMake] [builtins] Adding missing architecture-specific builtins.
Also added a TODO comment to make the build system throw an error if the CMakeLists gets out of sync again.

llvm-svn: 252927
2015-11-12 19:15:56 +00:00
Chad Rosier a548fe569b [LIR] Minor refactoring. NFCI.
This change prevents uninteresting stores from being inserted into the list of
candidate stores for memset/memcpy conversion.

llvm-svn: 252926
2015-11-12 19:09:16 +00:00
David Blaikie b0311c590d Roll an expression into an assert to fix -Wunused-variable in a -Asserts build
llvm-svn: 252925
2015-11-12 19:07:43 +00:00
Rui Ueyama 1a8fffa2fb ELF2: Simplify -z option handling. NFC.
llvm-svn: 252924
2015-11-12 19:00:37 +00:00
Rui Ueyama f5bcf2a72f ELF2: Print an error message for --relocatable.
llvm-svn: 252923
2015-11-12 18:54:15 +00:00
Dmitry Vyukov b8da794ca1 tsan: fix windows Go build
Go build does not link in whatever library provides these symbols:

# runtime/race
race_windows_amd64.syso:gotsan.cc:(.text+0x578f): undefined reference to `__sanitizer::DumpProcessMap()'
race_windows_amd64.syso:gotsan.cc:(.text+0xee33): undefined reference to `EnumProcessModules'
race_windows_amd64.syso:gotsan.cc:(.text+0xeeb9): undefined reference to `GetModuleInformation'

llvm-svn: 252922
2015-11-12 18:50:19 +00:00
Nathan Slingerland 911ced6bf3 reverting r252916 to investigate test failure
llvm-svn: 252921
2015-11-12 18:39:26 +00:00
James Y Knight 7aefb5b623 Correct atomic libcall support for __atomic_*_fetch builtins.
In r244063, I had caused these builtins to call the same-named library
functions, __atomic_*_fetch_SIZE. However, this was incorrect: while
those functions are in fact supported by GCC's libatomic, they're not
documented by the spec (and gcc doesn't ever call them).

Instead, you're /supposed/ to call the __atomic_fetch_* builtins and
then redo the operation inline to return the final value.

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

llvm-svn: 252920
2015-11-12 18:37:29 +00:00
Weiming Zhao eed0145dd2 Fix bug 25440: GVN assertion after coercing loads
Summary:
when coercing loads, it inserts some instructions, which have no GV assigned.

https://llvm.org/bugs/show_bug.cgi?id=25440


Reviewers: hfinkel, dberlin

Subscribers: dberlin, llvm-commits

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

llvm-svn: 252919
2015-11-12 18:19:59 +00:00
Quentin Colombet aeb85934b6 [ShrinkWrap] Fix a typo in a comment.
llvm-svn: 252918
2015-11-12 18:16:27 +00:00