Commit Graph

154973 Commits

Author SHA1 Message Date
Benjamin Kramer 23632bd466 ARMAsmParser: Plug a leak.
Using an object to do the cleanup may look like overkill, but it's safer and nicer than putting deletes everywhere.

llvm-svn: 187696
2013-08-03 22:16:24 +00:00
Benjamin Kramer dcfd5b525a Stop leaking register infos in the disassemblers.
llvm-svn: 187695
2013-08-03 22:16:16 +00:00
Craig Topper 50ad5b7354 Add support for passing -1 to __builtin_shufflevector to signify an undefined element value to match IR capabilities.
llvm-svn: 187694
2013-08-03 17:40:38 +00:00
Hal Finkel b176acb6b7 Fix PPC64 64-bit GPR inline asm constraint matching
Internally, the PowerPC backend names the 32-bit GPRs R[0-9]+, and names the
64-bit parent GPRs X[0-9]+. When matching inline assembly constraints with
explicit register names, on PPC64 when an i64 MVT has been requested, we need
to follow gcc's convention of using r[0-9]+ to refer to the 64-bit (parent)
registers.

At some point, we'll probably want to arrange things so that the generic code
in TargetLowering uses the AsmName fields declared in *RegisterInfo.td in order
to match these inline asm register constraints. If we do that, this change can
be reverted.

llvm-svn: 187693
2013-08-03 12:25:10 +00:00
Matt Arsenault 2f9cce2cd6 Minor address space code simplification.
Remove assertion that the verifier should catch.

llvm-svn: 187692
2013-08-03 01:03:12 +00:00
Rui Ueyama 05f1ae987b Remove unused using's.
llvm-svn: 187690
2013-08-02 23:22:46 +00:00
Hans Wennborg 1bd0445e02 Options.td: remove _DASH_DASH
Since LLVM r187675, this is handled by the option parsing code itself.

llvm-svn: 187689
2013-08-02 23:21:32 +00:00
Rui Ueyama 707754f3e8 [PECOFF] Move more code from Atoms.h to ReaderCOFF.cpp.
llvm-svn: 187688
2013-08-02 22:58:22 +00:00
Bob Wilson 8d7e6906d1 Regenerate with changes for -rdynamic.
llvm-svn: 187687
2013-08-02 22:51:11 +00:00
Bob Wilson 8658b9147d Link with -rdynamic instead of -Wl,-export-dynamic.
Recent versions of the OS X linker support this but follow the existing
OS X linker convention of using an underscore in the option name, i.e.,
-export_dynamic. Rather than changing our configure scripts to check for
that alternate spelling, it is simpler to just use the compiler's -rdynamic
option and let it deal with translating that to the appropriate linker
option. One potential disadvantage of this approach is that the compiler
will typically ignore -rdynamic on platforms where it is not supported, so
the HAVE_LINK_EXPORT_DYNAMIC in config.h will not necessarily show whether
that option has any effect or not. I don't see any in-tree uses of that
macro, so I'm assuming it is OK.

llvm-svn: 187686
2013-08-02 22:51:06 +00:00
Peter Collingbourne abca2ecaab Add a AttributeSetImpl::dump function.
This is for the benefit of those of us with inferior debuggers which
do not permit member function calls on value types.

llvm-svn: 187685
2013-08-02 22:34:30 +00:00
Fariborz Jahanian 3bfc35e26a ObjectiveC migrator. Differentiate 'instancetype'
from 'id' result type when deciding on migration
to instancetype.

llvm-svn: 187684
2013-08-02 22:34:18 +00:00
Rui Ueyama 35947af012 [PECOFF] Remove special treatment of "--" option.
Thanks to Hans' patch (r187675), OptTable now handles "--", so we don't
need this code in LLD.

llvm-svn: 187683
2013-08-02 22:34:12 +00:00
Peter Collingbourne bd6c7459bb Make one of the AttributeSet ctors maintain the invariant that the
attribute list is ordered by index.

Differential Revision: http://llvm-reviews.chandlerc.com/D1265

llvm-svn: 187682
2013-08-02 22:29:40 +00:00
Rui Ueyama f6e90afbf4 [PECOFF] Remove COFFDefinedFileAtom::originalOffset().
The aim of this patch is to reduce the dependency from COFFDefinedAtom
to COFF structs defined in llvm/Object/COFF.h. Currently many attributes
of the atom are computed in the atom. That provide a simple interface but
does not work well in some cases.

There are some cases that the same type atom is created from different
parts of a COFF file. One example is the BSS atom, which can be created
from the defined symbol in the .bss section or from the undefined symbol.
Computing attributes from different sources in the atom complicates the
code. We should compute it outside the atom.

In the next patch, I'll move more code from Atoms.h to ReaderCOFF.cpp.

llvm-svn: 187681
2013-08-02 22:27:15 +00:00
Bob Wilson 3d27dad728 Only use the Darwin linker's -export_dynamic option with supported versions.
Related to <rdar://problem/14578094>.

llvm-svn: 187680
2013-08-02 22:25:34 +00:00
Hans Wennborg 96d5484219 Re-commit r187637: "clang-cl: add more options"
> This adds a bunch of options to clang-cl. Notably, this includes
> all the options that get passed when doing a default build of a
> command-line project with msbuild.exe in Debug and Release modes,
> and I believe all flags from Reid's original patch.

The original commit was reverted in r187640 after it broke the Mac build.

This should now be fixed, by Clang r187668, LLVM r187675, and putting
a -- before %s in the test.

llvm-svn: 187679
2013-08-02 22:24:50 +00:00
Manuel Klimek d3ed59ae15 Implement Allman style.
Patch by Frank Miller.

llvm-svn: 187678
2013-08-02 21:31:59 +00:00
Rui Ueyama 4ecc59afce [PECOFF] Handle .drectve section.
Summary:
The .drectve section contains linker command line options, and the linker is
expected to interpret them as if they were given via the command line. In this
patch, the command line parser in the driver is called from the object file
reader to parse the string.

I think this patch is important, because this is the first step towards mutable
TargetInfo. We had a discussion about that on llvm-commits mailing list before.
I haven't removed "const" from the function signature yet. Instead, I just use
cast to remove "const". This is a temporary aid for an experiment. If we don't
see any issue with this mutable TargetInfo appraoch, I'll change the function
signature, and rename the class LinkerContext from TargetInfo.

Reviewers: kledzik

CC: llvm-commits

Differential Revision: http://llvm-reviews.chandlerc.com/D1246

llvm-svn: 187677
2013-08-02 21:26:14 +00:00
Manuel Klimek 1863e505ce Fix crash when encountering alias templates in isDerivedFrom matches.
- pull out function to drill to the CXXRecordDecl from the type,
  to allow recursive resolution
- make the analysis more robust by rather skipping values we don't
  understand

llvm-svn: 187676
2013-08-02 21:24:09 +00:00
Hans Wennborg b8f3420d1e Option parsing: recognize the special -- token
Everything that comes after -- should be treated as a filename. This
enables passing in filenames that would otherwise be conflated with
command-line options.

This is especially important for clang-cl which supports options
starting with /, which are easily conflatable with Unix-style
path names.

Differential Revision: http://llvm-reviews.chandlerc.com/D1274

llvm-svn: 187675
2013-08-02 21:20:27 +00:00
Hal Finkel e9efbf140b Fix invalid function pointers in bugpoint ExtractLoops
The ExtractLoops function tries to reduce the failing test case by extracting
one or more loops from the misoptimized piece of the program. In doing this,
ExtractLoops must keep the MiscompiledFunctions vector up-to-date by ensuring
that the pointers refer to functions in the current failing program.
Unfortunately, this is not trivial because:

 - ExtractLoops is iterative, and there are several early exits (and the
   MiscompiledFunctions vector must be consistent with the current program at
every non-fatal exit point).
 - Several of the utility functions used by ExtractLoops (such as
   TestOptimizer, some of which are called through the TestFn callback
parameter, and Linker::LinkModules) delete their inputs upon success.

This change adds several updates of the MiscompiledFunctions vector at
different points. The first is after the initial call to TestMergedProgram
which checks that the loop-extracted program still works. The second is after
the call to TestFn (TestOptimizer, for example). This function will delete its
inputs (which is why the existing ExtractLoops logic cloned the inputs first).

llvm-svn: 187674
2013-08-02 21:13:42 +00:00
Rui Ueyama f29065d0c6 [PECOFF] Return an error_code instead of calling report_fatal_error().
For an invalid input we should not call report_fatal_error(), because
when LLD is used as a library, we don't want to kill the whole app
because of a malformed input.

llvm-svn: 187673
2013-08-02 21:10:17 +00:00
Fariborz Jahanian 9275c688ea ObjectiveC migrator: Add another family of factory
methods which can be migrated to instancetype.

llvm-svn: 187672
2013-08-02 20:54:18 +00:00
Joey Gouly fcf6778172 Add a missing 'return' statement.
llvm-svn: 187671
2013-08-02 20:50:01 +00:00
Rui Ueyama 53f4660680 Use report_fatal_error() instead of llvm_unreachable() to show broken input file error.
llvm-svn: 187670
2013-08-02 20:45:25 +00:00
Matt Arsenault 9e8cdf06fd Fix missing * making the C++ mode thing not work
llvm-svn: 187669
2013-08-02 20:43:37 +00:00
Hans Wennborg d1ddb9afd4 CC1: Only parse command-line options that have the CC1Option flag.
We already reject flags that don't have the CC1Option flag,
but we would previously do so after parsing the command-line
arguments.

Since the option parser now has a parameter for excluding options,
we should just use that instead.

Differential Revision: http://llvm-reviews.chandlerc.com/D1270

llvm-svn: 187668
2013-08-02 20:16:22 +00:00
Akira Hatanaka 7be35cb1bf [mips] Expand vector truncating stores and extending loads.
llvm-svn: 187667
2013-08-02 19:23:33 +00:00
Joey Gouly 5d0564d2e6 [ARMv8] Add an assembler warning for the deprecated 'setend' instruction.
llvm-svn: 187666
2013-08-02 19:18:12 +00:00
Rui Ueyama 8e091352c9 [PECOFF] Remove an assertion that's too heavy.
llvm-svn: 187665
2013-08-02 19:10:29 +00:00
Rui Ueyama 8a14aa1bd9 [PECOFF] Relocations now take into account the address which is stored at the relocation site
Patch by Ron Ofir.

llvm-svn: 187664
2013-08-02 18:40:50 +00:00
Nadav Rotem 5defea90e6 SLPVectorizer: Fix PR16777. PHInodes may use multiple extracted values that come from different blocks.
Thanks Alexey Samsonov.

llvm-svn: 187663
2013-08-02 18:40:24 +00:00
Matt Arsenault 0e5df35556 Teach EmitGEPOffset about address spaces
llvm-svn: 187662
2013-08-02 18:33:34 +00:00
Fariborz Jahanian c4291852a4 ObjectiveC migrator: Fixes public buildbot failures,
in my previous patch which was reverted in r187657

llvm-svn: 187661
2013-08-02 18:00:53 +00:00
Matt Kopec 9c99030dea Mark additional icc test failures as expected fail.
llvm-svn: 187660
2013-08-02 17:53:28 +00:00
Howard Hinnant 2f51de568f debug mode for unordered_map. Also picked up a missing check and test in unordered_multimap. This wraps up debug mode for the unordered containers.
llvm-svn: 187659
2013-08-02 17:50:49 +00:00
Renato Golin 0178a25fc5 Fixes ARM LNT bot from SLP change in O3
This patch fixes the multiple breakages on ARM test-suite after the SLP
vectorizer was introduced by default on O3. The problem was an illegal
vector type on ARMTTI::getCmpSelInstrCost() <3 x i1> which is not simple.

The guard protects this code from breaking (cause of the problems) but
doesn't fix the issue that is generating the odd vector in the first
place, which also needs to be investigated.

llvm-svn: 187658
2013-08-02 17:10:04 +00:00
Fariborz Jahanian 87dc0bc078 revert patch I added in r187655. It still breaks public
buildbot.

llvm-svn: 187657
2013-08-02 16:25:41 +00:00
Carlo Kok 4382da983a Bugfix for making the DWARF debug strings and labels to code emitted as secrel32 instead of long opcodes (only for coff). This makes them debuggable with GDB (with fix for 64bits msvc)
llvm-svn: 187656
2013-08-02 16:14:15 +00:00
Fariborz Jahanian 11fe914549 ObjectiveC migration. Check-in patch reverted in r187634.
Also removed check for "NS" prefix for class name.

llvm-svn: 187655
2013-08-02 16:00:08 +00:00
Rafael Espindola 6df7083be4 Convert last use of st_dev in clang.
llvm-svn: 187654
2013-08-02 15:31:35 +00:00
Evgeniy Stepanov 44b77c26e4 [msan] Allocator statistics interface and malloc hooks.
llvm-svn: 187653
2013-08-02 14:26:58 +00:00
Tim Northover 0389d883fc Remove rather oddly merged logic from AArch64 commit.
We seem to have ended up with both an inlined check of permitted NEON base
types and a call to a function.

Since the outer if was (I believe) strictly weaker than the one in the
function, there's no actual user-visible behaviour change, so no tests.

llvm-svn: 187652
2013-08-02 11:38:46 +00:00
Tim Northover cf708c3284 Fix handling of CHECK-DAG combined with CHECK-NOT
Patch by Daniel Sanders.

llvm-svn: 187651
2013-08-02 11:32:50 +00:00
Daniel Jasper 3dcd7eca7a clang-format: Fix string breaking after "<<".
Before, clang-format would not break overly long string literals
following a "<<" with FormatStyle::AlwaysBreakBeforeMultilineStrings
being set.

llvm-svn: 187650
2013-08-02 11:01:15 +00:00
Duncan Sands 3194fca45f Pacify GCC, which worries about falling off the end of the switch.
llvm-svn: 187649
2013-08-02 09:37:20 +00:00
Evgeniy Stepanov 90daaf9132 [msan] Fix unused function warning in the tests.
llvm-svn: 187648
2013-08-02 09:09:02 +00:00
Alexey Samsonov c04b5cdbca Assume UniqueID is zero for invalid PPRegion to fix uninitialized reads reported by MSan
llvm-svn: 187647
2013-08-02 09:06:39 +00:00
Alexey Samsonov 9096968de5 Fix dereferencing end iterator in SimplifyCFG. Patch by Ye Mei.
llvm-svn: 187646
2013-08-02 08:06:43 +00:00