Commit Graph

187565 Commits

Author SHA1 Message Date
Daniel Jasper e5d74867aa clang-format: [Java] Support Foo.class;
Before:
  SomeClass.
  class.getName();

After:
  SomeClass.class.getName();

This fixes llvm.org/PR21665.

llvm-svn: 222813
2014-11-26 08:17:08 +00:00
Lang Hames 7cacb9b540 [MCJIT] Re-enable GDB registration (temporarily disabled in r222811), but check
that we actually have an object to register first.

For MachO objects, RuntimeDyld::LoadedObjectInfo::getObjectForDebug returns an
empty OwningBinary<ObjectFile> which was causing crashes in the GDB registration
code.

llvm-svn: 222812
2014-11-26 07:39:03 +00:00
Lang Hames 08a01ae372 [MCJIT] Temporarily disable automatic JIT debugger registration.
The RuntimeDyld cleanup patch r222810 turned on GDB registration for MachO
objects. I expected this to be harmless, but it seems to have broken on
MacsOS. Temporarily disabling debugger registration while I dig in to what's
gone wrong.

llvm-svn: 222811
2014-11-26 07:25:26 +00:00
Lang Hames 829a19ae74 [MCJIT] Clean up RuntimeDyld's quirky object-ownership/modification scheme.
Previously, when loading an object file, RuntimeDyld (1) took ownership of the
ObjectFile instance (and associated MemoryBuffer), (2) potentially modified the
object in-place, and (3) returned an ObjectImage that managed ownership of the
now-modified object and provided some convenience methods. This scheme accreted
over several years as features were tacked on to RuntimeDyld, and was both
unintuitive and unsafe (See e.g. http://llvm.org/PR20722).

This patch fixes the issue by removing all ownership and in-place modification
of object files from RuntimeDyld. Existing behavior, including debugger
registration, is preserved.

Noteworthy changes include:

(1) ObjectFile instances are now passed to RuntimeDyld by const-ref.
(2) The ObjectImage and ObjectBuffer classes have been removed entirely, they
    existed to model ownership within RuntimeDyld, and so are no longer needed.
(3) RuntimeDyld::loadObject now returns an instance of a new class,
    RuntimeDyld::LoadedObjectInfo, which can be used to construct a modified
    object suitable for registration with the debugger, following the existing
    debugger registration scheme.
(4) The JITRegistrar class has been removed, and the GDBRegistrar class has been
    re-written as a JITEventListener.

This should fix http://llvm.org/PR20722 .

llvm-svn: 222810
2014-11-26 06:53:26 +00:00
Craig Topper bf82611bc8 Remove neverHasSideEffects support from TableGen CodeGenInstruction. Everyone should use hasSideEffects now.
llvm-svn: 222809
2014-11-26 04:11:14 +00:00
Richard Smith 77b1b14202 Try to make the modules buildbot happy again.
llvm-svn: 222808
2014-11-26 03:44:47 +00:00
Richard Smith 410cc89374 [c++1z] Most of N4268 (allow constant evaluation for non-type template arguments).
We don't yet support pointer-to-member template arguments that have undergone
pointer-to-member conversions, mostly because we don't have a mangling for them yet.

llvm-svn: 222807
2014-11-26 03:26:53 +00:00
Eric Christopher 1686e4e4b9 Reformat with gofmt.
llvm-svn: 222806
2014-11-26 02:57:33 +00:00
Eric Christopher 6fc4b1440d Make SetMCJITOptimizationLevel more of a method and pass options
as a reference. Move closer to the type.

llvm-svn: 222805
2014-11-26 02:54:24 +00:00
Eric Christopher cb963576be Make sure that the go bindings call LLVMInitializeMCJITCompilerOptions
so that they initialize the code generation model to the correct
(non-zero) default model.

llvm-svn: 222804
2014-11-26 02:27:46 +00:00
Alexey Samsonov 4cc76cb872 [Sanitizer] Bump kMaxPathLength to 4096 and use it more extensively instead of hardcoded constants
llvm-svn: 222803
2014-11-26 01:48:39 +00:00
Rui Ueyama b12191aaf9 Use SafelyCloseFileDescriptor instead of close.
Opening a file using openFileForWrite and closing it using close
was asymmetric. It also had a subtle portability problem (details are
described in the commit message for r219189).

llvm-svn: 222802
2014-11-26 01:45:24 +00:00
Craig Topper c50d64b07b Replace neverHasSideEffects=1 with hasSideEffects=0 in all .td files.
llvm-svn: 222801
2014-11-26 00:46:26 +00:00
Alexey Samsonov 9f8d091ea9 [ASan] Fix typo in test
llvm-svn: 222800
2014-11-26 00:23:51 +00:00
Rui Ueyama 65e0ca1bde [PECOFF] Properly close a file descriptor.
This was basically benign resource leak on Unix, but on Windows
it could cause builds to fail because opened file descriptor
prevents other processes from moving or removing the file.

llvm-svn: 222799
2014-11-26 00:21:27 +00:00
David Majnemer 659be55daa CodeGen: Fix emission of __atomic_compare_exchange
We (wrongly) discarded the return value of the call.

llvm-svn: 222798
2014-11-25 23:44:32 +00:00
Kaelyn Takata 443d61d62a Ensure that any TypoExprs in the arguments to bultins with custom type
checking are handled before the custom type checking is performed.

Fixes PR21669.

llvm-svn: 222797
2014-11-25 23:04:09 +00:00
Simon Pilgrim 371417db34 [X86][SSE] Improvements to byte shift shuffle matching
Since (v)pslldq / (v)psrldq instructions resolve to a single input argument it is useful to match it much earlier than we currently do - this prevents more complicated shuffles (notably insertion into a zero vector) matching before it.

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

llvm-svn: 222796
2014-11-25 22:34:59 +00:00
Colin LeMahieu b3d08bb44b [Hexagon] Adding add64 and sub64 instructions.
llvm-svn: 222795
2014-11-25 22:15:44 +00:00
Eric Fiselier 53deb607d9 Fixes to get libc++ building on sun solaris. Patch from C Bergstrom.
llvm-svn: 222794
2014-11-25 21:57:41 +00:00
Colin LeMahieu 6f6c4ff1fc Reverting 222792
llvm-svn: 222793
2014-11-25 21:39:57 +00:00
Colin LeMahieu aaf33928ee [Hexagon] Adding compare with immediate instructions.
llvm-svn: 222792
2014-11-25 21:30:28 +00:00
Colin LeMahieu 6f352b03a4 [Hexagon] Adding NOP encoding bits.
llvm-svn: 222791
2014-11-25 21:23:07 +00:00
Peter Collingbourne 4a2996cb1d Go bindings: add DIBuilder.InsertValueAtEnd
Expose llvm::DIBuilder::insertDbgValueIntrinsic as
DIBuilder.InsertValueAtEnd in the Go bindings, to support attaching
debug metadata to register values.

Patch by Andrew Wilkins!

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

llvm-svn: 222790
2014-11-25 21:05:04 +00:00
Matt Arsenault 3896a0a99c R600/SI: Only use one DEBUG()
llvm-svn: 222789
2014-11-25 21:03:22 +00:00
Rafael Espindola 7f2fa4fa38 This test requires asserts because of -stats.
Sorry about that.

llvm-svn: 222788
2014-11-25 20:56:56 +00:00
Rafael Espindola 947bdb69cb gold plugin: call llvm_shutdown so that -stats works.
llvm-svn: 222787
2014-11-25 20:52:49 +00:00
Cameron McInally 9b7c15a364 [AVX512] Add 512b integer shift by variable intrinsics and patterns.
llvm-svn: 222786
2014-11-25 20:41:51 +00:00
Colin LeMahieu f7f156ffc3 [Hexagon] [NFC] Adding trailing whitespace to test files.
llvm-svn: 222785
2014-11-25 20:22:24 +00:00
Colin LeMahieu e83bc7476f [Hexagon] Adding C2_mux instruction.
llvm-svn: 222784
2014-11-25 20:20:09 +00:00
Craig Topper 6a257d78dd Remove unncessary check for Int_* and *_Int in AsmMatcherEmitter. These are all marked isCodeGenOnly these days.
llvm-svn: 222783
2014-11-25 20:11:34 +00:00
Craig Topper 03ec801126 Use range-based for loops.
llvm-svn: 222782
2014-11-25 20:11:31 +00:00
Craig Topper 135999c35c Remove dead code.
llvm-svn: 222781
2014-11-25 20:11:29 +00:00
Craig Topper 356387843a Remove unused MaxSize variable.
llvm-svn: 222780
2014-11-25 20:11:27 +00:00
Craig Topper 1f3873613c Move a vector instead of copying it.
llvm-svn: 222779
2014-11-25 20:11:25 +00:00
Craig Topper edb091185d Remove space before tab in all AVX512 mnemonic strings.
llvm-svn: 222778
2014-11-25 20:11:23 +00:00
Rui Ueyama 24a7f7eed8 [PECOFF] Ignore /maxilkfile option.
.ilk file is a file for incremental linking. We don't create nor use
that file.

/MAXILKFILE is an undocumented option to specify the maximum size
of the .ilk file, IIUC. We should just ignore the option.

llvm-svn: 222777
2014-11-25 19:51:28 +00:00
Zachary Turner 807eb55b08 When a process stops, set the StopInfo object on Windows.
llvm-svn: 222776
2014-11-25 19:03:19 +00:00
Zachary Turner 82da55fe57 Disable GetSTDOUT, GetSTDERR, and PutSTDIN on Windows.
These methods are difficult / impossible to implement in a way
that is semantically equivalent to the expectations set by LLDB
for using them.  In the future, we should find an alternative
strategy (for example, i/o redirection) for achieving similar
functionality, and hopefully deprecate these APIs someday.

llvm-svn: 222775
2014-11-25 19:03:08 +00:00
Zachary Turner 9f877de2e6 Add some more comments explaining the purpose of some Register classes.
llvm-svn: 222774
2014-11-25 19:02:47 +00:00
Rui Ueyama 0d9a181d9d [PECOFF] Create an empty PDB file if debug option is enabled.
There are many build files in the wild that depend on the fact that
link.exe produces a PDB file if /DEBUG option is given. They fail
if the file is not created.

This patch is to make LLD create an empty (dummy) file to satisfy
such build targets. This doesn't do anything other than "touching"
the file.

If a target depends on the content of the PDB file, this workaround
is no help, of course. Otherwise this patch should help build some
stuff.

llvm-svn: 222773
2014-11-25 19:01:01 +00:00
Hans Wennborg bda193edff Remove useless rdar:// comment from switch_to_lookup_table.ll test.
llvm-svn: 222772
2014-11-25 18:45:23 +00:00
Colin LeMahieu 902157c249 [Hexagon] Replacing cmp* instructions with ones that contain encoding bits.
llvm-svn: 222771
2014-11-25 18:20:52 +00:00
Colin LeMahieu d17bce2e9f Cleaning out google tests from MC.
llvm-svn: 222770
2014-11-25 18:03:08 +00:00
Paul Robinson 18bc77f66c Try to fix a ppc64 bot. What is this 'signext' stuff anyway?
No wonder most people use specific triples.

llvm-svn: 222769
2014-11-25 17:28:54 +00:00
Hans Wennborg 45172aceb3 LazyValueInfo: Actually re-visit partially solved block-values in solveBlockValue()
If solveBlockValue() needs results from predecessors that are not already
computed, it returns false with the intention of resuming when the dependencies
have been resolved. However, the computation would never be resumed since an
'overdefined' result had been placed in the cache, preventing any further
computation.

The point of placing the 'overdefined' result in the cache seems to have been
to break cycles, but we can check for that when inserting work items in the
BlockValue stack instead. This makes the "stop and resume" mechanism of
solveBlockValue() work as intended, unlocking more analysis.

Using this patch shaves 120 KB off a 64-bit Chromium build on Linux.

I benchmarked compiling bzip2.c at -O2 but couldn't measure any difference in
compile time.

Tests by Jiangning Liu from r215343 / PR21238, Pete Cooper, and me.

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

llvm-svn: 222768
2014-11-25 17:23:05 +00:00
Joerg Sonnenberger 4af2f12153 Small model and JIT generally don't go well with each other.
On LP64 platforms, it will work or not depending on the choosen memory
layout, so neither PASS nor XFAIL is appropiate.
As UNSUPPORTED as per-test target doesn't exist (yet), remove the test
instead to unbreak the builds.

llvm-svn: 222767
2014-11-25 17:14:22 +00:00
Tobias Grosser 154d9469f4 Add PreHeader always to OuterLoop
This fixes a bug introduce in r217525.

llvm-svn: 222766
2014-11-25 17:09:21 +00:00
Manuel Klimek d3aa1f4a63 Re-apply r222646 (was reverted in r222667). Adding 4 ASTMatchers: typedefDecl, isInMainFile, isInSystemFile, isInFileMatchingName
Change to original: ifndef out tests in Windows due to /-separated
paths.

Summary:
Often one is only interested in matches within the main-file or matches
that are not within a system-header, for which this patch adds
isInMainFile and isInSystemFile. They take no arguments and narrow down
the matches.

The isInFileMatchingName is mainly thought for interactive
clang-query-sessions, to make a matcher more specific without restarting
the session with the files you are interested in for that moment. It
takes a string that will be used as regular-expression to match the
filename of where the matched node is expanded.

Patch by Hendrik von Prince.

llvm-svn: 222765
2014-11-25 17:01:06 +00:00
Rafael Espindola c81c3f554c Set the body of a new struct as soon as it is created.
This changes the order in which different types are passed to get, but
one order is not inherently better than the other.

The main motivation is that this simplifies linkDefinedTypeBodies now that
it is only linking "real" opaque types. It is also means that we only have to
call it once and that we don't need getImpl.

A small change in behavior is that we don't copy type names when resolving
opaque types. This is an improvement IMHO, but it can be added back if
desired. A test is included with the new behavior.

llvm-svn: 222764
2014-11-25 15:33:40 +00:00