Commit Graph

190302 Commits

Author SHA1 Message Date
Kai Nacke 755b6e8a42 [mips] Refine octeon instructions seq/seqi/sne/snei
This commit refines the pattern for the octeon seq/seqi/sne/snei instructions.
The target register is set to 0 or 1 according to the result of the comparison.
In C, this is something like

rd = (unsigned long)(rs == rt)

This commit adds a zext to bring the result to i64. With this change the
instruction is selected for this type of code. (gcc produces the same code for
the above C code.)

llvm-svn: 225968
2015-01-14 10:19:09 +00:00
Vladimir Medic 62dfce3240 Add disassembler tests for mips32r2 platform. There are no functional changes.
llvm-svn: 225967
2015-01-14 10:18:56 +00:00
Chandler Carruth 5e10e21d28 [PM] Make DominatorTrees (corectly) movable so that we can move them
into the new pass manager's analysis cache which stores results
by-value.

Technically speaking, the dom trees were originally not movable but
copyable! This, unsurprisingly, didn't work at all -- the copy was
shallow and just resulted in rampant memory corruption. This change
explicitly forbids copying (as it would need to be a deep copy) and
makes them explicitly movable with the unsurprising boiler plate to
member-wise move them because we can't rely on MSVC to generate this
code for us. =/

llvm-svn: 225966
2015-01-14 10:07:19 +00:00
Daniel Jasper 16dbe0bc44 clang-format: [Java] Understand "import static".
llvm-svn: 225965
2015-01-14 10:02:49 +00:00
Daniel Jasper 404658aede clang-format: [Java] Don't let annotations confuse return type analysis.
Before:
  @Test
  ReturnType
  doSomething(String aaaaaaaaaaaaa, String bbbbbbbbbbbbbbb) {}

After:
  @Test
  ReturnType doSomething(
      String aaaaaaaaaaaaa, String bbbbbbbbbbbbbbb) {}

llvm-svn: 225964
2015-01-14 10:00:20 +00:00
Daniel Jasper 3e1bd1407b clang-format: [Java] Don't line-wrap before annotations' l_parens.
Before:
  @SomeAnnotation
  (aaaaaaaaaaaaaaaaa, aaaaaaaaaaaaaaaaaaaa)
  int i;

After:
  @SomeAnnotation(
      aaaaaaaaaaaaaaaaa, aaaaaaaaaaaaaaaaaaaa)
  int i;

llvm-svn: 225963
2015-01-14 09:51:32 +00:00
Daniel Jasper a831c58e53 clang-format: [Java] Don't get confused by leading annotations.
Before:
  @Test(a)
  aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa = aaaaaaaaaaaaaaaaaaaaaaaaaaaa(
      aaaaaaaaaaaaaaaaaaaaaaa);

After:
  @Test(a)
  aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa =
      aaaaaaaaaaaaaaaaaaaaaaaaaaaa(aaaaaaaaaaaaaaaaaaaaaaa);

llvm-svn: 225962
2015-01-14 09:47:57 +00:00
Brad Smith 0ebb309e47 The assembler is now enabled by default.
llvm-svn: 225961
2015-01-14 08:23:49 +00:00
David Majnemer d1091e5e34 Sema: It's cheaper to ask LookupResult::empty than to calculate linkage
llvm-svn: 225960
2015-01-14 08:08:52 +00:00
David Blaikie baaaa67819 Reapply debug info changes now that more precise column information is available.
llvm-svn: 225959
2015-01-14 07:59:48 +00:00
Brad Smith b7c9aff1bb Use the integrated assembler by default on 32-bit PowerPC and SPARC.
llvm-svn: 225958
2015-01-14 07:55:36 +00:00
Brad Smith dd6675cef9 Use the integrated assembler by default on SPARC.
llvm-svn: 225957
2015-01-14 07:53:39 +00:00
David Blaikie 66e4197f07 Reapply r225000 (reverted in r225555): DebugInfo: Generalize debug info location handling (and follow-up commits).
Several pieces of code were relying on implicit debug location setting
which usually lead to incorrect line information anyway. So I've fixed
those (in r225955 and r225845) separately which should pave the way for
this commit to be cleanly reapplied.

The reason these implicit dependencies resulted in crashes with this
patch is that the debug location would no longer implicitly leak from
one place to another, but be set back to invalid. Once a call with
no/invalid location was emitted, if that call was ever inlined it could
produce invalid debugloc chains and assert during LLVM's codegen.

There may be further cases of such bugs in this patch - they're hard to
flush out with regression testing, so I'll keep an eye out for reports
and investigate/fix them ASAP if they come up.

Original commit message:

Reapply "DebugInfo: Generalize debug info location handling"

Originally committed in r224385 and reverted in r224441 due to concerns
this change might've introduced a crash. Turns out this change fixes the
crash introduced by one of my earlier more specific location handling
changes (those specific fixes are reverted by this patch, in favor of
the more general solution).

Recommitted in r224941 and reverted in r224970 after it caused a crash
when building compiler-rt. Looks to be due to this change zeroing out
the debug location when emitting default arguments (which were meant to
inherit their outer expression's location) thus creating call
instructions without locations - these create problems for inlining and
must not be created. That is fixed and tested in this version of the
change.

Original commit message:

This is a more scalable (fixed in mostly one place, rather than many
places that will need constant improvement/maintenance) solution to
several commits I've made recently to increase source fidelity for
subexpressions.

This resetting had to be done at the DebugLoc level (not the
SourceLocation level) to preserve scoping information (if the resetting
was done with CGDebugInfo::EmitLocation, it would've caused the tail end
of an expression's codegen to end up in a potentially different scope
than the start, even though it was at the same source location). The
drawback to this is that it might leave CGDebugInfo out of sync. Ideally
CGDebugInfo shouldn't have a duplicate sense of the current
SourceLocation, but for now it seems it does... - I don't think I'm
going to tackle removing that just now.

I expect this'll probably cause some more buildbot fallout & I'll
investigate that as it comes up.

Also these sort of improvements might be starting to show a weakness/bug
in LLVM's line table handling: we don't correctly emit is_stmt for
statements, we just put it on every line table entry. This means one
statement split over multiple lines appears as multiple 'statements' and
two statements on one line (without column info) are treated as one
statement.

I don't think we have any IR representation of statements that would
help us distinguish these cases and identify the beginning of each
statement - so that might be something we need to add (possibly to the
lexical scope chain - a scope for each statement). This does cause some
problems for GDB and possibly other DWARF consumers.

llvm-svn: 225956
2015-01-14 07:38:27 +00:00
David Blaikie 47d28e07c1 DebugInof: Correct the location of exception cleanups in global ctors/dtors and ObjC methods
Without setting the CurEHLocation these cleanups would be attributed to
whatever the last active debug line location was (the 'fn' call in the
included test cases). By setting CurEHLocation correctly the line
information is improved/corrected.

This quality bug turned into a crasher with r225000 when, instead of
allowing the last location to persist, it would be zero'd out. This
could lead to a function call (such as the dtor) being made without a
debug location - if that call was subsequently inlined (and the caller
and callee had debug info, just not the call instruction) the inliner
would violate important constraints about the debug location chains by
not updating the inlined instructions to chain up to the callee
locations.

So, by fixing this bug, I am addressing the assertion failures
introduced by r225000 and should be able to recommit that patch with
impunity...

llvm-svn: 225955
2015-01-14 07:10:46 +00:00
David Majnemer 7efc6139d9 Use the operand vector instead so inline assembly can be validated too
The buildbots got upset after r225941, this should hopefully fix things.

llvm-svn: 225954
2015-01-14 06:14:36 +00:00
Mehdi Amini d8976b8ed3 SelectionDAG: add a -filter-view-dags option to llc
This option takes the name of the basic block you want to visualize
with -view-*-dags

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

llvm-svn: 225953
2015-01-14 06:03:18 +00:00
Mehdi Amini 648eff1695 DAG Combiner: Fold SelectCC When Cond is UNDEF
In case folding a node end up with a NaN as operand for the select, 
the folding of the condition of the selectcc node returns "UNDEF".

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

llvm-svn: 225952
2015-01-14 05:45:24 +00:00
Mehdi Amini 7b068f6ba4 Add assertions for out of bound index in ComputeLinearIndex
llvm-svn: 225951
2015-01-14 05:38:48 +00:00
Saleem Abdulrasool aa32297fb8 X86: only access operands if they are present
If there is no associated immediate (MS style inline asm), do not try to access
the operand, assume that it is valid.  This should fix the buildbots after SVN
r225941.

llvm-svn: 225950
2015-01-14 05:37:10 +00:00
Mehdi Amini 8923cc5470 Fold a loop for array processing in ComputeLinearIndex
When processing an array, every Elt has the same layout, it is
useless to recursively call each ComputeLinearIndex on each element.
Just do it once and multiply by the number of elements.
    
Differential Revision: http://reviews.llvm.org/D6832

llvm-svn: 225949
2015-01-14 05:33:01 +00:00
JF Bastien eeea8970b4 Revert "Insert random noops to increase security against ROP attacks (llvm)"
This reverts commit:
http://reviews.llvm.org/D3392

llvm-svn: 225948
2015-01-14 05:24:33 +00:00
JF Bastien c7af264486 Revert "Insert random noops to increase security against ROP attacks (clang)"
This reverts commit:
http://reviews.llvm.org/D3393

llvm-svn: 225947
2015-01-14 05:24:11 +00:00
Peter Collingbourne 5ab8061293 irgen: expose DisableUnusedImportCheck flag
Differential Revision: http://reviews.llvm.org/D6956

llvm-svn: 225946
2015-01-14 05:18:16 +00:00
Peter Collingbourne c253ebc4af irgen: expose PackageCreated hook
Differential Revision: http://reviews.llvm.org/D6955

llvm-svn: 225945
2015-01-14 05:17:41 +00:00
Duncan P. N. Exon Smith 9f6bddd4b2 NVPTX: Use MapMetadata() instead of custom/stale/untested logic
Copy the `GVMap` over to a standard `ValueToValueMapTy` so that we can
reuse the `MapMetadata()` logic.  Unfortunately the `GVMap` can't just
be replaced, since `MapMetadata()` likes to modify the map, but at least
this will prevent NVPTX from bitrotting.

llvm-svn: 225944
2015-01-14 05:14:30 +00:00
Duncan P. N. Exon Smith f864ae2745 NVPTX: Remove bogus remap logic for global variable address spaces
The comment is incorrect, and the code mangles debug info.  Remove the
bad logic, which wasn't tested anyway.

llvm-svn: 225943
2015-01-14 05:13:18 +00:00
David Majnemer b5d2d45c5c Sema: Relax parsing of '#' in constraints
llvm-svn: 225942
2015-01-14 05:11:09 +00:00
Saleem Abdulrasool ca24b1d638 X86: validate 'int' instruction
The int instruction takes as an operand an 8-bit immediate value.  Validate that
the input is valid rather than silently truncating the value.

llvm-svn: 225941
2015-01-14 05:10:21 +00:00
NAKAMURA Takumi c16c427ebc Disable a couple of tests, CodeGen/X86/noop-insert.ll and CodeGen/X86/noop-insert-percentage.ll, in r225908, to unbreak tests.
llvm-svn: 225940
2015-01-14 04:21:33 +00:00
Chandler Carruth cbcfd008ee [dom] Remove extraneous inline keywords. Template functions and inline
class members are implicitly "inline", no key word needed.

Naturally, this could change how LLVM inlines these functions because
<GRR>, but that's not an excuse to use the keyword. ;]

llvm-svn: 225939
2015-01-14 03:58:50 +00:00
Chandler Carruth 1653ff600e [dom] The formatting of the generic domtree has bitrotted over the years
significantly. Clean it up with the help of clang-format.

I've touched this up by hand in a couple of places that weren't quite
right (IMO). I think most of these actually have bugs open about
already.

llvm-svn: 225938
2015-01-14 03:56:00 +00:00
Chandler Carruth 603ef2796b [dom] Clean up some comments in this header that were confusingly
formatted or placed incorrectly.

llvm-svn: 225937
2015-01-14 03:55:58 +00:00
Chandler Carruth ef7a9fb63b [dom] Add a basic dominator tree test.
Correct, we have *zero* basic testing of the dominator tree in the
regression test suite. There is a single test that even prints it out,
and that test only checks a single line of the output. There are
a handful of tests that check post dominators, but all of those are
looking for bugs rather than just exercising the basic machinery.

This test is super boring and unexciting. But hey, it's something.
I needed there to be something so I could switch the basic test to run
with both the old and new pass manager.

llvm-svn: 225936
2015-01-14 03:34:55 +00:00
Hao Liu e28d154cd5 Fix a wrong comment in LoopVectorize.
I.E. more than two -> exactly two
Fix a typo function name in LoopVectorize.
  I.E. collectStrideAcccess() -> collectStrideAccess()

llvm-svn: 225935
2015-01-14 03:02:16 +00:00
David Majnemer ce12ed20c6 Sema: Check type compatibility with the most recent decl when merging
We would check the type information from the declaration found by lookup
but we would neglect checking compatibility with the most recent
declaration.  This would make it possible for us to not correctly
diagnose inconsistencies with declarations which were made in a
different scope.

llvm-svn: 225934
2015-01-14 02:27:38 +00:00
NAKAMURA Takumi 2eb4d4468f TargetInstrInfo.h: Fix \param in r225772. [-Wdocumentation]
llvm-svn: 225933
2015-01-14 02:24:10 +00:00
Rafael Espindola c7e4fb209e Another try at handling LD_LIBRARY_PATH not being defined.
llvm-svn: 225932
2015-01-14 02:23:27 +00:00
Richard Trieu a64949dfb8 Disable -Wunknown-pragmas in a test so that Clang without -Wself-move will not
complain that the flag doesn't exist.

llvm-svn: 225931
2015-01-14 01:50:12 +00:00
Tim Northover a203ca61af ARM: add test for crc32 instructions in CodeGen.
Somehow we seem to have ended up without any actual tests of the
CodeGen side. Easy enough to fix.

llvm-svn: 225930
2015-01-14 01:43:33 +00:00
Duncan P. N. Exon Smith e65b0663e6 Remove trailing slash from r225924
llvm-svn: 225929
2015-01-14 01:42:43 +00:00
Hal Finkel 2307a2f088 [PowerPC] Fix the noop-insert test
The form of nops used is CPU-specific (some CPUs, such as the POWER7, have
special group-terminating nops). We probably want a different callback for this
kind of nop insertion (something more like MCAsmBackend::writeNopData), or for
PPC to use a different mechanism for scheduling nops, but this will stop the
test from failing for now.

llvm-svn: 225928
2015-01-14 01:37:21 +00:00
Matt Arsenault edb6f03852 R600/SI: Remove some redudant load testcases.
This reduces coverage for Evergreen, since the more
complete tests have those run lines disabled.

llvm-svn: 225927
2015-01-14 01:35:26 +00:00
Matt Arsenault e698663687 R600/SI: Fix bad code with unaligned byte vector loads
Don't do the v4i8 -> v4f32 combine if the load will need to
be expanded due to alignment. This stops adding instructions
to repack into a single register that the v_cvt_ubyteN_f32
instructions read.

llvm-svn: 225926
2015-01-14 01:35:22 +00:00
Matt Arsenault bd22342322 Implement new way of expanding extloads.
Now that the source and destination types can be specified,
allow doing an expansion that doesn't use an EXTLOAD of the
result type. Try to do a legal extload to an intermediate type
and extend that if possible.

This generalizes the special case custom lowering of extloads
R600 has been using to work around this problem.

This also happens to fix a bug that would incorrectly use more
aligned loads than should be used.

llvm-svn: 225925
2015-01-14 01:35:17 +00:00
Duncan P. N. Exon Smith e54cd9a6f3 Utils: Remove unreachable break, NFC
llvm-svn: 225924
2015-01-14 01:31:34 +00:00
Oleksiy Vyalov 4771829225 Extend PipePosix with support for named pipes/timeout-based IO and integrate it with GDBRemoteCommunication / lldb-gdbserver - include reviews fixes.
http://reviews.llvm.org/D6954

llvm-svn: 225923
2015-01-14 01:31:27 +00:00
Adam Nemet 63a951eb1c [AVX512] Add FP unpack intrinsics
These are implemented with __builtin_shufflevector just like AVX.

We have some tests on the LLVM side to assert that these shufflevectors do
indeed generate the corresponding unpck instruction.

Part of <rdar://problem/17688758>

llvm-svn: 225922
2015-01-14 01:31:17 +00:00
Duncan P. N. Exon Smith a5a0f5766a Utils: Handle remapping distinct MDLocations
Part of PR21433.

llvm-svn: 225921
2015-01-14 01:29:32 +00:00
Jonathan Roelofs 9144235617 Refactor the lit config's linker flag discovery code. NFC
llvm-svn: 225920
2015-01-14 01:29:04 +00:00
Rafael Espindola a9782ecfb0 Handle LD_LIBRARY_PATH not being defined.
Should fix the bots after r225890.

llvm-svn: 225919
2015-01-14 01:28:08 +00:00