Commit Graph

194523 Commits

Author SHA1 Message Date
Duncan P. N. Exon Smith 89c1eaa531 IR: Annotate dump methods with LLVM_DUMP_METHOD
It turns out we have a macro to ensure that debuggers can access
`dump()` methods.  Use it.  Hopefully this will prevent me (and others)
from committing crimes like in r223802 (search for /10000/, or just see
the fix in r224407).

llvm-svn: 230555
2015-02-25 22:08:21 +00:00
Frederic Riss ac10b0d61d Try to appease buildbots.
It seems ArrayRefs to multi-dimensional arrays confuse some compilers.

llvm-svn: 230554
2015-02-25 22:07:43 +00:00
Hal Finkel cf59921670 [PowerPC] Make LDtocL and friends invariant loads
LDtocL, and other loads that roughly correspond to the TOC_ENTRY SDAG node,
represent loads from the TOC, which is invariant. As a result, these loads can
be hoisted out of loops, etc. In order to do this, we need to generate
GOT-style MMOs for TOC_ENTRY, which requires treating it as a legitimate memory
intrinsic node type. Once this is done, the MMO transfer is automatically
handled for TableGen-driven instruction selection, and for nodes generated
directly in PPCISelDAGToDAG, we need to transfer the MMOs manually.

Also, we were not transferring MMOs associated with pre-increment loads, so do
that too.

Lastly, this fixes an exposed bug where R30 was not added as a defined operand of
UpdateGBR.

This problem was highlighted by an example (used to generate the test case)
posted to llvmdev by Francois Pichet.

llvm-svn: 230553
2015-02-25 21:36:59 +00:00
Johannes Doerfert 1d8b9c1b1f Add the IMPACT2015 publications
It is important we add more publications with/about Polly so people
  can see that work and research is actually ongoing.

llvm-svn: 230552
2015-02-25 21:31:38 +00:00
Frederic Riss c0dd7243ee [dwarfdump] Make debug_frame dump actually useful.
This adds support for pretty-printing instruction operands. The new
output looks like:

00000000 00000010 ffffffff CIE
  Version:               1
  Augmentation:
  Code alignment factor: 1
  Data alignment factor: -4
  Return address column: 8

  DW_CFA_def_cfa:  reg4 +4
  DW_CFA_offset:  reg8 -4
  DW_CFA_nop:
  DW_CFA_nop:

00000014 00000010 00000000 FDE cie=00000000 pc=00000000...00000022
  DW_CFA_advance_loc:  3
  DW_CFA_def_cfa_offset:  +12
  DW_CFA_nop:

llvm-svn: 230551
2015-02-25 21:30:22 +00:00
Frederic Riss 2fe0e54fd6 [dwarfdump] Don't print meaningless pointer.
CIE pointers were never filled in before, and printing the pointer
is totally pointless anyway.

llvm-svn: 230550
2015-02-25 21:30:19 +00:00
Frederic Riss 056ad058bb DWARFDebugFrame: Move some code around. NFC.
Move the FrameEntry::dumpInstructions down in the file at some
place where it can see the declarations of FDE and CIE.

llvm-svn: 230549
2015-02-25 21:30:16 +00:00
Frederic Riss 41bb2c6d4f DWARFDebugFrame: Add some trivial accessors. NFC.
To be used for dumping.

llvm-svn: 230548
2015-02-25 21:30:13 +00:00
Frederic Riss baf195f7eb DWARFDebugFrame: Actually collect CIEs associated with FDEs.
This is the first commit in a small series aiming at making
debug_frame dump more useful (right now it prints a list of
opeartions without their operands).

llvm-svn: 230547
2015-02-25 21:30:09 +00:00
Johannes Doerfert ae70ec88ae Add myself to the contributors of Polly
llvm-svn: 230546
2015-02-25 21:26:03 +00:00
Johannes Doerfert a8727861b5 Add non-affine subregions to the TODO list
llvm-svn: 230545
2015-02-25 21:20:57 +00:00
Manman Ren 082a336a89 [LTO API] fix memory leakage introduced at r230290.
r230290 released the LLVM module but not the LTOModule.

rdar://19024554

llvm-svn: 230544
2015-02-25 21:20:53 +00:00
David Majnemer e1bbad9eb2 X86, Win64: Allow 'mov' to restore the stack pointer if we have a FP
The Win64 epilogue structure is very restrictive, it permits a very
small number of opcodes and none of them are 'mov'.

This means that given:
  mov %rbp, %rsp
  pop %rbp

The mov isn't the epilogue, only the pop is.  This is problematic unless
a frame pointer is present in which case we are free to do whatever we'd
like in the "body" of the function.  If a frame pointer is present,
unwinding will undo the prologue operations in reverse order regardless
of the fact that we are at an instruction which is reseting the stack
pointer.

llvm-svn: 230543
2015-02-25 21:13:37 +00:00
Lang Hames 0db567f2ad [Orc][Kaleidoscope] Clean up the Orc/Kaleidoscope tutorials to minimize the diffs
between them.

llvm-svn: 230542
2015-02-25 20:58:28 +00:00
Kuba Brecka 71b3a69433 Fix >80 line after r230530.
llvm-svn: 230541
2015-02-25 20:56:04 +00:00
Peter Collingbourne eba7f73ff9 LowerBitSets: Align referenced globals.
This change aligns globals to the next highest power of 2 bytes, up to a
maximum of 128. This makes it more likely that we will be able to compress
bit sets with a greater alignment. In many more cases, we can now take
advantage of a new optimization also introduced in this patch that removes
bit set checks if the bit set is all ones.

The 128 byte maximum was found to provide the best tradeoff between instruction
overhead and data overhead in a recent build of Chromium. It allows us to
remove ~2.4MB of instructions at the cost of ~250KB of data.

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

llvm-svn: 230540
2015-02-25 20:42:41 +00:00
Zachary Turner 66bc9080d6 [CMake] Fix the clang-cl self host build.
This allows clang-cl to self-host cleanly with no magic setup
steps required.

After this patch, all you have to do is set CC=CXX=clang-cl and
run cmake -G Ninja.

These changes only exist to support C++ features which are
unsupported in clang-cl, so regardless of whether the user
specifies they want to use them, we still have to disable them.

llvm-svn: 230539
2015-02-25 20:42:19 +00:00
Richard Smith 4a2ceea193 Remove non-existent file from module map.
llvm-svn: 230538
2015-02-25 20:20:39 +00:00
Kostya Serebryany 497eeb598b [asan] restict no_asan_gen_globals.c test to 64-bit due to PR22682
llvm-svn: 230537
2015-02-25 20:19:23 +00:00
Peter Collingbourne 4be9b40091 CFI: Add a check-cfi-and-supported rule.
This rule works like check-cfi, but fails if the tests are unsupported.
This is useful to run on bots if we want to be sure that the tests aren't
silently being skipped.

llvm-svn: 230536
2015-02-25 20:14:05 +00:00
Andrew Kaylor b59b80b956 Fixing a problem with insert location in WinEH outlining
llvm-svn: 230535
2015-02-25 20:12:49 +00:00
Ben Langmuir 443aa4b4b0 Allow (Object *)kMyGlobalCFObj casts without bridging
Previously we allowed these casts only for constants declared in system
headers, which we assume are retain/release-neutral. Now also allow them
for constants in user headers, treating them as +0.  Practically, this
means that we will now allow:
id x = (id)kMyGlobalConst;

But unlike with system headers we cannot mix them with +1 values:
id y = (id)(b ? kMyGlobalConst : [Obj newValAtPlusOne]); // error
id z = (id)(b ? kSystemGlobalConst: [Obj newValAtPlusOne]); // OK

Thanks to John for suggesting this improvement.

llvm-svn: 230534
2015-02-25 20:09:06 +00:00
Sanjoy Das dcc84db264 Bugfix: SCEVExpander incorrectly marks increment operations as no-wrap
(The change was landed in r230280 and caused the regression PR22674.
This version contains a fix and a test-case for PR22674).
    
When emitting the increment operation, SCEVExpander marks the
operation as nuw or nsw based on the flags on the preincrement SCEV.
This is incorrect because, for instance, it is possible that {-6,+,1}
is <nuw> while {-6,+,1}+1 = {-5,+,1} is not.
    
This change teaches SCEV to mark the increment as nuw/nsw only if it
can explicitly prove that the increment operation won't overflow.
    
Apart from the attached test case, another (more realistic)
manifestation of the bug can be seen in
Transforms/IndVarSimplify/pr20680.ll.

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

llvm-svn: 230533
2015-02-25 20:02:59 +00:00
Richard Smith f42e1eca9f Add missing #include found by modules buildbot.
llvm-svn: 230532
2015-02-25 19:55:49 +00:00
Zachary Turner 49be160531 Revert "Fix warnings found with clang-cl."
SWIG doesn't like enum : unsigned.  Revert this until I can
fix this in a way that swig likes.

llvm-svn: 230531
2015-02-25 19:52:41 +00:00
Kuba Brecka 8f12ce0825 [compiler-rt] Symbolizer refactoring: Move SymbolizerProcess interface to header
Reviewed at http://reviews.llvm.org/D7868

llvm-svn: 230530
2015-02-25 19:50:38 +00:00
Kuba Brecka d831a73b32 [compiler-rt] Symbolizer refactoring: Move string parsing into separate functions
Reviewed at http://reviews.llvm.org/D7869

llvm-svn: 230529
2015-02-25 19:35:08 +00:00
Tobias Grosser e395da7986 Update isl to 0980603 'isl_tab_pip.c: parallel_constraints: drop useless assignment'
This update contains:

  - Fixes of minor issues detected by clang's scan_build
  - More schedule tree infrastructure additions

This update slightly changes the output of our dependence analysis, but these
changes are purely syntactially.

llvm-svn: 230528
2015-02-25 19:34:52 +00:00
Reid Kleckner c00927cd20 clang-cl: Ignore /Fd silently
While it's true that we don't create the PDB as requested on the command
line, this is a well-documented limitation. Warning about it doesn't
help people using legacy build systems with clang-cl, and it makes the
clang-cl self-host very noisy.

llvm-svn: 230527
2015-02-25 19:17:50 +00:00
Reid Kleckner 1cbd9aa96d Reland (2x) r230314, "Fix codegen for virtual methods that are (re-) exported from multiple modules."
This reverts commits r230477 and r230478.

llvm-svn: 230526
2015-02-25 19:17:48 +00:00
Reid Kleckner 8b6d034cab Reland r230446, "MS ABI: Try to respect external AST source record layouts"
It broke test/PCH/headersearch.cpp because it was using -Wpadding, which
only works for Itanium layout. Before this commit, we would use Itanium
record layout when using PCH, which is crazy. Now that the test uses an
explicit Itanium triple, we can reland.

llvm-svn: 230525
2015-02-25 19:17:45 +00:00
Reid Kleckner c22fe1299a Use Itanium triple in test using -Wpadding
-Wpadding is not implemented in the Microsoft record layout builder.
This test only passes on Windows because PCH forces us to use the
Itanium record layout builder. I'm about to fix that, so change the
test to not rely on that ridiculous behavior.

llvm-svn: 230524
2015-02-25 19:04:51 +00:00
Zachary Turner 00998f0beb Solve hang on Windows when lldb fails to launch the process.
The DebuggerThread was detecting the launch error, but it was
ignored by ProcessWindows::DoLaunch, causing LLDB to wait forever
in the debugger loop.

This fixes the test case that explicitly attempts to launch a
process from a non-existant path.

Patch by Adrian McCarthy
Differential Revision: http://reviews.llvm.org/D7874

llvm-svn: 230523
2015-02-25 18:56:47 +00:00
Zachary Turner 171d943ac5 Fix warnings found with clang-cl.
Earlier this week I was able to get clang-cl on Windows to be
able to self host.  This opened the door to being able to
get a whole new slew of warnings for the Windows build.

This patch fixes all of the warnings, many of which were real
bugs.

llvm-svn: 230522
2015-02-25 18:42:47 +00:00
Andrey Churbanov f42e83cf72 Removed all header files for OpenMP 2.5
llvm-svn: 230521
2015-02-25 18:38:08 +00:00
Andrey Churbanov 2638298646 Export the common header files to exports/ with CMake
llvm-svn: 230520
2015-02-25 18:32:30 +00:00
Andrey Churbanov 6d313413a8 Set the Intel compiler as default when building for the MIC without CMake
llvm-svn: 230519
2015-02-25 18:30:50 +00:00
Hal Finkel 0746211811 [PowerPC] Cleanup unused target-specific SDAG nodes
We had somehow accumulated a few target-specific SDAG nodes dealing with PPC64
TOC access that were referenced only in TableGen patterns. The associated
(pseudo-)instructions are used, but are being generated directly. NFC.

llvm-svn: 230518
2015-02-25 18:06:45 +00:00
Matthias Braun 02892ec62d AArch64: Add debug message for large shift constants.
As requested in code review.

llvm-svn: 230517
2015-02-25 18:03:50 +00:00
Kostya Serebryany 2a102cbc77 [asan] temporary disable the test on non-x86-64 while we are investigating PR22699
llvm-svn: 230516
2015-02-25 18:03:03 +00:00
Sanjay Patel 40eaa8df99 Fix really obscure bug in CannotBeNegativeZero() (PR22688)
With a diabolically crafted test case, we could recurse
through this code and return true instead of false.

The larger engineering crime is the use of magic numbers. 
Added FIXME comments for those.

llvm-svn: 230515
2015-02-25 18:00:15 +00:00
Nico Weber d9b8bd6b86 Make __leave test pass in -Asserts builds.
llvm-svn: 230514
2015-02-25 17:44:04 +00:00
David Majnemer d264827229 Update for clang r230512
llvm-svn: 230513
2015-02-25 17:36:49 +00:00
David Majnemer ced8bdf74a Sema: Parenthesized bound destructor member expressions can be called
We would wrongfully reject (a.~A)() in both the destructor and
pseudo-destructor cases.

This fixes PR22668.

llvm-svn: 230512
2015-02-25 17:36:15 +00:00
Chris Lattner 6cd04ac963 fix a typo
llvm-svn: 230510
2015-02-25 17:28:41 +00:00
Greg Clayton 1e28adfe75 MacOSX symbol table change to combine the N_GSYM debug map entry with the "_OBJC_CLASS_$_", "_OBJC_METACLASS_$_", and "_OBJC_IVAR_$_" non debug symbols. This allows the symbol that represents the object file to contain the eSymbolTypeObjCClass and eSymbolTypeObjCMetaClass and will help us to be able to efficiently lookup the real definition of an objective C class without loading all .o files linearly to find the .o file that contains the true definition.
llvm-svn: 230509
2015-02-25 17:25:02 +00:00
Greg Clayton 2d9ce1926c Fix the dumping of symbol tables to be correctly alligned for all entries when using "image dump symtab".
llvm-svn: 230508
2015-02-25 17:22:05 +00:00
Timur Iskhodzhanov 5c3f1c91f2 Address post-commit feedback on r230344: Don't use weak hooks on Sanitizer Go build for Windows
llvm-svn: 230507
2015-02-25 17:19:42 +00:00
Timur Iskhodzhanov 40d72d9a1f Reland r230019 - [ASan] Make the argument of '__sanitizer_annotate_contiguous_container' is not aligned error message easier to understand
This incorporates the fix for ARM architecture suggested by Renato Golin.

llvm-svn: 230506
2015-02-25 17:03:34 +00:00
Timur Iskhodzhanov 73e5951ed9 Fix duplicate test code introduced by running "patch -p0" twice
Sorry, SVN had some weird problems so I had to revert and reapply the patch
locally a couple of times and didn't notice I've added file contents to the same
file....

llvm-svn: 230505
2015-02-25 17:01:09 +00:00