Commit Graph

212564 Commits

Author SHA1 Message Date
Chris Bieneman 6ed46bd380 [CMake] [macho_embedded] [builtins] Need to also drop the bswap builtins.
llvm-svn: 249914
2015-10-09 22:46:19 +00:00
Chris Bieneman 626f6a057c [CMake] Adding support for generating libclang_rt.eprintf.a
This library provides eprintf for i386 on OS X versions later than 10.4.

llvm-svn: 249913
2015-10-09 22:40:50 +00:00
Chris Bieneman 0ed9bc1995 [CMake] hand tuning the macho_embedded export lists to match the current Xcode distribution.
llvm-svn: 249912
2015-10-09 22:40:47 +00:00
Chris Bieneman 8a3e6e19af [CMake] Parallel make breaks on native tablegen
Patch by Alex Wang

This patch resolves a parallelization issue that occurs when native tablegen targets are built at the same time. They both try to build libSupport and clobber each other causing the builds to fail.

llvm-svn: 249911
2015-10-09 22:26:04 +00:00
David Majnemer 35d27b21a1 [WinEH] Insert the catchpad return before CSR restoration
x64 catchpads use rax to inform the unwinder where control should go
next.  However, we must initialize rax before the epilogue sequence so
as to not perturb the unwinder.

llvm-svn: 249910
2015-10-09 22:18:45 +00:00
Richard Smith 81ff44d89d Fix use of uninitialized bool, found by ubsan in portion of
test/tools/llvm-objdump/malformed-machos.test added in r249845.

llvm-svn: 249909
2015-10-09 22:09:56 +00:00
James Y Knight 692e037499 Fix assert when emitting llvm.pow.f86.
This occurred due to introducing the invalid i64 type after type
legalization had already finished, in an attempt to workaround bitcast
f64 -> v2i32 not doing constant folding.

The *right* thing is to actually fix bitcast, but that has other
complications. So, for now, just get rid of the broken workaround, and
check in a test-case showing that it doesn't crash, with TODOs for
emitting proper code.

llvm-svn: 249908
2015-10-09 21:36:19 +00:00
Diego Novillo 935cc537a6 Remove unused function in sample profile writer API - NFC.
These functions are not needed and are getting in the way of changes
for implementing a table of contents for the binary format.

llvm-svn: 249907
2015-10-09 21:33:13 +00:00
Reid Kleckner e1c8a7f9c7 [SEH] Fix _except_handler4 table base states
We got them right for the old IR, but not with funclets.  Port the old
test to the new IR and fix the code.

llvm-svn: 249906
2015-10-09 21:27:28 +00:00
Aaron Ballman f6e237e606 Explicitly enable -fcxx-exceptions for this test to appease Windows build bots.
llvm-svn: 249905
2015-10-09 21:15:00 +00:00
Rui Ueyama ff77768569 ELF2: Move Target and entry initialization from SymbolTable to Driver.
SymbolTable was not a right place for initialization. We had to do that
because Driver didn't know what type of ELF objects are being handled.
We taught Driver that, so we can now move this code to Driver.

llvm-svn: 249904
2015-10-09 21:12:40 +00:00
Duncan P. N. Exon Smith 6e98cd32dc CodeGen: Avoid more ilist iterator implicit conversions, NFC
llvm-svn: 249903
2015-10-09 21:08:19 +00:00
Rui Ueyama 3ce825ed26 ELF2: Make SymbolTable a template class.
SymbolTable was not a template class. Instead we had switch-case-based
type dispatch to call desired functions. We had to do that because
SymbolTable was created before we know what ELF type objects had been
passed.

Every time I tried to add a new function to the symbol table, I had to
define a dispatcher which consist of a single switch statement.

It also brought an restriction what the driver can do. For example,
we cannot add undefined symbols before any files are added to the symbol
table. That's because no symbols can be added until the symbol table
knows the ELF type, but when it knows about that, it's too late.

In this patch, the driver makes a decision on what ELF type objects
are being handled. Then the driver creates a SymbolTable object for
an appropriate ELF type.

http://reviews.llvm.org/D13544

llvm-svn: 249902
2015-10-09 21:07:25 +00:00
Duncan P. N. Exon Smith 1ff409802d CodeGen: Use range-based for in PostRAScheduler, NFC
llvm-svn: 249901
2015-10-09 21:05:00 +00:00
Zachary Turner 638b98d3ed Fix build broken by r249885
llvm-svn: 249900
2015-10-09 20:56:23 +00:00
Aaron Ballman fd78cc88cf Add a new checker that tests whether a throw expression throws by value, and whether a catch statement catches by reference.
Patch by Tobias Langner!

llvm-svn: 249899
2015-10-09 20:42:44 +00:00
Reid Kleckner d880dc7509 [SEH] Remember to emit the last invoke range for SEH
This wasn't very observable in execution tests, because usually there is
an invoke in the catchpad that unwinds the the catchendpad but never
actually throws.

llvm-svn: 249898
2015-10-09 20:39:39 +00:00
Mohit K. Bhakkad 3b27bf4d47 Correction in rL249838: Moving test to appropriate directory
llvm-svn: 249897
2015-10-09 20:36:54 +00:00
Douglas Gregor d4f2afa23c Fix inference of _Nullable for weak Objective-C properties.
The inference of _Nullable for weak Objective-C properties was broken
in several ways:

* It was back-patching the type information very late in the process
  of checking the attributes for an Objective-C property, which is
  just wrong.
* It was using ad hoc checks to try to suppress the warning about
  missing nullability specifiers (-Wnullability-completeness), which
  didn't actual work in all cases (rdar://problem/22985457)
* It was inferring _Nullable even outside of assumes-nonnull regions,
  which is wrong.

Putting the inference of _Nullable for weak Objective-C properties in
the same place as all of the other inference logic fixes all of these
ills.

llvm-svn: 249896
2015-10-09 20:36:17 +00:00
Rui Ueyama 6ccc8ca6d9 Simplify. NFC.
llvm-svn: 249895
2015-10-09 20:32:54 +00:00
Eric Christopher c04cb4a123 Add a fixme to handleTargetFeatures.
The goal of wanting this to avoid munging the feature list is so
that it can be used for various targets as a way of both adding
and verifying the features that are going to be output into the
IR.

llvm-svn: 249894
2015-10-09 20:30:48 +00:00
Douglas Katzman 795f57fa7a [Myriad]: put libstdc++ and libc in the right order
llvm-svn: 249893
2015-10-09 20:26:20 +00:00
Owen Anderson 97ca0f3f2c Generalize convergent check to handle invokes as well as calls.
llvm-svn: 249892
2015-10-09 20:17:46 +00:00
James Y Knight 5b8217bc05 Fix assert in X86 backend.
When running combine on an extract_vector_elt, it wants to look through
a bitcast to check if the argument to the bitcast was itself an
extract_vector_elt with particular operands.

However, it called getOperand() on the argument to the bitcast *before*
checking that the opcode was EXTRACT_VECTOR_ELT, assert-failing if there
were zero operands for the actual opcode.

Fix, and add trivial test.

llvm-svn: 249891
2015-10-09 20:10:14 +00:00
Richard Smith a6e8ebb0d9 Split <wctype.h> out of <cwctype>.
llvm-svn: 249890
2015-10-09 19:57:37 +00:00
Richard Smith 897758d6ba Split <wchar.h> out of <cwchar>.
llvm-svn: 249889
2015-10-09 19:56:37 +00:00
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