Commit Graph

214965 Commits

Author SHA1 Message Date
Peter Collingbourne 12ec50553f Update tutorial for debug info IR change.
llvm-svn: 252226
2015-11-05 22:55:44 +00:00
Jason Molenda 9b6b069a38 Add support for the armv7k ABI which has some small
changes from the normal armv7 ABI used on darwin.

llvm-svn: 252225
2015-11-05 22:51:29 +00:00
Jim Ingham 13c30d2f7d Let the process help figure out the Host OS if nobody else
can figure it out.

llvm-svn: 252224
2015-11-05 22:33:17 +00:00
Richard Smith ea26041bbb Better link for Library Fundamentals TS.
llvm-svn: 252223
2015-11-05 22:21:52 +00:00
Peter Collingbourne a252ea08b5 Fix Kaleidoscope example.
llvm-svn: 252222
2015-11-05 22:18:31 +00:00
Peter Collingbourne 8324851a4e debug: Update for debug info API change.
llvm-svn: 252221
2015-11-05 22:04:20 +00:00
Peter Collingbourne 0900fe0f1b CodeGen: Update for debug info API change.
Differential Revision: http://reviews.llvm.org/D14266

llvm-svn: 252220
2015-11-05 22:04:14 +00:00
Peter Collingbourne d4bff30370 DI: Reverse direction of subprogram -> function edge.
Previously, subprograms contained a metadata reference to the function they
described. Because most clients need to get or set a subprogram for a given
function rather than the other way around, this created unneeded inefficiency.

For example, many passes needed to call the function llvm::makeSubprogramMap()
to build a mapping from functions to subprograms, and the IR linker needed to
fix up function references in a way that caused quadratic complexity in the IR
linking phase of LTO.

This change reverses the direction of the edge by storing the subprogram as
function-level metadata and removing DISubprogram's function field.

Since this is an IR change, a bitcode upgrade has been provided.

Fixes PR23367. An upgrade script for textual IR for out-of-tree clients is
attached to the PR.

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

llvm-svn: 252219
2015-11-05 22:03:56 +00:00
Chaoren Lin 18da38edb3 Fix OS X tests.
llvm-svn: 252218
2015-11-05 22:00:47 +00:00
Tim Northover 775aaeb765 Remove windows line endings introduced by r252177. NFC.
llvm-svn: 252217
2015-11-05 21:54:58 +00:00
Richard Smith 3f22bf947d Fix incorrect status for P0012R1.
llvm-svn: 252216
2015-11-05 21:42:32 +00:00
Richard Smith 60fc149e43 Fix CSS style name.
llvm-svn: 252215
2015-11-05 21:42:07 +00:00
Richard Smith 894835f611 Update C++ status page to match motions from Kona.
llvm-svn: 252214
2015-11-05 21:41:06 +00:00
Alexey Samsonov 55fda1be94 [ASan] Disable instrumentation for inalloca variables.
inalloca variables were not treated as static allocas, therefore didn't
participate in regular stack instrumentation. We don't want them to
participate in dynamic alloca instrumentation as well.

llvm-svn: 252213
2015-11-05 21:18:41 +00:00
Alexander Kornienko db73c2f54c Refactor: Simplify boolean conditional return statements in lib/llvm/ExecutionEngine/Orc
Patch by Richard Thomson!

Differential revision: http://reviews.llvm.org/D9973

llvm-svn: 252212
2015-11-05 21:18:09 +00:00
Richard Smith d0637bd1c6 PR25368: Replace workaround for build failure with modules enabled with a fix
for the root cause. The 'using llvm::isa;' declaration in Basic/LLVM.h only
pulls the declarations of llvm::isa that were declared prior to it into
namespace clang. In a modules build, this is a hermetic set of just the
declarations from LLVM. In a non-modules build, we happened to also pull the
declaration from lib/CodeGen/Address.h into namespace clang, which made the
code in question accidentally compile.

llvm-svn: 252211
2015-11-05 21:16:22 +00:00
Reid Kleckner 6ddae31045 [WinEH] Fix funclet prologues with stack realignment
We already had a test for this for 32-bit SEH catchpads, but those don't
actually create funclets. We had a bug that only appeared in funclet
prologues, where we would establish EBP and ESI as our FP and BP, and
then downstream prologue code would overwrite them.

While I was at it, I fixed Win64+funclets+stackrealign. This issue
doesn't come up as often there due to the ABI requring 16 byte stack
alignment, but now we can rest easy that AVX and WinEH will work well
together =P.

llvm-svn: 252210
2015-11-05 21:09:49 +00:00
Alexander Kornienko 484e48e3a3 Refactor: Simplify boolean conditional return statements in llvm/lib/Analysis
Patch by Richard Thomson!

Differential revision: http://reviews.llvm.org/D9967

llvm-svn: 252209
2015-11-05 21:07:12 +00:00
Dan Gohman b9ce5a8b6c [WebAssembly] Fix copypasta.
Noticed by dschff in http://reviews.llvm.org/rL252203

llvm-svn: 252208
2015-11-05 20:59:49 +00:00
Alexander Kornienko 3b7df53d04 Refactor: Simplify boolean conditional return statements in clang-apply-replacements
Differential revision: http://reviews.llvm.org/D10025

Patch by Richard Thomson!

llvm-svn: 252207
2015-11-05 20:59:17 +00:00
Richard Smith 85f93f34cb Improve macro dumping to preserve semantically-relevant spelling information.
llvm-svn: 252206
2015-11-05 20:55:14 +00:00
Chaoren Lin 2a7a94a655 Completely avoid building Apple simulator on non-Darwin platforms.
Summary:
This is a resubmission of r252179, but correctly ignores the source
files for other platforms.

Reviewers: granata.enrico, tberghammer, zturner, jingham

Subscribers: lldb-commits

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

llvm-svn: 252205
2015-11-05 20:45:29 +00:00
Dan Gohman da7f428a4a [WebAssembly] Rename Immediate instructions to Const.
This more closely reflects the naming convention in the spec.

llvm-svn: 252204
2015-11-05 20:44:29 +00:00
Dan Gohman af29bd4fd4 [WebAssembly] Add AsmString strings for most instructions.
Mangling type information into MachineInstr opcode names was a temporary
measure, and it's starting to get hairy. At the same time, the MC instruction
printer wants to use AsmString strings for printing. This patch takes the
first step, starting the process of adding AsmStrings for instructions.

llvm-svn: 252203
2015-11-05 20:42:30 +00:00
Dan Gohman d7ffb919c1 [WebAssembly] Update wasm builtin functions to match spec changes.
The page_size operator has been removed from the spec, and the resize_memory
operator has been changed to grow_memory.

llvm-svn: 252202
2015-11-05 20:16:59 +00:00
Dan Gohman 24f0a08c1b [WebAssembly] Update wasm builtin functions to match spec changes.
The page_size operator has been removed from the spec, and the resize_memory
operator has been changed to grow_memory.

llvm-svn: 252201
2015-11-05 20:16:37 +00:00
Tobias Grosser f1bfd75221 ScopInfo: Allocate globally unique memory access identifiers
Before this commit memory reference identifiers have only been unique per
basic block, but not per (non-affine) ScopStmt. This commit now uses the
MemoryAccess base pointer to uniquely identify each Memory access.

llvm-svn: 252200
2015-11-05 20:15:37 +00:00
Marshall Clow 6a11b039d9 Mark LWG issue #2234. We already do this; no code change needed
llvm-svn: 252199
2015-11-05 19:57:50 +00:00
Sean Callanan a95b131c9b Better validation when we think a directory might be Xcode.app.
LLDB could otherwise get confused if it is (for example) in a
root that is meant to install into an Xcode.app but hasn't
been installed yet.  That way Xcode can fall back to the real
Xcode.app rather than trying to look for resources inside the
root.

llvm-svn: 252198
2015-11-05 19:46:12 +00:00
Tobias Grosser 4bf262a0f2 RunTimeDebugBuilder: Allocate memory _after_ knowing how much is needed
This fixes a memory corruption issue, where we accessed more memory than
actually allocated.

llvm-svn: 252197
2015-11-05 19:43:34 +00:00
Sanjay Patel 387e66e79f replace MachineCombinerPattern namespace and enum with enum class; NFCI
Also, remove an enum hack where enum values were used as indexes into an array.

We may want to make this a real class to allow pattern-based queries/customization (D13417).

llvm-svn: 252196
2015-11-05 19:34:57 +00:00
Marshall Clow 2cd0d6d625 Implement P0092R1 for C++1z
llvm-svn: 252195
2015-11-05 19:33:59 +00:00
Dan Gohman e9361d58ff [WebAssembly] Add WebAssemblyMCInstLower.cpp.
This isn't used yet; it's just a start towards eventually using MC to
do instruction printing, and eventually binary encoding.

llvm-svn: 252194
2015-11-05 19:28:16 +00:00
Kevin Enderby 35dfc95efe These are the matching changes needed to the lld project for the changes to llvm
in r252192 that changed the Archive and Child interfaces in libObject. These include
Rafael Espindola’s many suggested updates.

llvm-svn: 252193
2015-11-05 19:25:47 +00:00
Kevin Enderby 7a96942a6a Reapply r250906 with many suggested updates from Rafael Espindola.
The needed lld matching changes to be submitted immediately next,
but this revision will cause lld failures with this alone which is expected.

This removes the eating of the error in Archive::Child::getSize() when the characters
in the size field in the archive header for the member is not a number.  To do this we
have all of the needed methods return ErrorOr to push them up until we get out of lib.
Then the tools and can handle the error in whatever way is appropriate for that tool.

So the solution is to plumb all the ErrorOr stuff through everything that touches archives.
This include its iterators as one can create an Archive object but the first or any other
Child object may fail to be created due to a bad size field in its header.

Thanks to Lang Hames on the changes making child_iterator contain an
ErrorOr<Child> instead of a Child and the needed changes to ErrorOr.h to add
operator overloading for * and -> .

We don’t want to use llvm_unreachable() as it calls abort() and is produces a “crash”
and using report_fatal_error() to move the error checking will cause the program to
stop, neither of which are really correct in library code. There are still some uses of
these that should be cleaned up in this library code for other than the size field.

The test cases use archives with text files so one can see the non-digit character,
in this case a ‘%’, in the size field.

These changes will require corresponding changes to the lld project.  That will be
committed immediately after this change.  But this revision will cause lld failures
with this alone which is expected.

llvm-svn: 252192
2015-11-05 19:24:56 +00:00
Zachary Turner c1b7cd72db Python 3 - Turn on absolute imports, and fix existing imports.
Absolute imports were introduced in Python 2.5 as a feature
(e.g. from __future__ import absolute_import), and made default
in Python 3.

When absolute imports are enabled, the import system changes in
a couple of ways:

1) The `import foo` syntax will *only* search sys.path.  If `foo`
   isn't in sys.path, it won't be found.  Period.  Without absolute
   imports, the import system will also search the same directory
   that the importing file resides in, so that you can easily
   import from the same folder.

2) From inside a package, you can use a dot syntax to refer to higher
   levels of the current package.  For example, if you are in the
   package lldbsuite.test.utility, then ..foo refers to
   lldbsuite.test.foo.  You can use this notation with the
   `from X import Y` syntax to write intra-package references.  For
   example, using the previous locationa s a starting point, writing
   `from ..support import seven` would import lldbsuite.support.seven

Since this is now the default behavior in Python 3, this means that
importing from the same directory with `import foo` *no longer works*.
As a result, the only way to have portable code is to force absolute
imports for all versions of Python.

See PEP 0328 [https://www.python.org/dev/peps/pep-0328/] for more
information about absolute and relative imports.

Differential Revision: http://reviews.llvm.org/D14342
Reviewed By: Todd Fiala

llvm-svn: 252191
2015-11-05 19:22:28 +00:00
Zachary Turner 185a7aadda Fix build on platforms that don't have dlfcn.h
llvm-svn: 252190
2015-11-05 19:22:06 +00:00
Zachary Turner 71d468be66 Python 3 - Fix usage of `unicode` in unittest2.
llvm-svn: 252189
2015-11-05 19:21:56 +00:00
Jim Ingham 56584698ac Add a comment explaining TypeImpl.
llvm-svn: 252188
2015-11-05 19:20:39 +00:00
John McCall fbe5ed7807 After some discussion, promote -fobjc-weak to a driver option.
rdar://problem/23415863

llvm-svn: 252187
2015-11-05 19:19:56 +00:00
Davide Italiano a345877ce8 [SimplifyLibCalls] Use hasFloatVersion(). NFCI.
llvm-svn: 252186
2015-11-05 19:18:23 +00:00
Devin Coughlin e949add687 [analyzer] Update RegionStoreManager::getBinding to handle BlockDataRegions
Update RegionStoreManager::getBinding() to return UnknownVal when trying to get
the binding for a BlockDataRegion. Previously, getBinding() would try to cast the
BlockDataRegion to a TypedValueRegion and crash. This happened when a block
was passed as a parameter to an inlined function for which
StackHintGeneratorForSymbol::getMessage() tried to generate a stack hint message.

rdar://problem/21291971

llvm-svn: 252185
2015-11-05 18:56:42 +00:00
Jim Ingham 6192d1c050 Remove Copy and Paste error in a comment.
llvm-svn: 252184
2015-11-05 18:51:48 +00:00
Chaoren Lin edd0e2639e Use lldb::pid_t instead of pid_t.
Reviewers: granata.enrico

Subscribers: lldb-commits

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

llvm-svn: 252183
2015-11-05 18:49:03 +00:00
Chaoren Lin 803cf14e52 Revert "Do not build any of the simulator material on non-Darwin"
This breaks the cmake build on all non-darwin platforms.

This reverts commit ff6cc332dd6654620e3408d06f8f49a0c9b3cd41.

rL252179

llvm-svn: 252182
2015-11-05 18:49:02 +00:00
Zachary Turner cc8aa4f619 Python 3 - Apply 2to3 `filter` fixer to unittest2.
llvm-svn: 252181
2015-11-05 18:38:02 +00:00
Sergey Dmitrouk 195f3a15e6 [compiler-rt][aarch64] New tests for 128-bit floating-point builtins, fixes of tests and __fixuint
Summary:
The following tests for 128-bit floating-point type behaved in a strange way, thought it were bugs, but seem to be mistakes in tests:

 * `fixtfsi` test checked for `0x80000001` as a value returned for number less than can be represented, while `LONG_MIN` should be returned on saturation;
 * `fixunstfdi` wasn't enabled for AArch64, only for PPC, but there is nothing PPC specific in that test;
 * `multf3` tried to underflow multiplication by producing result with 16383 exponent, while there are still 112 bits of fraction plus implicit bit, so resultant exponent should be 16497.

Tests for some other builtins didn't exist:

 * `fixtfdi`
 * `fixtfti`
 * `fixunstfti`

They were made by copying similar files and adjusting for wider types and adding/removing some reasonable/extra checks.

Also `__fixuint` seems to have off by one error, updated tests to catch this case.

Reviewers: rengolin, zatrazz, howard.hinnant, t.p.northover, jmolloy, enefaim

Subscribers: aemerson, llvm-commits, rengolin

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

llvm-svn: 252180
2015-11-05 18:36:42 +00:00
Enrico Granata daf1c8bfc7 Do not build any of the simulator material on non-Darwin
llvm-svn: 252179
2015-11-05 18:23:10 +00:00
Rui Ueyama 7f20fb90e2 Remove redundant namespace specifiers.
llvm-svn: 252178
2015-11-05 18:13:25 +00:00
Oleg Ranevskyy 057c5a6b2b [DebugInfo] Fix ARM/AArch64 prologue_end position. Related to D11268.
Summary:
This review is related to another review request http://reviews.llvm.org/D11268, does the same and merely fixes a couple of issues with it.

D11268 is quite old and has merge conflicts against the current trunk.
This request 
 - rebases D11268 onto the new trunk;
 - resolves the merge conflicts;
 - fixes the prologue_end tests, which do not pass due to the subprogram definitions not marked as distinct.

Reviewers: echristo, rengolin, kubabrecka

Subscribers: aemerson, rengolin, jyknight, dsanders, llvm-commits, asl

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

llvm-svn: 252177
2015-11-05 17:50:17 +00:00