Commit Graph

164098 Commits

Author SHA1 Message Date
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
Andrew Trick 9defbd882b whitespace
llvm-svn: 197464
2013-12-17 04:50:40 +00:00
NAKAMURA Takumi b7bf04c02e Tweak lit/TestingConfig.py Py3-compatible. has_key is dead.
llvm-svn: 197462
2013-12-17 04:14:50 +00:00
NAKAMURA Takumi b1ec06b0a2 [CMake][Standalone] Import LLVM_LIT_TOOLS_DIR.
llvm-svn: 197461
2013-12-17 04:14:26 +00:00
NAKAMURA Takumi e3d8f1a17e [CMake][Standalone] Fix llvm-tblgen's directory to use LLVM_TOOLS_BINARY_DIR instead of LLVM_BINARY_DIR.
LLVM_BINARY_DIR points OBJROOT.

FIXME: llvm-config should show *real* bindir with --bindir.
llvm-svn: 197460
2013-12-17 04:14:22 +00:00
NAKAMURA Takumi 17645a4772 [CMake][Standalone] Fixup r197395 for standalone build.
Standalone scripts shall be rewritten.

llvm-svn: 197459
2013-12-17 04:14:17 +00:00
Jim Grosbach 04caa27387 Make comment more explicit.
Re-reading the comment I updated in previous commit, it's better to make
it more explicit and avoid ambiguity more effectively.

llvm-svn: 197458
2013-12-17 02:18:02 +00:00
Jim Grosbach dde043b3fd Typo. s/reserved/preserved/
llvm-svn: 197457
2013-12-17 02:01:13 +00:00
Jim Grosbach ea2db453dd Add a machine code print in DEBUG() following instruction selection.
Make debugging ISel a bit easier by printing out a dump of the generated
code at the end.

llvm-svn: 197456
2013-12-17 02:01:10 +00:00
Alp Toker 2dea15b53c ASTContext: Refactor implicit record creation
Tidy up built-in record creation to reduce code duplication.

Continuation of r197336.

llvm-svn: 197452
2013-12-17 01:22:38 +00:00
Quentin Colombet 382b135d92 Revert r197438 and r197447 until we figure out how to avoid circular dependency at link time
llvm-svn: 197451
2013-12-17 01:19:59 +00:00
Dmitri Gribenko 3fb18bbd34 Add a test for -fno-diagnostics-fixit-info
llvm-svn: 197450
2013-12-17 01:19:19 +00:00
Arnold Schwaighofer 50b8302c55 LoopVectorizer: Don't if-convert constant expressions that can trap
A phi node operand or an instruction operand could be a constant expression that
can trap (division). Check that we don't vectorize such cases.

PR16729
radar://15653590

llvm-svn: 197449
2013-12-17 01:11:01 +00:00
Fariborz Jahanian 769c04ea35 ObjectiveC migrator. Fixes a bug when protocol
conformance is inferred. // rdar://15515206

llvm-svn: 197448
2013-12-17 01:01:33 +00:00
Quentin Colombet 0caf4fef47 [LLVM Diagnostic Capabilities] Remove useless includes from
DiagnosticPrinter.cpp.
These was creating a link time dependencies of IR on CodeGen and Analysis.

Part of <rdar://problem/15515174>

llvm-svn: 197447
2013-12-17 00:56:19 +00:00
Reid Kleckner 341a142bd6 Add missing trailing comma in llvm-lit.in
I was testing a stale bin/llvm-lit, which now lives at bin/llvm-lit.py
on Windows.

llvm-svn: 197446
2013-12-17 00:55:31 +00:00
Richard Trieu c689691618 For -Wconsumed, walk the namespaces to find if the top most namespace is "std"
to determine if a move function is the std::move function.  This allows functions
like std::__1::move to also be treated a the move function.

llvm-svn: 197445
2013-12-17 00:40:40 +00:00
Reid Kleckner 8dcf98547e Add the lit site config for unittests to bin/llvm-lit
This missing parameter was causing bin/llvm-lit to run the unittests
from my primary build directory instead of my self-hosting build
directory because llvm-config was on my PATH.

This more closely matches what 'make check' will pass to lit.py.

llvm-svn: 197444
2013-12-17 00:33:36 +00:00
Rafael Espindola 8ddf8bce91 Reorder these DataLayout entries to match the order LLVM uses.
This completes the cleanup/refactoring of DataLayout on the clang side. Next
is figuring out the differences between the llvm and clang produced strings

llvm-svn: 197442
2013-12-17 00:04:48 +00:00
NAKAMURA Takumi ea0c73b84e clang/lib/Headers/CMakeLists.txt: Revert part of r197395. It should not be staged yet.
llvm-svn: 197441
2013-12-17 00:02:38 +00:00
Rafael Espindola 2da3532aba The preferred alignment defaults to the ABI one. Omit it if it is the same.
llvm-svn: 197440
2013-12-16 23:27:41 +00:00