Commit Graph

163918 Commits

Author SHA1 Message Date
Greg Clayton 2553e49a5d Added missing header files to the Xcode project.
llvm-svn: 197527
2013-12-17 21:42:58 +00:00
Rafael Espindola 8c08120dba On APCS, only try to align aggregates to 32 bits instead of 64.
This matches clang's behavior and since it is only a preference, it is not
an ABI issue.

llvm-svn: 197526
2013-12-17 21:36:54 +00:00
Aaron Ballman f2db7626f0 None of these attributes currently make use of an AST node, so setting ASTNode = 0 to reduce complexity. No functional change intended.
llvm-svn: 197525
2013-12-17 21:35:24 +00:00
Rafael Espindola 9704fd03d1 Handle i64 first for clarity. No functionality change.
llvm-svn: 197524
2013-12-17 21:28:36 +00:00
Nico Weber 5f513f9b4a Add mangling macros for Unwind's inline assembly.
This is in preparation for landing an implementation of unw_getcontext
on a system where it's mangled 'unw_getcontext', not '_unw_getcontext'.

llvm-svn: 197523
2013-12-17 21:07:53 +00:00
Rafael Espindola 07eeb29386 Use triples that match the -target-abi option.
llvm-svn: 197522
2013-12-17 21:01:22 +00:00
Roman Divacky 78589ecd50 Use the integrated assembler by default on FreeBSD/ppc and ppc64.
llvm-svn: 197521
2013-12-17 20:34:25 +00:00
Duncan P. N. Exon Smith ab5dbebc11 Assert that the last operand is actually EFLAGS
This is another follow-up to r197503, after a post-commit review by
Andy.

<rdar://problem/15627766>

llvm-svn: 197520
2013-12-17 20:28:21 +00:00
Reid Kleckner 89077a1b00 [ms-cxxabi] The 'most derived' ctor parameter usually comes last
Unlike Itanium's VTTs, the 'most derived' boolean or bitfield is the
last parameter for non-variadic constructors, rather than the second.
For variadic constructors, the 'most derived' parameter comes after the
'this' parameter.  This affects constructor calls and constructor decls
in a variety of places.

Reviewers: timurrrr

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

llvm-svn: 197518
2013-12-17 19:46:40 +00:00
Dmitri Gribenko f869ad15a3 Documentation comment parsing: rearrange tests to clarify the intent of these tests
llvm-svn: 197517
2013-12-17 19:45:12 +00:00
Hans Wennborg 33104c40ef Fix line endings in microsoft-dtor-lookup-cxx11.cpp
llvm-svn: 197516
2013-12-17 19:39:18 +00:00
Fariborz Jahanian bd714e9bb1 Objective-C. Make diagnostics and fix-its consistent
when diagnosing casting of a cstring literal to
NSString in default and -fobjc-arc mode. 
// rdar://14106083

llvm-svn: 197515
2013-12-17 19:33:43 +00:00
Andrew Trick e4083f9e85 Disabled subregister copy coalescing during MachineCSE.
This effectively backs out r197465 but leaves some of the general
fixes in place. Not all targets are ready to handle this feature. To
enable it, some infrastructure work is needed to better handle
register class constraints.

llvm-svn: 197514
2013-12-17 19:29:36 +00:00
Dmitri Gribenko 110dfa81fd Fix strange indentation and remove trailing whitespace on empty lines
llvm-svn: 197513
2013-12-17 19:28:18 +00:00
Sergey Matveev 149b794ec6 [lsan] Remove the LSan-specific verbosity flag.
It conflicted with the verbosity flag we had in common flags. We don't need an
LSan-specific flag anyway.

Also, shift some logging levels and remove some unnecessary code.

llvm-svn: 197512
2013-12-17 18:18:32 +00:00
Alp Toker de50ff3c4b Bring order to the OpenCL keywords
Avoid the gratuitous repurposing of C++ keyword 'private' by using a keyword
alias.

Also attempt to document the OpenCL keywords based on scraps of information
found online.

The purpose of this commit is to reduce impact on the C++ parser.

llvm-svn: 197511
2013-12-17 18:17:46 +00:00
Sergey Matveev b5769dbb86 [lsan] Introduce print_suppressions flag.
Introduce a flag to either always or never print matched suppressions.
Previously, matched suppressions were printed unconditionally if there were
unsuppressed leaks. Also, verbosity=1 no longer has the semantics of "always
print suppressions and summary".

llvm-svn: 197510
2013-12-17 18:01:45 +00:00
Hans Wennborg e955e3998f [ms-cxxabi] Don't do destructor check on declarations if the dtor is deleted
We would previously emit redundant diagnostics for the following code:

  struct S {
    virtual ~S() = delete;
    void operator delete(void*, int);
    void operator delete(void*, double);
  } s;

First we would check on ~S() and error about the ambigous delete functions,
and then we would error about using the deleted destructor.

If the destructor is deleted, there's no need to check it.

Also, move the check from Sema::ActOnFields to CheckCompleteCXXClass. These
are run at almost the same time, called from ActOnFinishCXXMemberSpecification.
However, CHeckCompleteCXXClass may mark a defaulted destructor as deleted, and
if that's the case we don't want to check it.

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

llvm-svn: 197509
2013-12-17 17:49:22 +00:00
Quentin Colombet b4c44d239c Add warning capabilities in LLVM.
This reapplies r197438 and fixes the link-time circular dependency between
IR and Support. The fix consists in moving the diagnostic support into IR.

The patch adds a new LLVMContext::diagnose that can be used to communicate to
the front-end, if any, that something of interest happened.
The diagnostics are supported by a new abstraction, the DiagnosticInfo class.
The base class contains the following information:
- The kind of the report: What this is about.
- The severity of the report: How bad this is.

This patch also adds 2 classes:
- DiagnosticInfoInlineAsm: For inline asm reporting. Basically, this diagnostic
will be used to switch to the new diagnostic API for LLVMContext::emitError.
- DiagnosticStackSize: For stack size reporting. Comes as a replacement of the
hard coded warning in PEI.

This patch also features dynamic diagnostic identifiers. In other words plugins
can use this infrastructure for their own diagnostics (for more details, see
getNextAvailablePluginDiagnosticKind).

This patch introduces a new DiagnosticHandlerTy and a new DiagnosticContext in
the LLVMContext that should be set by the front-end to be able to map these
diagnostics in its own system.

http://llvm-reviews.chandlerc.com/D2376
<rdar://problem/15515174>

llvm-svn: 197508
2013-12-17 17:47:22 +00:00
Alp Toker b164a349f9 Fix indentation from r197490 plus some typos
llvm-svn: 197507
2013-12-17 17:25:19 +00:00
Matheus Almeida 8cc8b35a73 [mips] Fix off by one issue when applying a fixup.
The branch offset for a R_MIPS_PC16 relocation is indeed a 16-bit signed
immediate.

llvm-svn: 197506
2013-12-17 17:10:00 +00:00
Duncan P. N. Exon Smith 93c6ba6ae8 Setting the CPU in the new vaargs test
Trying to fix buildbots after r197503 (test passes locally).

<rdar://problem/15627766>

llvm-svn: 197505
2013-12-17 16:20:37 +00:00
Rafael Espindola f034b6e4c2 Remove -f128:128 from the DataLayout strings. It is the default.
llvm-svn: 197504
2013-12-17 16:07:35 +00:00
Duncan P. N. Exon Smith 512601d77f Revert "Revert "Mark vastart_save_xmm_regs as changing EFLAGS""
This reverts commit r197481, recommiting r197469 with an extra fix.

The vastart_save_xmm_regs pseudo-instruction expands to a test and a
branch, so it modifies EFLAGS.  Mark it so, or else the scheduler might
place it in the middle of another test+branch.

This fixes a bug exposed by r192750, which changed the initial scheduler
to source-order as part of enabling the MI Scheduler for X86.

This re-commit changes the VASTART_SAVE_XMM_REGS custom inserter not to
try to save %flags, and adds a test that catches the bad behavior of
r197469.

<rdar://problem/15627766>

llvm-svn: 197503
2013-12-17 15:54:45 +00:00
Rafael Espindola 12256302cf The PS3 is a ppc64 and has 64 bit registers. Update DataLayout accordingly.
llvm-svn: 197502
2013-12-17 15:40:00 +00:00
Rafael Espindola 345d718d16 Fix the pointer size for the PS3 datalayout.
This will be tested from clang.

llvm-svn: 197501
2013-12-17 15:29:48 +00:00
Rafael Espindola 26c67b7879 Remove -f16:16:32 from the XCore DataLayout string.
This makes it identical to the string llvm produces.

llvm-svn: 197500
2013-12-17 14:34:42 +00:00
Timur Iskhodzhanov d482aa5f0d Add some simple COFF files with Z7 debug info
These will later be used as tests for the dumper part of http://llvm-reviews.chandlerc.com/D2232

llvm-svn: 197499
2013-12-17 14:33:31 +00:00
Eli Bendersky b512b968e6 Fix code sample in NVPTX examples: now it compiles to PTX and runs as expected.
llvm-svn: 197498
2013-12-17 14:14:15 +00:00
Alp Toker a3ebe6ee2b Refactor and micro-optimize ConsumeToken()
1) Introduce TryConsumeToken() to handle the common test-and-consume pattern.
   This brings about readability improvements in the parser and optimizes to avoid
   redundant checks in the common case.

2) Eliminate the ConsumeCodeCompletionTok special case from ConsumeToken(). This
   was used by only one caller which has been switched over to the more
   appropriate ConsumeCodeCompletionToken() function.

llvm-svn: 197497
2013-12-17 14:12:37 +00:00
Alp Toker 53358e43bc Simplify RevertibleTypeTraits as a form of contextual keyword
Now that we emit diagnostics for keyword-as-identifier hacks (-Wkeyword-compat)
we can go ahead and simplify some of the old revertible keyword support.

This commit adds a TryIdentKeywordUpgrade() function to mirror the recently
added TryKeywordIdentFallback() and uses it to replace the hard-coded list of
REVERTIBLE_TYPE_TRAITs.

llvm-svn: 197496
2013-12-17 14:12:30 +00:00
Daniel Jasper 8fb00b0f79 Update comment of changed parameter of ModuleMap constructor.
llvm-svn: 197495
2013-12-17 13:21:13 +00:00
Daniel Jasper bad63ae2a5 clang-format: Don't adapt local format to macros.
Formatting this:
   void f() { // 1 space initial indent.
      int i;
  #define A   \
      int i;  \
     int j;
        int k; // Format this line.
   }
   void f() {
       #define A 1 // Format this line.
   }

Before:
   void f() { // 1 space initial indent.
      int i;
  #define A   \
      int i;  \
     int j;
     int k;  // Format this line.
   }
   void f() {
   #define A 1  // Format this line.
   }

After:
   void f() { // 1 space initial indent.
      int i;
  #define A   \
      int i;  \
     int j;
      int k;  // Format this line.
   }
   void f() {
  #define A 1  // Format this line.
   }

llvm-svn: 197494
2013-12-17 12:38:55 +00:00
Alexey Samsonov 33a2cc1e10 Fix gen_dynamic_list.py for Python 3. Patch by Marcoen Hirschberg.
llvm-svn: 197493
2013-12-17 12:19:16 +00:00
Stepan Dyatkovskiy 7f7c2710e0 Fix for PR18045:
http://llvm.org/bugs/show_bug.cgi?id=18045

Short issue description:
For X86 machines with sse < sse4.1 we got failures for some
particular load/store vector sequences:

$ clang-trunk -m32 -O2 test-case.c
fatal error: error in backend: Cannot select: 0x4200920: v4i32,ch = load 0x41d6ab0, 0x4205850,
      0x41dcb10<LD16[getelementptr inbounds ([4 x i32]* @e, i32 0, i32 0)](align=4)> [ORD=82]
      [ID=58]
  0x4205850: i32 = X86ISD::Wrapper 0x41d5490 [ORD=26] [ID=43]
    0x41d5490: i32 = TargetGlobalAddress<[4 x i32]* @e> 0 [ORD=26] [ID=23]
  0x41dcb10: i32 = undef [ID=2]

The reason is that EltsFromConsecutiveLoads could emit such load instruction
both before and after legalize stage. Though this instruction is not legal for
machines with SSSE3 and lower.

The fix: In EltsFromConsecutiveLoads, if we have passed legalize stage, we
check whether nodes it emits are legal. 

P.S.: If you get failure in time from 12:00 and till 22:00 (UTC-8),
perhaps I'll slow with response, so you better reject this commit. Thanks!

llvm-svn: 197492
2013-12-17 12:07:33 +00:00
Alexey Samsonov 25d010a98d [Sanitizer] Always initialize a Symbolizer (even if 'symbolize' is false).
If 'symbolize' flag is not set, we still want to transform virtual address
to module+offset pair in the call to Symbolizer::SymbolizeCode().
See https://code.google.com/p/address-sanitizer/issues/detail?id=251 for
more details.

llvm-svn: 197491
2013-12-17 11:15:39 +00:00
Richard Barton 5828d7b936 LIBRARY_PATH environment variable should only be supported on a native compiler.
llvm-svn: 197490
2013-12-17 11:11:25 +00:00
Sergey Matveev 7237879926 [lsan] Introduce __lsan_(un)register_root_region().
Add an interface for telling LSan that a region of memory is to be treated as a
source of live pointers. Useful for code which stores pointers in mapped memory.

llvm-svn: 197489
2013-12-17 11:11:23 +00:00
Alexey Samsonov 5069790b24 [LSan] Add a real test for suppressions file instead of duplicated test case.
llvm-svn: 197488
2013-12-17 11:02:52 +00:00
Daniel Jasper a15b8e920d Add missing file from r197485.
(Yes, the irony is not lost on me :-) ).

llvm-svn: 197486
2013-12-17 10:47:49 +00:00
Daniel Jasper 0761a8a085 Modules: Don't warn upon missing headers while reading the module map.
Instead, mark the module as unavailable so that clang errors as soon as
someone tries to build this module.

This works towards the long-term goal of not stat'ing the header files at all
while reading the module map and instead read them only when the module is
being built (there is a corresponding FIXME in parseHeaderDecl()).  However, it
seems non-trivial to get there and this unblock us and moves us into the right
direction.

Also changed the implementation to reuse the same DiagnosticsEngine.

llvm-svn: 197485
2013-12-17 10:31:37 +00:00
Evgeniy Stepanov 59bb0878e2 [msan] Tweak gethostbyname_r interceptor some more.
This is covered by msan_test depending on glibc version and/or resolver setup.

llvm-svn: 197484
2013-12-17 09:13:54 +00:00
Yaron Keren 7da8e45b57 There are no __register_frame and __deregister_frame functions
when using structured exception handling (SEH) on Windows 64.

http://llvm-reviews.chandlerc.com/D2378

Patch by Jonathan Liu!

llvm-svn: 197483
2013-12-17 08:40:11 +00:00
Elena Demikhovsky c5f6726a24 AVX-512: Added implementation of CONCAT_VECTORS for v8i1 vectors (by Alexey Bader).
Added implementation of "truncate" from integer type (i64/i32/i16/i8) to i1.

llvm-svn: 197482
2013-12-17 08:33:15 +00:00
Duncan P. N. Exon Smith b2d4274d3f Revert "Mark vastart_save_xmm_regs as changing EFLAGS"
This reverts commit r197469.

The sanitizer and dragonegg buildbots are failing, I think because of
this change.  Reverting until I figure out why.

llvm-svn: 197481
2013-12-17 07:13:58 +00:00
Rui Ueyama 1fc1bab8a8 [PECOFF] Truncate long section name.
Executable files do not use a string table, so section names longer than 8
characters are not permitted. Long section names should just be truncated.

llvm-svn: 197470
2013-12-17 06:15:09 +00:00
Duncan P. N. Exon Smith a4acde39e9 Mark vastart_save_xmm_regs as changing EFLAGS
The vastart_save_xmm_regs pseudo-instruction expands to a test and a
branch, so it modifies EFLAGS.  Mark it so, or else the scheduler might
place it in the middle of another test+branch.

This fixes a bug exposed by r192750, which turned on the MI Scheduler
for X86.

<rdar://problem/15627766>

llvm-svn: 197469
2013-12-17 06:12:05 +00:00
NAKAMURA Takumi 7b789b3b3a llvm-config: Let directories aware of CMAKE_CFG_INTDIR.
With llvm-config.exe --bindir --libdir --build-mode, on Visual Studio 2010,

In build tree:
  (OBJ_ROOT)/bin/MinSizeRel
  (OBJ_ROOT)/lib/MinSizeRel
  MinSizeRel

In installed tree:
  (INSTALL_PREFIX)/bin
  (INSTALL_PREFIX)/lib
  MinSizeRel

This is enhancements since r196283.

llvm-svn: 197467
2013-12-17 05:48:37 +00:00
Andrew Trick 375ee3e16a Add -mcpu=z10 to SystemZ tests.
llvm-svn: 197466
2013-12-17 05:27:16 +00:00
Andrew Trick e339828b90 Allow MachineCSE to coalesce trivial subregister copies the same way that it coalesces normal copies.
Without this, MachineCSE is powerless to handle redundant operations with truncated source operands.

This required fixing the 2-addr pass to handle tied subregisters. It isn't clear what combinations of subregisters can legally be tied, but the simple case of truncated source operands is now safely handled:

     %vreg11<def> = COPY %vreg1:sub_32bit; GR32:%vreg11 GR64:%vreg1
     %vreg12<def> = COPY %vreg2:sub_32bit; GR32:%vreg12 GR64:%vreg2
     %vreg13<def,tied1> = ADD32rr %vreg11<tied0>, %vreg12<kill>, %EFLAGS<imp-def>

Test case: cse-add-with-overflow.ll.

This exposed an existing bug in
PPCInstrInfo::commuteInstruction. Thanks to Rafael for the test case:
PowerPC/crash.ll.

llvm-svn: 197465
2013-12-17 04:50:45 +00:00