Commit Graph

167320 Commits

Author SHA1 Message Date
Rafael Espindola 9e7a638be1 Use simpler version of sys::fs::exists when possible.
llvm-svn: 201289
2014-02-13 04:00:35 +00:00
Yunzhong Gao 5fd0c9d032 Fixing a compiler assertion with zero-width bit-fields in packed structs.
According to the GNU docs, zero-sized bitfields should not be affected by the
packed attribute.

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

llvm-svn: 201288
2014-02-13 02:45:10 +00:00
Hao Liu 4f345f3c03 [AArch64]Add support for spilling FPR8/FPR16.
llvm-svn: 201287
2014-02-13 02:36:58 +00:00
Reid Kleckner 22b19da9fc GlobalOpt: Aliases don't have sections, don't copy them when replacing
As defined in LangRef, aliases do not have sections.  However, LLVM's
GlobalAlias class inherits from GlobalValue, which means we can read and
set its section.  We should probably ban that as a separate change,
since it doesn't make much sense for an alias to have a section that
differs from its aliasee.

Fixes PR18757, where the section was being lost on the global in code
from Clang like:

extern "C" {
__attribute__((used, section("CUSTOM"))) static int in_custom_section;
}

Reviewers: rafael.espindola

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

llvm-svn: 201286
2014-02-13 02:18:36 +00:00
Reid Kleckner 6eaf05a4fd Really fix unused variable warnings in CIndex.
llvm-svn: 201285
2014-02-13 01:19:59 +00:00
Ed Maste 2a798d9c05 Remove decorator for fixed test
llvm.org/pr18805 fixed by r201270

llvm-svn: 201284
2014-02-13 01:10:20 +00:00
NAKAMURA Takumi dea00df279 [CMake] llvm_add_library: Add handling of the parameter ADDITIONAL_HEADERS to pass through to process_source.
I was insightless then about unknown optional parameters.
(Consider that LINK_LIBS foo bar ADDITIONAL_HEADERS qux quux)

Suggested by Michael Kruse. Thanks!

llvm-svn: 201283
2014-02-13 01:00:52 +00:00
John McCall 76e1818a2b ms_struct layout replaces platform-specific behavior like
useBitFieldTypeAlignment() and appears to ignore the special
bit-packing semantics of __attribute__((packed)).

Further flesh out an already-extensive comment.

llvm-svn: 201282
2014-02-13 00:50:08 +00:00
John McCall 5d4d61f64f Change testcase to use FileCheck.
llvm-svn: 201281
2014-02-13 00:50:02 +00:00
Reid Kleckner a4b3b2d715 Fix uninitialized read in vtordisp pragma code.
llvm-svn: 201280
2014-02-13 00:44:34 +00:00
Lang Hames 5803c24f1f Fix misleading comment.
llvm-svn: 201279
2014-02-13 00:31:14 +00:00
Reid Kleckner f50dc56baa Fix some -Wdocumentation warnings in Sema.h and try to fix test for win64
llvm-svn: 201278
2014-02-13 00:22:04 +00:00
Lang Hames e125f5bb0e The new MCJIT C-API unit test is generating objects without constant data
sections, at least on MachO. Relax expectations to keep the bots green while I
investigate. 

llvm-svn: 201277
2014-02-13 00:16:36 +00:00
Reid Kleckner fd48fc6d33 Silence unused variable warning in CIndex.cpp with NDEBUG
llvm-svn: 201276
2014-02-12 23:56:20 +00:00
Owen Anderson 883b5add8e Remove a very old instcombine where we would turn sequences of selects into
logical operations on the i1's driving them.  This is a bad idea for every
target I can think of (confirmed with micro tests on all of: x86-64, ARM,
AArch64, Mips, and PowerPC) because it forces the i1 to be materialized into
a general purpose register, whereas consuming it directly into a select generally
allows it to exist only transiently in a predicate or flags register.

Chandler ran a set of performance tests with this change, and reported no
measurable change on x86-64.

llvm-svn: 201275
2014-02-12 23:54:07 +00:00
Reid Kleckner c0dca6ded7 MS ABI: Implement #pragma vtordisp() and clang-cl /vdN
These features are new in VS 2013 and are necessary in order to layout
std::ostream correctly.  Currently we have an ABI incompatibility when
self-hosting with the 2013 stdlib in our convertible_fwd_ostream wrapper
in gtest.

This change adds another implicit attribute, MSVtorDispAttr, because
implicit attributes are currently the best way to make sure the
information stays on class templates through instantiation.

Reviewers: majnemer

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

llvm-svn: 201274
2014-02-12 23:50:26 +00:00
Greg Clayton c7d8885be4 Fixed the TestLogging test.
llvm-svn: 201273
2014-02-12 23:46:08 +00:00
Andrea Di Biagio b7882b3bd1 [Vectorizer] Add a new 'OperandValueKind' in TargetTransformInfo called
'OK_NonUniformConstValue' to identify operands which are constants but
not constant splats.

The cost model now allows returning 'OK_NonUniformConstValue'
for non splat operands that are instances of ConstantVector or
ConstantDataVector.

With this change, targets are now able to compute different costs
for instructions with non-uniform constant operands.
For example, On X86 the cost of a vector shift may vary depending on whether
the second operand is a uniform or non-uniform constant.

This patch applies the following changes:
 - The cost model computation now takes into account non-uniform constants;
 - The cost of vector shift instructions has been improved in
   X86TargetTransformInfo analysis pass;
 - BBVectorize, SLPVectorizer and LoopVectorize now know how to distinguish
   between non-uniform and uniform constant operands.

Added a new test to verify that the output of opt
'-cost-model -analyze' is valid in the following configurations: SSE2,
SSE4.1, AVX, AVX2.

llvm-svn: 201272
2014-02-12 23:43:47 +00:00
Andrea Di Biagio 386d566395 [X86] Teach the backend how to lower vector shift left into multiply rather than scalarizing it.
Instead of expanding a packed shift into a sequence of scalar shifts,
the backend now tries (when possible) to convert the vector shift into a
vector multiply.

Before this change, a shift of a MVT::v8i16 vector by a
build_vector of constants was always scalarized into a long sequence of "vector
extracts + scalar shifts + vector insert".
With this change, if there is SSE2 support, we emit a single vector multiply.

This change also affects SSE4.1, AVX, AVX2 shifts:
 - A shift of a MVT::v4i32 vector by a build_vector of non uniform constants
is now lowered when possible into a single SSE4.1 vector multiply.
 - Packed v16i16 shift left by constant build_vector are now expanded when
possible into a single AVX2 vpmullw.
This change also improves the lowering of AVX512f vector shifts.

Added test CodeGen/X86/vec_shift6.ll with some code examples that are affected
by this change.

llvm-svn: 201271
2014-02-12 23:42:28 +00:00
Greg Clayton fdde7ccf37 Fixed the functionalities/abbreviation/TestAbbreviations.py test case.
llvm-svn: 201270
2014-02-12 23:40:31 +00:00
Hans Wennborg 5a9ad23d38 VS Integration: install toolsets for x64 too (PR18738)
This does exactly the same thing as for Win32, except it passes -m64 to
the compiler and the files go in a different directory.

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

llvm-svn: 201269
2014-02-12 23:26:29 +00:00
Greg Clayton 7a1bd0baa1 Add support for DW_OP_piece and DW_OP_bit_piece.
llvm-svn: 201268
2014-02-12 23:16:19 +00:00
David Blaikie 3c7e961b29 DebugInfo: Demonstrate that we're not currently uniquing address table entries in fission
Since I just discovered this while poking at other things, here's the
test case so I have it to come back to later.

llvm-svn: 201267
2014-02-12 23:03:54 +00:00
David Blaikie 23afec97ba DebugInfo: Merge fission and non-fission (and 32 and 64 bit) tests for TLS support.
llvm-svn: 201266
2014-02-12 23:03:51 +00:00
Eric Christopher d0d5bba185 Reformat a few lines with clang-format.
llvm-svn: 201265
2014-02-12 22:47:09 +00:00
Eric Christopher 89a575cbdc 80-col.
llvm-svn: 201264
2014-02-12 22:38:04 +00:00
Juergen Ributzka d1777cc344 [Stackmaps] Improve the stackmap lowering code in the SelectionDAGBuilder.
We are now no longer relying on the target-specific call lowering implementation
to lower a stackmap intrinsic call. Instead we perform the call lowering in a
target-independent way directly in the stackmap lowering code. This simplifies
the code and removes the need to fixup the code after the target-specific call
lowering.

llvm-svn: 201263
2014-02-12 22:17:13 +00:00
Juergen Ributzka aa30da30bb [Stackmaps] Fix the ID type to be i64 also for stackmaps (as we claim in the documenation)
The ID type for the stackmap and patchpoint intrinsics are in both cases i64.
This fixes an zero extend in the SelectionDAGBuilder that still used i32. This
also updates the target independent instructions STACKMAP and PATCHPOINT to use
the correct type.

llvm-svn: 201262
2014-02-12 22:17:10 +00:00
Rafael Espindola 7f04511267 Don't try to build ExceptionDemo on ARM.
The demo uses _Unwind_GetIP which is not available on that platform.

llvm-svn: 201261
2014-02-12 21:47:15 +00:00
Hans Wennborg fbf3bb6cf0 Remove FIXME and hardcoded triple from this test (PR18251)
We don't support using the MS ABI with non-x86/x86_64 targets anyway.

llvm-svn: 201260
2014-02-12 21:40:46 +00:00
Lang Hames 937ec54951 Extend RTDyld API to enable optionally precomputing the total amount of memory
required for all sections in a module. This can be useful when targets or
code-models place strict requirements on how sections must be laid out
in memory.

If RTDyldMemoryManger::needsToReserveAllocationSpace() is overridden to return
true then the JIT will call the following method on the memory manager, which
can be used to preallocate the necessary memory.

void RTDyldMemoryManager::reserveAllocationSpace(uintptr_t CodeSize,
                                                 uintptr_t DataSizeRO,
                                                 uintptr_t DataSizeRW)

Patch by Vaidas Gasiunas. Thanks very much Viadas!

llvm-svn: 201259
2014-02-12 21:30:07 +00:00
Reid Kleckner d59e2faae1 Rename Windows.h to WindowsSupport.h to avoid ambiguity
llvm-svn: 201258
2014-02-12 21:26:20 +00:00
Benjamin Kramer c6a1a16deb Remove unused diagnostic.
llvm-svn: 201257
2014-02-12 21:25:40 +00:00
Jordan Rose 68db107c81 [examples] Use loadable modules instead of shared libraries for Clang plugins.
This avoids linking in extra copies of, say, LLVMSupport.

llvm-svn: 201256
2014-02-12 21:04:23 +00:00
David Fang 6860c819f4 _CS_DARWIN_USER macros available on darwin>=9. Thanks, Dave Odell!
llvm-svn: 201255
2014-02-12 21:02:12 +00:00
David Majnemer abecae741c Sema: Restrict alignment to 2**28.
Allowing alignment past this point causes wrap around within clang.

N.B.  GCC has the same restriction.

llvm-svn: 201254
2014-02-12 20:36:10 +00:00
Adrian Prantl 7199fd532c Debug info: Bugfix for r201190: DW_OP_piece takes bytes, not bits.
rdar://problem/16015314

llvm-svn: 201253
2014-02-12 19:34:44 +00:00
Sergey Matveev 2a01b2f86f [sanitizer] Intercept capget()/capset().
Also, fix incorrect syscall hooks for the corresponding syscalls.

llvm-svn: 201252
2014-02-12 19:29:49 +00:00
Reid Kleckner f06b266bfa Attributes: Avoid a big useless copy in the emitter
llvm-svn: 201251
2014-02-12 19:26:24 +00:00
Adrian Prantl 375fddcf5c relax testcase and make ppc64 buildbots happy.
llvm-svn: 201250
2014-02-12 19:26:19 +00:00
Dmitri Gribenko ea4d1c32fb libclang: report error code for bad PCH files
This commit improves libclang to report the error condition when
CXTranslationUnit can not be created because of a stale PCH file.  This allows
the caller, for example, to rebuild the PCH file and retry the request.

There two are APIs in libclang that return a CXTranslationUnit and don't
support reporting detailed errors (the only error condition is a NULL result).
For these APIs, a second, superior, version is introduced --
clang_createTranslationUnit2 and clang_parseTranslationUnit2.  These functions
return a CXTranslationUnit indirectly and also return an error code.  Old
functions are still supported and are nothing more than convenience wrappers
that ignore extended error codes.

As a cleanup, this commit also categorizes some libclang errors in the
functions I had to modify anyway.

llvm-svn: 201249
2014-02-12 19:12:37 +00:00
Adrian Prantl 2039d44603 Document and improve the debug-property-synth.m test based on the
information provided in the referenced radar.

llvm-svn: 201248
2014-02-12 18:24:07 +00:00
Adrian Prantl ab340334dc Revert "Remove bad debug info test."
This reverts commit r201183.
The test, albeit undocumented and badly written is still testing something
useful. It will be updated in a subsequent commit.

llvm-svn: 201247
2014-02-12 18:24:04 +00:00
Reid Kleckner f526b94858 Attributes: Emit enumerators in td file declaration order
llvm-svn: 201246
2014-02-12 18:22:18 +00:00
Akira Hatanaka a07ffb5b31 Pass edges weights to MachineBasicBlock::addSuccessor in TailDuplicatePass to
preserve branch probability information.

<rdar://problem/15893208>

llvm-svn: 201245
2014-02-12 18:09:18 +00:00
Todd Fiala 027baff8a0 Change TestAbbreviations test to expected failure on Linux.
See http://llvm.org/bugs/show_bug.cgi?id=18816.
Likely the same issue as http://llvm.org/bugs/show_bug.cgi?id=18805.

llvm-svn: 201244
2014-02-12 17:50:26 +00:00
Renato Golin c2ae1b1b41 PC-rel implemented in AArch64, test now pass
llvm-svn: 201243
2014-02-12 17:17:41 +00:00
Eli Bendersky 54dc283979 Move more self-contained functionality away from tools/opt/opt.cpp
BreakpointPrinter moves to its own module.

llvm-svn: 201242
2014-02-12 16:48:02 +00:00
Daniel Sanders abe212a3b8 Revert r201237+r201238: Demote EmitRawText call in AsmPrinter::EmitInlineAsm() and remove hasRawTextSupport() call
It introduced multiple test failures in the buildbots.

llvm-svn: 201241
2014-02-12 15:39:20 +00:00
Evgeniy Stepanov 8ab205fb74 [asan] Handle OpenFile errors in CovDump.
llvm-svn: 201240
2014-02-12 15:29:22 +00:00