Commit Graph

166351 Commits

Author SHA1 Message Date
Adrian Prantl c67655a7f4 typo
llvm-svn: 200323
2014-01-28 18:13:47 +00:00
Rafael Espindola ab73c493ea Fix pr14893.
When simplifycfg moves an instruction, it must drop metadata it doesn't know
is still valid with the preconditions changes. In particular, it must drop
the range and tbaa metadata.

The patch implements this with an utility function to drop all metadata not
in a white list.

llvm-svn: 200322
2014-01-28 16:56:46 +00:00
Aaron Ballman 6eca4eff19 The llvm_headers_do_not_build project needs to be excluded from the default build, otherwise it gets built (at least in Visual Studio 2013).
Thanks to chapuni200000 for help with this in IRC!

llvm-svn: 200321
2014-01-28 16:07:10 +00:00
Daniel Jasper e9beea24ef clang-format: Add support for a space after @property
Mozilla and WebKit seem to use a space after @property (verified by
grepping their codebases) so we turn this on there as well.

Change by Christian Legnitto. Thank you!

llvm-svn: 200320
2014-01-28 15:20:33 +00:00
Alexander Potapenko b0930f5c04 [ASan] Reinstate ASAN_LOW_MEMORY, which has nothing to do with signal handling and thus should not be moved to common.
llvm-svn: 200319
2014-01-28 14:17:16 +00:00
Alexander Potapenko 31e24962f4 [ASan] Remove an accidentally added include of signal.h
llvm-svn: 200318
2014-01-28 14:10:06 +00:00
Joerg Sonnenberger 05d8a22cf6 Cache invalidation for AARCH64. Disabled for Apple for now as requested
by Tim Northover. Written by Matt Thomas.

Differential Revision: http://llvm-reviews.chandlerc.com/D2631

llvm-svn: 200317
2014-01-28 14:02:22 +00:00
Sergey Matveev 1394f2da85 [msan] Rewrite strto* interceptors and add a few more.
Express the strto* interceptors though macros. This removes a lot of
duplicate code and fixes a couple of copypasto bugs (where "res" was declared of
a different type than the actual return type). Also, add a few more interceptors
for strto*_l.

llvm-svn: 200316
2014-01-28 13:45:58 +00:00
Tobias Grosser ab2227a505 Do not verify the base addresses
Verification of base addresses is difficult as the independent blocks pass may
introduce aliasing that was not there during scop detection. As a midterm
solution -polly-codegen-scev will remove the need for the independent blocks
pass. For now, we do not verify at compile time that the independent blocks pass
does not make the base addresses loop invariant. Disabling this just removes
one of the multiple safety layers we have. We still can check for correctness
in our regression tests.

llvm-svn: 200315
2014-01-28 13:43:24 +00:00
Tobias Grosser 458fb78cfa Check if array base addresses are invariant
Array base addresses need to be invariant in the region considered. The base
address has to be computed outside the region, or, when it is computed inside,
the value must not change with the iterations of the loops. For example, when a
two-dimensional array is represented as a pointer to pointers the base address
A[i] in an access A[i][j] changes with i; therefore, such regions have to be
rejected.

Contributed by:  Armin Größlinger <armin.groesslinger@uni-passau.de>

llvm-svn: 200314
2014-01-28 12:58:58 +00:00
Andrea Di Biagio b6d39afbda [DAGCombiner] Avoid introducing an illegal build_vector when folding a sign_extend.
Make sure that we don't introduce illegal build_vector dag nodes
when trying to fold a sign_extend of a build_vector.

This fixes a regression introduced by r200234.
Added test CodeGen/X86/fold-vector-sext-crash.ll
to verify that llc no longer crashes with an assertion failure
due to an illegal build_vector of type MVT::v4i64.

Thanks to Ilia Filippov for spotting this regression and for
providing a reproducible test case.

llvm-svn: 200313
2014-01-28 12:53:56 +00:00
Alexander Potapenko 77f5c20a5b [ASan] Fix compilation.
llvm-svn: 200312
2014-01-28 12:23:14 +00:00
NAKAMURA Takumi b524c2227e [CMake] llvm_update_compile_flags(name) doesn't require source files. TARGET PROPERTY SOURCES has them.
llvm-svn: 200311
2014-01-28 11:40:04 +00:00
Alexander Potapenko d8d490ed50 [ASan] Move the sigaltstack() bits to sanitizer_common.
This change is a part of refactoring intended to have common signal handling behavior in all tools.
Note that this particular change doesn't enable use_sigaltstack support in every tool.

llvm-svn: 200310
2014-01-28 11:12:29 +00:00
Iain Sandoe 625b65a90c Provide a stub Target Streamer implementation for PPC MachO
At present, this handles .tc (error) and needs to be expanded to deal properly with .machine

llvm-svn: 200309
2014-01-28 11:03:17 +00:00
Dmitry Vyukov dc96a0fada tsan: remove interceptor stats
They seems to be unused, but cause maintenance pain.

llvm-svn: 200308
2014-01-28 11:02:04 +00:00
Amara Emerson 9dc7878ac5 [ARM] Fix AAPCS-VFP non-compliance when returning HFA from variadic functions.
Arguments and return values must always be marshalled as for the base
AAPCS when the callee is a variadic function.

Patch by Oliver Stannard!

llvm-svn: 200307
2014-01-28 10:56:36 +00:00
NAKAMURA Takumi 4162034bb5 [CMake] Apply llvm_update_compile_flags() in add_lld_library().
Sorry for the breakage.

llvm-svn: 200306
2014-01-28 10:45:37 +00:00
Tobias Grosser 5b5daab9f1 Add more test cases to check loop invariance of the base pointer.
llvm-svn: 200305
2014-01-28 10:29:17 +00:00
Dmitry Vyukov 7c9621c0be tsan: relax checking of errno spoiling in signal handlers
allow SIGABRT to spoil errno, because some real programs
reset SIGABRT handler in the handler, re-raise SIGABRT and return from the handler

llvm-svn: 200304
2014-01-28 09:49:48 +00:00
NAKAMURA Takumi 00d0a2a90d [CMake] Prune CMAKE_CXX_FLAGS stuff in llvm_process_sources.
It is the final step to deprecate contextual CMAKE_CXX_FLAGS.

llvm-svn: 200303
2014-01-28 09:48:19 +00:00
NAKAMURA Takumi 89f7eaebe5 [CMake] Apply llvm_update_compile_flags() to add_clang_library().
llvm-svn: 200302
2014-01-28 09:47:12 +00:00
NAKAMURA Takumi a679f43f4e [CMake] Enhance llvm_update_compile_flags(name sources) to handle LLVM_REQUIRES_EH and LLVM_REQUIRES_RTTI.
LLVM_REQUIRES_EH implies LLVM_REQUIRES_RTTI. It is as same behavior as Makefile.rule's.
llvm/examples/ExceptionDemo is affected. (It was built with -fno-rtti.)

For MSVC, Remove flags like "/EHsc /GR" in HandleLLVMOptions, or CL.EXE complains with flags like "/GR /GR-".

llvm_update_compile_flags() updates source file property if the target contains *.c.
COMPILE_FLAGS in target properties affects both C++ and C!

LLVM_NO_RTTI is deprecated. It was introduced by me and was my mistake.

llvm-svn: 200301
2014-01-28 09:44:06 +00:00
NAKAMURA Takumi e20725b8da [CMake] Apply -ffunction-data-sectinos not only to CMAKE_CXX_FLAGS, but also to CMAKE_C_FLAGS.
llvm-svn: 200300
2014-01-28 09:44:00 +00:00
NAKAMURA Takumi bb50bceb06 [CMake] Move -ffunction-data-sections stuff to HandleLLVMOptions.
With this tweaks, also unittests are compiled with -ffunction-sections.

It's hard to control contextual CMAKE_CXX_FLAGS. We should get rid of twiddling it as possible.

llvm-svn: 200299
2014-01-28 09:43:55 +00:00
NAKAMURA Takumi db441f68b6 [CMake] Let llvm_process_sources check not only *.cpp but also *.c.
llvm-svn: 200298
2014-01-28 09:43:49 +00:00
NAKAMURA Takumi 0ff6f49028 [CMake] Put lli-child-target into the Folder "Misc".
llvm-svn: 200297
2014-01-28 09:43:41 +00:00
NAKAMURA Takumi 11387c9621 [CMake] clangStaticAnalyzerFrontend: Deprecate LLVM_NO_RTTI.
llvm-svn: 200296
2014-01-28 09:43:16 +00:00
Alexander Potapenko cf4bef3161 [ASan] Move the signal handling-related flags to sanitizer_common.
This change is a part of refactoring intended to have common signal handling behavior in all tools.

llvm-svn: 200295
2014-01-28 09:28:57 +00:00
Chandler Carruth b783628560 [vectorizer] Completely disable the block frequency guidance of the loop
vectorizer, placing it behind an off-by-default flag.

It turns out that block frequency isn't what we want at all, here or
elsewhere. This has been I think a nagging feeling for several of us
working with it, but Arnold has given some really nice simple examples
where the results are so comprehensively wrong that they aren't useful.

I'm planning to email the dev list with a summary of why its not really
useful and a couple of ideas about how to better structure these types
of heuristics.

llvm-svn: 200294
2014-01-28 09:10:41 +00:00
Evgeniy Stepanov 0b09c623c1 [msan] Replace assert() with GTest ASSERT_* in msan_test.
llvm-svn: 200293
2014-01-28 08:51:39 +00:00
Nick Lewycky 8993f26550 Clarify. Thanks to Sean Silva and Warren Hunt for help wordsmithing!
llvm-svn: 200292
2014-01-28 07:03:46 +00:00
Alexey Samsonov b80effdfe1 Fix this test and don't run it in ASan bootstrap
llvm-svn: 200291
2014-01-28 06:59:32 +00:00
Alexey Bataev 40e7522ebd Turn on PIC by default on Android (http://llvm-reviews.chandlerc.com/D2603)
llvm-svn: 200290
2014-01-28 06:30:35 +00:00
Nick Lewycky b05a8440cc Fix always-false conditional thinko in documentation.
llvm-svn: 200289
2014-01-28 06:20:56 +00:00
Hal Finkel 4e703bcecd Handle spilling the PPC GPRC_NOR0 register class
GPRC_NOR0 is not a subclass of GPRC (because it also contains the ZERO pseudo
register). As a result, we also need to check for it in the spilling code.

llvm-svn: 200288
2014-01-28 05:32:58 +00:00
Craig Topper 74169dcf45 Improve handling of EnforceSmallerThan. Remove all types that are smaller from the larger set not just the smallest type from the smaller set. Ensure 'smaller' vectors have the same or fewer total bits. Similar for 'larger' vectors.
llvm-svn: 200287
2014-01-28 04:49:01 +00:00
Timur Iskhodzhanov 31377c5492 MC: Add a .debug section that we'll soon use to emit debug info into COFF files
llvm-svn: 200285
2014-01-28 03:48:44 +00:00
Michel Danzer bf1a641060 R600/SI: Add pattern for truncating i32 to i1
Fixes half a dozen piglit tests with radeonsi.

Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
llvm-svn: 200283
2014-01-28 03:01:16 +00:00
Jakob Stoklund Olesen 83c677353b Fix the DWARF EH encodings for Sparc PIC code.
Also emit the stubs that were generated for references to typeinfo
symbols.

llvm-svn: 200282
2014-01-28 02:52:26 +00:00
Reid Kleckner 26af2cae05 Update optimization passes to handle inalloca arguments
Summary:
I searched Transforms/ and Analysis/ for 'ByVal' and updated those call
sites to check for inalloca if appropriate.

I added tests for any change that would allow an optimization to fire on
inalloca.

Reviewers: nlewycky

Differential Revision: http://llvm-reviews.chandlerc.com/D2449

llvm-svn: 200281
2014-01-28 02:38:36 +00:00
Reid Kleckner 020acd88ec Test case for clobbers on cpuid in ms inline asm
Tests r200279 in LLVM.

llvm-svn: 200280
2014-01-28 02:09:28 +00:00
Reid Kleckner b2340d4c8c x86: add implicit defs for cpuid
This avoids miscompiling MS inline asm in LLVM where we have to infer
clobbers.  Test case forthcoming in Clang.

llvm-svn: 200279
2014-01-28 02:08:22 +00:00
Rui Ueyama 4aaba3e220 [PECOFF] Replace magic numbers with sizeof.
llvm-svn: 200278
2014-01-28 01:55:37 +00:00
Aaron Ballman 54fe5eb8cb Relaxing the alignment requirements for fields in a transparent_union. Emits the diagnostic only when subsequent alignments are more strict than the alignment required by the first field.
Fixes PR15134

llvm-svn: 200277
2014-01-28 01:47:34 +00:00
Rui Ueyama bdc2fc3635 [PECOFF] Convert more binary files to YAML.
Because the object files are now readable to humans, I don't think we need the
source assembly file any more, so I removed them too in this commit.

llvm-svn: 200276
2014-01-28 01:41:39 +00:00
Rui Ueyama 6d3fee23e3 [PECOFF] Remove a redundant test.
peplus.test and pe32plus.test basically covered the same thing, so
remove pe32plus.test and then rename peplus.test -> pe32plus.test.

llvm-svn: 200275
2014-01-28 01:36:13 +00:00
Rui Ueyama dc2f00eead [PECOFF] Convert a object file to YAML to remove a binary file from SVN.
llvm-svn: 200274
2014-01-28 01:32:33 +00:00
Chandler Carruth d84f776e8a [LPM] Fix PR18616 where the shifts to the loop pass manager to extract
LCSSA from it caused a crasher with the LoopUnroll pass.

This crasher is really nasty. We destroy LCSSA form in a suprising way.
When unrolling a loop into an outer loop, we not only need to restore
LCSSA form for the outer loop, but for all children of the outer loop.
This is somewhat obvious in retrospect, but hey!

While this seems pretty heavy-handed, it's not that bad. Fundamentally,
we only do this when we unroll a loop, which is already a heavyweight
operation. We're unrolling all of these hypothetical inner loops as
well, so their size and complexity is already on the critical path. This
is just adding another pass over them to re-canonicalize.

I have a test case from PR18616 that is great for reproducing this, but
pretty useless to check in as it relies on many 10s of nested empty
loops that get unrolled and deleted in just the right order. =/ What's
worse is that investigating this has exposed another source of failure
that is likely to be even harder to test. I'll try to come up with test
cases for these fixes, but I want to get the fixes into the tree first
as they're causing crashes in the wild.

llvm-svn: 200273
2014-01-28 01:25:38 +00:00
Rui Ueyama a709af2861 s/0/nullptr/
llvm-svn: 200272
2014-01-28 01:22:23 +00:00