Commit Graph

212538 Commits

Author SHA1 Message Date
Chris Bieneman b9cca18f11 [CMake] Hand tuning the exclude lists for libclang_rt.10.4.a
llvm-svn: 249888
2015-10-09 19:53:54 +00:00
Chad Rosier 47eba05b47 Revert "Simplify code. NFC."
This reverts commit r248610.

llvm-svn: 249887
2015-10-09 19:48:48 +00:00
Zachary Turner 22c8efcd34 Port native Python-API to 3.x
With this change, liblldb is 95% of the way towards being able
to work under both Python 2.x and Python 3.x.  This should
introduce no functional change for Python 2.x, but for Python
3.x there are some important changes.  Primarily, these are:

1) PyString doesn't exist in Python 3.  Everything is a PyUnicode.
   To account for this, PythonString now stores a PyBytes instead
   of a PyString.  In Python 2, this is equivalent to a PyUnicode,
   and in Python 3, we do a conversion from PyUnicode to PyBytes
   and store the PyBytes.
2) PyInt doesn't exist in Python 3.  Everything is a PyLong.  To
   account for this, PythonInteger stores a PyLong instead of a
   PyInt.  In Python 2.x, this requires doing a conversion to
   PyLong when creating a PythonInteger from a PyInt.  In 3.x,
   there is no PyInt anyway, so we can assume everything is a
   PyLong.
3) PyFile_FromFile doesn't exist in Python 3.  Instead there is a
   PyFile_FromFd.  This is not addressed in this patch because it
   will require quite a large change to plumb fd's all the way
   through the system into the ScriptInterpreter.  This is the only
   remaining piece of the puzzle to get LLDB supporting Python 3.x.

Being able to run the test suite is not addressed in this patch.
After the extension module can compile and you can enter an embedded
3.x interpreter, the test suite will be addressed in a followup.

llvm-svn: 249886
2015-10-09 19:45:41 +00:00
Zachary Turner 3a1acdd955 Have CMake translate LLDB_PYTHON_HOME to forward slashes.
Using backslashes causes the compiler to interpret them as
escape sequences.

llvm-svn: 249885
2015-10-09 19:45:26 +00:00
Duncan P. N. Exon Smith 5ec1568c9c CodeGen: Continue removing ilist iterator implicit conversions
llvm-svn: 249884
2015-10-09 19:40:45 +00:00
Duncan P. N. Exon Smith 6ac07fd228 CodeGen: Remove implicit iterator conversions from MBB.cpp
Remove implicit ilist iterator conversions from MachineBasicBlock.cpp.

I've also added an overload of `splice()` that takes a pointer, since
it's a natural API.  This is similar to the overloads I added for
`remove()` and `erase()` in r249867.

llvm-svn: 249883
2015-10-09 19:36:12 +00:00
Rui Ueyama d888d10cf4 ELF2: Reduce code repetition.
llvm-svn: 249882
2015-10-09 19:34:55 +00:00
Rafael Espindola 444576d4c4 Add support for comdats.
The implementation is a direct translation to c++ of the rules in the ELF spec.

llvm-svn: 249881
2015-10-09 19:25:07 +00:00
Duncan P. N. Exon Smith 0ac8eb9171 CodeGen: Avoid ilist iterator implicit conversions in a few more places, NFC
llvm-svn: 249880
2015-10-09 19:23:20 +00:00
Duncan P. N. Exon Smith 5ae5939fa1 CodeGen: Remove more ilist iterator implicit conversions, NFC
llvm-svn: 249879
2015-10-09 19:13:58 +00:00
Duncan P. N. Exon Smith 6c64aeb065 CodeGen: Use range-based for in IntrinsicLowering::AddPrototypes, NFC
This happens to avoid a host of implicit ilist iterator conversions.

llvm-svn: 249877
2015-10-09 19:07:41 +00:00
Duncan P. N. Exon Smith 530d040bd9 CodeGen: Use range-based for in GlobalMerge, NFC
llvm-svn: 249876
2015-10-09 18:57:47 +00:00
Duncan P. N. Exon Smith d83547a16e CodeGen: Remove a few more ilist iterator implicit conversions, NFC
llvm-svn: 249875
2015-10-09 18:44:40 +00:00
Owen Anderson 2c9978b12b Teach LoopUnswitch not to perform non-trivial unswitching on loops containing convergent operations.
Doing so could cause the post-unswitching convergent ops to be
control-dependent on the unswitch condition where they were not before.
This check could be refined to allow unswitching where the convergent
operation was already control-dependent on the unswitch condition.

llvm-svn: 249874
2015-10-09 18:40:20 +00:00
Owen Anderson dbd02a40d2 Add iterator ranges for blocks in a Loop.
llvm-svn: 249873
2015-10-09 18:40:15 +00:00
Eric Christopher b093d69062 Fix whitespace, 80-column violations, embedded tabs for the
TargetInfo class.

llvm-svn: 249872
2015-10-09 18:39:59 +00:00
Eric Christopher 8c47b427f9 constify the feature vector going into initFeatureMap as it shouldn't
change the set of features.

llvm-svn: 249871
2015-10-09 18:39:55 +00:00
Chris Bieneman 2c23a80bbf [CMake] [Darwin] [builtins] Need to special case the naming of the OS X cc_kext builtin library.
llvm-svn: 249870
2015-10-09 18:38:34 +00:00
Duncan P. N. Exon Smith 6b40936b81 CodeGen: Remove implicit iterator conversions from SlotIndexes.h, NFC
Be explicit about changes between pointers and iterators, as with other
recent commits.  This transitively removes implicit ilist iterator
conversions from about 20 source files in CodeGen.

llvm-svn: 249869
2015-10-09 18:35:09 +00:00
Chris Bieneman 4ebd15726f [CMake] [darwin] [builitins] Don't build x86_64h into the 10.4 builtins library
There is no haswell support in 10.4, so we don't need a 10.4 builtin library.

llvm-svn: 249868
2015-10-09 18:32:34 +00:00
Duncan P. N. Exon Smith 980f8f2639 CodeGen: Remove implicit conversions from Analysis and BranchFolding
Remove a few more implicit ilist iterator conversions, this time from
Analysis.cpp and BranchFolding.cpp.

I added a few overloads for `remove()` and `erase()`, which quite
naturally take pointers as well as iterators as parameters.  This will
reduce the churn at least in the short term, but I don't really have a
problem with these existing for longer.

llvm-svn: 249867
2015-10-09 18:23:49 +00:00
David Blaikie 91e113d1dd Remove some unused variables in -Asserts builds
llvm-svn: 249866
2015-10-09 18:22:18 +00:00
Owen Anderson d95b08a0a7 Refine the definition of convergent to only disallow the addition of new control dependencies.
This covers the common case of operations that cannot be sunk.
Operations that cannot be hoisted should already be handled properly via
the safe-to-speculate rules and mechanisms.

llvm-svn: 249865
2015-10-09 18:06:13 +00:00
Sean Callanan c7b054a60c Don't blindly use C for eLanguageTypeUnknown when getting a scratch TypeSystem.
Instead check what languages are supported for expressions; use C if available,
but otherwise pick one of the supported languages.
This can be overridden using the target settings.

<rdar://problem/22290878>

llvm-svn: 249864
2015-10-09 18:01:10 +00:00
Sanjay Patel 9fbe22bac6 fix typos; NFC
llvm-svn: 249863
2015-10-09 18:01:03 +00:00
Chris Bieneman 0ac9109d22 [CMake] If LLVM_DYLIB_EXPORT_ALL is On don't generate an export list at all, just export the world.
This should resolve Bug 24157 - CMake built shared library does not export all public symbols

llvm-svn: 249862
2015-10-09 17:55:21 +00:00
Diego Novillo a7f1e8ef83 Add inline stack streaming to binary sample profiles.
With this patch we can now read and write inline stacks in sample
profiles to the binary encoded profiles.

In a subsequent patch, I will add a string table to the binary encoding.
Right now function names are emitted as strings every time we find them.
This is too bloated and will produce large files in applications with
lots of inlining.

llvm-svn: 249861
2015-10-09 17:54:24 +00:00
Bruce Mitchener 26c6e64159 [debugserver,cmake] Add DEPENDS to custom commands.
Summary:
Add dependencies to the custom commands so that they get
re-executed as needed.

Reviewers: clayborg

Subscribers: lldb-commits

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

llvm-svn: 249860
2015-10-09 17:51:19 +00:00
Dan Gohman ee1588ce96 [WebAssembly] Rename floating-point operators to match their spec names.
llvm-svn: 249859
2015-10-09 17:50:00 +00:00
Chris Bieneman 8c2abff17e [CMake] Fixing LTO library path passed into bootstrap builds.
This just fixes a small error in constructing the path to the LTO library.

llvm-svn: 249858
2015-10-09 17:45:44 +00:00
Jonathan Peyton f0344bb02b [OMPT] Reduce overhead of OMPT
* Avoid computing state needed only by OMPT unless the ompt_enabled flag is set.
* Properly handle a corner case in OMPT where team == NULL.

Patch by John Mellor-Crummey

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

llvm-svn: 249857
2015-10-09 17:42:52 +00:00
Artur Pilipenko cca800207a Add verification for align, dereferenceable, dereferenceable_or_null load metadata
Reviewed By: reames

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

llvm-svn: 249856
2015-10-09 17:41:29 +00:00
Jonathan Peyton b401db6d73 [OMPT] Initialize task fields only if needed
Because __kmp_task_init_ompt is called for every initial task in each thread
and always generated task ids, this was a big performance issue on bigger
systems even without any tool attached.  After changing the initialization 
interface to ompt_tool, we can now rely on already knowing whether a tool is
attached and OMPT is enabled at this point.

Patch by Jonas Hahnfeld

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

llvm-svn: 249855
2015-10-09 17:38:05 +00:00
Keno Fischer 21a7f23666 Clear SectionSymbols in MCContext::Reset
This was just forgotten when SectionSymbols was introduced and could cause
corruption if the MCContext was reused after Reset.

Reviewers: rafael

Subscribers: llvm-commits

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

llvm-svn: 249854
2015-10-09 17:24:54 +00:00
Johannes Doerfert 697fdf891c Consolidate invariant loads
If a (assumed) invariant location is loaded multiple times we
  generated a parameter for each location. However, this caused compile
  time problems for several benchmarks (e.g., 445_gobmk in SPEC2006 and
  BT in the NAS benchmarks). Additionally, the code we generate is
  suboptimal as we preload the same location multiple times and perform
  the same checks on all the parameters that refere to the same value.

  With this patch we consolidate the invariant loads in three steps:
    1) During SCoP initialization required invariant loads are put in
       equivalence classes based on their pointer operand. One
       representing load is used to generate a parameter for the whole
       class, thus we never generate multiple parameters for the same
       location.
    2) During the SCoP simplification we remove invariant memory
       accesses that are in the same equivalence class. While doing so
       we build the union of all execution domains as it is only
       important that the location is at least accessed once.
    3) During code generation we only preload one element of each
       equivalence class with the unified execution domain. All others
       are mapped to that preloaded value.

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

llvm-svn: 249853
2015-10-09 17:12:26 +00:00
Duncan P. N. Exon Smith 769e1a972d AArch64: Make getNextNode() cleanup in r249764 more clear
After r249764, if you didn't see the full context, it looked like
`std::next(I)` would get the same result as
`++MachineBasicBlock::iterator(I)`.  However, `I` is a `MachineInstr*`
(not a `MachineBasicBlock::iterator`).

Use the `getIterator()` helper I added later (r249782) to make this code
more clear.

llvm-svn: 249852
2015-10-09 16:54:54 +00:00
Duncan P. N. Exon Smith 8f11e1a713 CodeGen: Start removing implicit conversions to/from list iterators, NFC
Start removing implicit conversions to/from list iterators in CodeGen,
ala r249782 for IR.  A lot more to go after this.

llvm-svn: 249851
2015-10-09 16:54:49 +00:00
Duncan P. N. Exon Smith 8f39941669 Revert "Support: Partially revert r249782 to unbreak clang build"
This reverts commit r249783, fully reinstating r249782.  I've fixed the
bug in clang: it was a non-const iterator that dereferenced to const
(but had an implicit conversion to non-const).

llvm-svn: 249850
2015-10-09 16:51:23 +00:00
Duncan P. N. Exon Smith 14c71c6644 Analysis: Make CFG::graph_iterator dereference to non-const
Since the original commit in r145858, we've had `CFG::graph_iterator`
and `CFG::const_graph_iterator`, and both have derefenced to a
`const`-ified `value_type`.  The former has an implicit conversion to
non-`const`, which is how this worked at all until r249782 started using
the dereference operator (partially reverted in r249783).

This fixes the non-const iterator to be non-const (sometimes
const-iterators are intentional, but with a separate const-ified class
(and a non-const implicit conversion leak) that's not likely to be the
case here).

llvm-svn: 249849
2015-10-09 16:50:55 +00:00
Dehao Chen 41dc5a6e86 Make HeaderLineno a local variable.
http://reviews.llvm.org/D13576

As we are using hierarchical profile, there is no need to keep HeaderLineno a member variable. This is because each level of the inline stack will have its own header lineno. One should use the head lineno of its own inline stack level instead of the actual symbol.

llvm-svn: 249848
2015-10-09 16:50:16 +00:00
Reid Kleckner 848055ad16 Fix pdb.test when python is not on PATH
llvm-svn: 249847
2015-10-09 16:49:56 +00:00
Reid Kleckner 04ab116e41 Fix VFS GCC unittest on Windows
llvm-svn: 249846
2015-10-09 16:48:52 +00:00
Kevin Enderby af7c9d0123 Fixed two bugs in llvm-objdump’s printing of Objective-C meta data
from malformed Mach-O files that caused crashes.  The first because the
offset in a dyld bind table entry was out of range.  The second because their
was no image info section and the routine printing it did not have the
need check to see the section did not exist.

rdar://22983603

llvm-svn: 249845
2015-10-09 16:48:44 +00:00
Chris Bieneman 3a1ad39702 [CMake] [Darwin] [Builtins] Fixing a typo that was keeping the OS X 10.4 builtins library from being built properly.
llvm-svn: 249844
2015-10-09 16:47:43 +00:00
Rafael Espindola 26fd69de90 Don't silently ignore an error.
Found by inspection.

llvm-svn: 249843
2015-10-09 16:15:57 +00:00
Rui Ueyama af311c1d01 ELF2: Call OutputSection::finalize() from createSections.
Previously, we did this in assignAddresses(), but finalization was
not part of assigning addresses, so this is a better place.

llvm-svn: 249842
2015-10-09 16:03:53 +00:00
Artur Pilipenko ffd132878a ValueTracking: use getAlignment in isAligned
Reviewed By: reames

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

llvm-svn: 249841
2015-10-09 15:58:26 +00:00
Bruce Mitchener 7d9a419a3a Remove long-forgotten plugin virtuals.
Summary:
EnablePluginLogging, GetPluginCommandHelp and ExecutePluginCommand aren't
implemented or used anywhere, so remove them from the Hexagon and POSIX
Dynamic Loaders as well as the FreeBSD process.

Reviewers: clayborg, labath, emaste

Subscribers: lldb-commits, emaste

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

llvm-svn: 249840
2015-10-09 15:37:10 +00:00
Rui Ueyama bf3fd7c9a0 ELF2: Emit a PT_PHDR header as the first entry of the program header.
PT_PHDR entry points to the program header itself.

llvm-svn: 249839
2015-10-09 15:31:49 +00:00
Mohit K. Bhakkad 18af8a20c5 [LLDB] Fix display of value of a vector variables in watchpoint operations
Reviewers: clayborg, zturner.
Subscribers: jaydeep, bhushan, sagar, nitesh.jain, brucem,lldb-commits.
Differential Revision: http://reviews.llvm.org/D13202

llvm-svn: 249838
2015-10-09 15:13:20 +00:00