Commit Graph

197765 Commits

Author SHA1 Message Date
David Majnemer b2e0f7a40f Fix a typo
CHECK-LABEL had the wrong function name.

llvm-svn: 234051
2015-04-03 20:56:24 +00:00
Rui Ueyama 3fbed259b6 ELF: Fix header file dependencies.
<Arch>TargetHandler.h and <ArcH>RelocationHandler.h include each other.
This patch breaks the circular dependencies.

llvm-svn: 234050
2015-04-03 20:56:22 +00:00
Zachary Turner 43bac098b0 [dotest.py] Present a better error when lldb module can't be found.
We try to run lldb -P and jump through a bunch of other hoops
to figure out where the Python module is so that we can add its
location to sys.path.  The error message printed when this
doesn't work was left over from the time when Mac was the only
platform, so it presented a Mac-specific diagnostic on all
platforms related to the LLDB Framework.  This patch prints
a more useful diagnostic when not on Mac that gives a number
of other diagnostic messages to check.

llvm-svn: 234049
2015-04-03 20:56:15 +00:00
Ed Maste 4b1063c76c Fix FreeBSD crash after r233837
The FreeBSD debug register access is a little usual, but in any case
different from Linux. As it stands it's not possible to share an
implementation of DR_OFFSET, so revert that part of r233837 and provide
a separate FreeBSD and Linux implementation.

We'll still want a better fix, but this should restore basic
functionality (and the buildbot).

llvm-svn: 234048
2015-04-03 20:49:08 +00:00
Rui Ueyama 72553767d5 ELF: Pass file types instead of type traits to ELFObjectReader.
All <Arch>ELFFileCreateFileTraits structs are the same except its file type.
That means that we don't need to pass the type traits. Instead, we can only
pass file types. By doing this, we can remove copy-pasted boilerplates.

llvm-svn: 234047
2015-04-03 20:29:37 +00:00
David Majnemer 98cfe2b7a5 [InstCombine] Use DataLayout to determine vector element width
InstCombine didn't realize that it needs to use DataLayout to determine
how wide pointers are.  This lead to assertion failures.

This fixes PR23113.

llvm-svn: 234046
2015-04-03 20:18:40 +00:00
Andrew Kaylor a12eb15f1d Fixing a build error
llvm-svn: 234045
2015-04-03 19:55:30 +00:00
Rui Ueyama 077b2bf0c9 Inline typedef'ed type that's used only once. NFC.
result_type is no longer part of the type traits, so keeping it here
is confusing.

llvm-svn: 234044
2015-04-03 19:46:56 +00:00
Andrew Kaylor c2eb1426fc Fixing build warnings.
llvm-svn: 234043
2015-04-03 19:45:32 +00:00
David Blaikie 93c5444fe0 [opaque pointer type] More GEP API migrations in IRBuilder uses
The plan here is to push the API changes out from the common components
(like Constant::getGetElementPtr and IRBuilder::CreateGEP related
functions) and just update callers to either pass the type if it's
obvious, or pass null.

Do this with LoadInst as well and anything else that comes up, then to
start porting specific uses to not pass null anymore - this may require
some refactoring in each case.

llvm-svn: 234042
2015-04-03 19:41:44 +00:00
Andrew Kaylor aa92ab069c [WinEH] Handle nested landing pads in outlined catch handlers
Differential Revision: http://reviews.llvm.org/D8596

llvm-svn: 234041
2015-04-03 19:37:50 +00:00
Simon Atanasyan 400c9852cb [ELF] Fix Layout class name in the comment
No functional changes.

llvm-svn: 234040
2015-04-03 19:35:12 +00:00
Rui Ueyama bba452f23e ELF: Remove partial class definitions of <Arch>LinkingContexts.
What we are doing in ELFTarget.h was dubious. In the file, we define
partial classes of <Arch>LinkingContexts to declare only static member
functions. We have different (complete) class definitions in other files.
They would conflict if they exist in the same compilation unit (because
the ones defined in ELFTarget.h has only static member functions).
I don't think this was valid C++.

http://reviews.llvm.org/D8797

llvm-svn: 234039
2015-04-03 19:32:31 +00:00
Duncan P. N. Exon Smith 3bef6a3803 CodeGen: Assert that inlined-at locations agree
As a follow-up to r234021, assert that a debug info intrinsic variable's
`MDLocalVariable::getInlinedAt()` always matches the
`MDLocation::getInlinedAt()` of its `!dbg` attachment.

The goal here is to get rid of `MDLocalVariable::getInlinedAt()`
entirely (PR22778), but I'll let these assertions bake for a while
first.

If you have an out-of-tree backend that just broke, you're probably
attaching the wrong `DebugLoc` to a `DBG_VALUE` instruction.  The one
you want is the location that was attached to the corresponding
`@llvm.dbg.declare` or `@llvm.dbg.value` call that you started with.

llvm-svn: 234038
2015-04-03 19:20:26 +00:00
Justin Bogner 7759f1899e Add missing include
llvm-svn: 234037
2015-04-03 19:10:35 +00:00
Justin Bogner 8e1a2a3277 profile: Protect .gcda output with flock
This avoids crashing or corrupting data if multiple concurrent
processes write to the same .gcda file. This is hard to test, since
the previous behaviour was a data race that often worked out, and it
ignores errors in flock to fall back to the old racy behaviour so that
it won't degrade the behaviour on filesystems that don't support
flock.

llvm-svn: 234036
2015-04-03 18:55:44 +00:00
Reid Kleckner aab30e1454 [WinEH] Fold cast into assertion based on review feedback
llvm-svn: 234034
2015-04-03 18:18:06 +00:00
Manman Ren 2738278b7f [i386 ABI] expand small C like structs in C++, just like how we handle small
C structs.

This comes up when we have a function that takes a struct and is defined in a
C++ file and used in a C file.

Before this commit, we will generate byval for C++ and will expand the struct
for C, thus causing difference at IR level. We will use bitcast of function type
at the callsite, which causes the inliner to not inline the function.

This commit changes how we handle small C like structs at IR level, but at
backend, we should generate the same argument passing before and after the
commit.

Note that the condition for expanding is still over conservative. We should be
able to expand type that is spelled with “class” and types that are not C-like.
But this commit fixes the inconsistent argument passing between C/C++.

Reviewed by John.

rdar://20121030

llvm-svn: 234033
2015-04-03 18:10:29 +00:00
David Blaikie 6b2a8306a5 [opaque pointer type] Explicitly specify type to CreateGEP
llvm-svn: 234032
2015-04-03 17:47:16 +00:00
Matthias Braun e376d16f95 [GraphWriter] Attempt to open .dot files with xdg-open/open first
Most desktop environments let the users specify his preferred application per
file type. On mac/linux we can use open/xdg-open for that and should try this
first before starting a heuristic search for various programs.

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

llvm-svn: 234031
2015-04-03 17:22:36 +00:00
Zachary Turner eaa9266ec5 Don't use literal slashes when concatenating paths in Python.
This patch fixes the swig generation scripts to use os.path.join
instead, which produces correctly normalized paths for platforms
that don't use the standard forward slash separator.

llvm-svn: 234030
2015-04-03 17:19:43 +00:00
Sanjay Patel 1ad50ba966 use update_llc_test_checks.py to tighten checking; remove unnecessary testing params
llvm-svn: 234029
2015-04-03 17:17:50 +00:00
Sean Callanan 9df9a67bdb Marked the modules tests as expected failures,
because the OS X builders aren't happy with them.

<rdar://problem/20416388>

llvm-svn: 234028
2015-04-03 17:17:12 +00:00
Sanjay Patel 221739df9d use update_llc_test_checks.py to tighten checking; remove unnecessary testing params
llvm-svn: 234027
2015-04-03 17:13:31 +00:00
Duncan P. N. Exon Smith 66463cc5dc SelectionDAG: Use specialized metadata nodes in EmitFuncArgumentDbgValue(), NFC
Use `MDLocalVariable` and `MDExpression` directly for the arguments of
`EmitFuncArgumentDbgValue()` to simplify a follow-up patch.

llvm-svn: 234026
2015-04-03 17:11:42 +00:00
Adrian McCarthy 1d57433c50 Fix LLDB test tracing to include the output (stdout and stderr) of each shell command.
llvm-svn: 234025
2015-04-03 17:10:30 +00:00
Sanjay Patel 9342a34bbd use update_llc_test_checks.py to tighten checking; remove unnecessary testing params
llvm-svn: 234024
2015-04-03 17:09:37 +00:00
Sean Callanan 7176ca2749 A new testcase had a silly integer-value mismatch.
Fixed that.

llvm-svn: 234023
2015-04-03 17:08:45 +00:00
Sanjay Patel 54e39fd698 use update_llc_test_checks.py to tighten checking
remove redundant and unnecessary test parameters

llvm-svn: 234022
2015-04-03 17:02:48 +00:00
Duncan P. N. Exon Smith 81f522a62e Verifier: Check that inlined-at locations agree
Check that the `MDLocalVariable::getInlinedAt()` in a debug info
intrinsic's variable always matches the `MDLocation::getInlinedAt()` of
its `!dbg` attachment.

The goal here is to get rid of `MDLocalVariable::getInlinedAt()`
entirely (PR22778), since it's expensive and unnecessary, but I'll let
this verifier check bake for a while (a week maybe?) first.  I've
updated the testcases that had the wrong value for `inlinedAt:`.

This checks that things are sane in the IR, but currently things go out
of whack in a few places in the backend.  I'll follow shortly with
assertions in the backend (with code fixes).

If you have out-of-tree testcases that just started failing, here's how
I updated these ones:

 1. The verifier check gives you the basic block, function, instruction,
    and relevant metadata arguments (metadata numbering doesn't
    necessarily match the source file, unfortunately).
 2. Look at the `@llvm.dbg.*()` instruction, and compare the
    `inlinedAt:` fields of the variable argument (second `metadata`
    argument) and the `!dbg` attachment.
 3. Figure out based on the variable `scope:` chain and the functions in
    the file whether the variable has been inlined (and into what), so
    you can determine which `inlinedAt:` is actually correct.  In all of
    the in-tree testcases, the `!MDLocation()` was correct and the
    `!MDLocalVariable()` was wrong, but YMMV.
 4. Duplicate the metadata that you're going to change, and add/drop the
    `inlinedAt:` field from one of them.  Be careful that the other
    references to the same metadata node point at the correct one.

llvm-svn: 234021
2015-04-03 16:54:30 +00:00
Sanjay Patel 7b0c62e685 add checks; remove redundant testing parameters
llvm-svn: 234020
2015-04-03 16:44:42 +00:00
Duncan P. N. Exon Smith c5bd3e01df CodeGen: Fix MachineInstr::print() for DBG_VALUE
Grab the `MDLocalVariable` from the second-to-last argument; the last
argument is an `MDExpression`, and mixing them up will crash.

llvm-svn: 234019
2015-04-03 16:23:04 +00:00
Daniel Jasper efece52160 [MachineLICM] Small cleanup: Constify and rangeify.
NFC.

llvm-svn: 234018
2015-04-03 16:19:48 +00:00
Sanjay Patel f84bcf15c0 use update_llc_test_checks.py to tighten checking; remove darwin and sandybridge overspecification
llvm-svn: 234017
2015-04-03 16:06:58 +00:00
Sean Callanan 8505434011 Added a testcase that covers loading a module and
verifying that the types from that module don't
override types from DWARF.  Also added a target setting
to LLDB so we can tell Clang where to look for these
local modules.

<rdar://problem/18805055>

llvm-svn: 234016
2015-04-03 15:39:47 +00:00
Simon Pilgrim eaa0f3f4f4 Added vector tests for DAGCombiner::ReassociateOps
Missing vector tests for rL233482

llvm-svn: 234015
2015-04-03 15:04:46 +00:00
Leny Kholodov a0ccf1abb7 Fix for revision r234009 (gcc/msvc compilation differences)
llvm-svn: 234014
2015-04-03 14:44:33 +00:00
Simon Pilgrim 0184622bbc [X86] Added SSE4.2 CRC32 memory folding patterns + tests
llvm-svn: 234013
2015-04-03 14:24:40 +00:00
Bill Schmidt 91dd765a04 [PowerPC] Enable splat generation for BUILD_VECTOR with little endian
When enabling PPC64LE, I disabled some optimizations of BUILD_VECTOR
nodes for little endian because wrong results were produced.  I've
subsequently investigated and found this is due to a call to
BuildVectorSDNode::isConstantSplat that was always specifying
big-endian.  With this changed to correctly identify the target
endianness, the optimizations work as expected.

I found another case of a call to the same method with big-endian
hardcoded, in PPC::isAllNegativeZeroVector().  I discovered this was
an orphaned method with no callers, so I've just removed it.

The existing test/CodeGen/PowerPC/vec_constants.ll checks these
optimizations, so for testing I've just added a variant for little
endian.

llvm-svn: 234011
2015-04-03 13:48:24 +00:00
Evgeniy Stepanov e2a8241f84 [sancov] Shrink pc array on Android back to 2**24.
Address space is a lot more constrained on 32-bit Android compared to Linux.

llvm-svn: 234010
2015-04-03 12:59:39 +00:00
Leny Kholodov 95ed78b85a [ARM] Implementation of R_ARM_TARGET1 relocation
This patch provides implementation of R_ARM_TARGET1 relocation with
configuration of its behaviour from a command line. This patch provides
two command line options for GnuLd driver: --arm-target1-rel and
--arm-target1-abs (similar to ld option names with extra prefix 'arm-').
So user may choose which behaviour of R_ARM_TARGET1 is preferred for his
implementation of libc.

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

llvm-svn: 234009
2015-04-03 12:03:47 +00:00
Simon Pilgrim 8dba5da06d [X86][3DNow] Added 3DNow! memory folding patterns + tests
llvm-svn: 234008
2015-04-03 11:50:30 +00:00
Benjamin Kramer 012e719574 Add missing semicolon in the windows plugin.
llvm-svn: 234007
2015-04-03 11:05:12 +00:00
Simon Pilgrim d8212546f6 [X86][MMX] Added MMX stack folding tests
llvm-svn: 234006
2015-04-03 11:01:15 +00:00
Benjamin Kramer 3f69fa6f56 Sprinkle some #include <mutex> in files that use std::call_once.
llvm-svn: 234005
2015-04-03 10:55:00 +00:00
Simon Pilgrim ed2ba33ba0 [DAGCombiner] Combine shuffles of BUILD_VECTOR and SCALAR_TO_VECTOR
This patch attempts to fold the shuffling of 'scalar source' inputs - BUILD_VECTOR and SCALAR_TO_VECTOR nodes - if the shuffle node is the only user. This folds away a lot of unnecessary shuffle nodes, and allows quite a bit of constant folding that was being missed.

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

llvm-svn: 234004
2015-04-03 10:02:21 +00:00
Bruce Mitchener 488c89ed77 Fix typo, fix build.
This typo was introduced as part of http://reviews.llvm.org/D8760

llvm-svn: 234003
2015-04-03 09:13:18 +00:00
Colin Riley 9e14f61f51 Adding the RenderScript language type.
Differential Revision: http://reviews.llvm.org/D8803

llvm-svn: 234002
2015-04-03 09:03:15 +00:00
Denis Protivensky ee3261834e [ARM] Avoid potential error in test because of name collision
llvm-svn: 234001
2015-04-03 08:03:23 +00:00
Denis Protivensky c04fbb7340 [ARM] Test wrong ARM entry point address align
llvm-svn: 234000
2015-04-03 07:57:27 +00:00