Lang Hames [Mon, 6 Apr 2015 03:01:29 +0000 (03:01 +0000)]
[Orc] Tidy up the assembly for the x86-64 resolver block.
llvm-svn: 234138
Peter Collingbourne [Sun, 5 Apr 2015 23:32:13 +0000 (23:32 +0000)]
Add documentation for llgoi, update README
llvm-svn: 234137
Peter Collingbourne [Sun, 5 Apr 2015 23:32:10 +0000 (23:32 +0000)]
Roll gofrontend to
15a24202fa42.
Takes us to Go 1.4.2 plus a number of bug fixes.
Differential Revision: http://reviews.llvm.org/D8830
llvm-svn: 234136
Peter Collingbourne [Sun, 5 Apr 2015 23:31:49 +0000 (23:31 +0000)]
Roll gofrontend to
07baa07598ea; roll libffi to r219477.
Incorporates https://codereview.appspot.com/
198770044, which causes us to start
using the static chain register for closures instead of __go_{get,set}_closure.
Differential Revision: http://reviews.llvm.org/D8829
llvm-svn: 234135
Peter Collingbourne [Sun, 5 Apr 2015 23:30:42 +0000 (23:30 +0000)]
Roll gofrontend to
a6e10414311a
This takes us to Go 1.4. Also includes a couple of changes to the test
suite, both in the runtime package:
- Disable TestSetPanicOnFault. We cannot support this scenario at all,
due to LLVM's lack of non-call exceptions.
- Tweak TestFinalizerType. This test only passes with two GC runs.
Differential Revision: http://reviews.llvm.org/D8828
llvm-svn: 234134
Peter Collingbourne [Sun, 5 Apr 2015 23:28:18 +0000 (23:28 +0000)]
Roll gotools to
d4e70101.
Most importantly, this gives us https://go-review.googlesource.com/7533 which
fixes a bug in go/ssa that caused test failures in the Go 1.4 standard library.
Also remove the go1.4 tag workaround. We no longer need it now that we
ship llgo-go.
Differential Revision: http://reviews.llvm.org/D8827
llvm-svn: 234133
David Blaikie [Sun, 5 Apr 2015 22:53:21 +0000 (22:53 +0000)]
[opaque pointer type] Remove some backwards compatible GEP APIs
Just doing the two-step so I don't get so much build-bot spam... (add
new API, migrate callers, remove old API)
llvm-svn: 234132
David Blaikie [Sun, 5 Apr 2015 22:51:12 +0000 (22:51 +0000)]
[opaque pointer type] More GEP API migrations
llvm-svn: 234131
Davide Italiano [Sun, 5 Apr 2015 22:47:54 +0000 (22:47 +0000)]
Strip .strtab and .symtab when --strip-all is used.
This matches other linkers behaviour. Moreover, there's really
no need to keep them around.
Reported by: Rafael Avila de Espindola
PR: 22890
llvm-svn: 234130
David Blaikie [Sun, 5 Apr 2015 22:47:07 +0000 (22:47 +0000)]
clang-format my last commit
(sorry, keep forgetting that)
llvm-svn: 234129
David Blaikie [Sun, 5 Apr 2015 22:45:47 +0000 (22:45 +0000)]
[opaque pointer type] More GEP API migrations
Looks like the VTable code in particular will need some work to pass
around the pointee type explicitly.
llvm-svn: 234128
David Blaikie [Sun, 5 Apr 2015 22:44:57 +0000 (22:44 +0000)]
clang-format my last commit
llvm-svn: 234127
David Blaikie [Sun, 5 Apr 2015 22:41:44 +0000 (22:41 +0000)]
[opaque pointer type] The last of the GEP IRBuilder API migrations
There's still lots of callers passing nullptr, of course - some because
they'll never be migrated (InstCombines for bitcasts - well they don't
make any sense when the pointer type is opaque anyway, for example) and
others that will need more engineering to pass Types around.
llvm-svn: 234126
Tobias Grosser [Sun, 5 Apr 2015 21:52:21 +0000 (21:52 +0000)]
Make -polly-no-tiling work again
llvm-svn: 234125
Tobias Grosser [Sun, 5 Apr 2015 19:52:38 +0000 (19:52 +0000)]
Adjust documentation to old -enable-polly-openmp -> -polly-parallel rename
Reported-by: Tomofumi Yuki <tomofumi.yuki@gmail.com>
llvm-svn: 234124
Benjamin Kramer [Sun, 5 Apr 2015 18:55:02 +0000 (18:55 +0000)]
Replace copy loop with std::copy.
No functional change intended.
llvm-svn: 234123
Tobias Grosser [Sun, 5 Apr 2015 17:36:42 +0000 (17:36 +0000)]
Sign-extend in case of non-matching bitwidth
This change ensures that we sign-extend integer types in case non-matching
operands are encountered when generating a multi-dimensional access offset.
This fixes http://llvm.org/PR23124
Reported-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
llvm-svn: 234122
Benjamin Kramer [Sun, 5 Apr 2015 17:02:25 +0000 (17:02 +0000)]
Mark BumpPtrAllocator::Allocate as returning a noalias pointer.
The GCC attribute is curiously named 'malloc', but I think it's better
to use LLVM terminology for the wrapper macro.
llvm-svn: 234121
Benjamin Kramer [Sun, 5 Apr 2015 15:53:20 +0000 (15:53 +0000)]
[elf] Fix a silly memory leak. std::string has a non-trivial dtor.
llvm-svn: 234120
Tobias Grosser [Sun, 5 Apr 2015 14:57:50 +0000 (14:57 +0000)]
Do not assume all multi-parameter products are affine
As soon as one operand of the product is invalid, the entire product is invalid.
This happens for example if one of the operands is not loop-invariant.
This fixes http://llvm.org/PR23125
Reported-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com
llvm-svn: 234119
Simon Pilgrim [Sun, 5 Apr 2015 14:30:37 +0000 (14:30 +0000)]
[DAGCombiner] Merge FMUL Scalar and Vector constant canonicalization to RHS. NFCI.
llvm-svn: 234118
Tobias Grosser [Sun, 5 Apr 2015 13:11:54 +0000 (13:11 +0000)]
Make run-time alias check generation deterministic
llvm-svn: 234117
Simon Atanasyan [Sun, 5 Apr 2015 09:01:53 +0000 (09:01 +0000)]
[Mips] Rename MipsLinkingContext class method
getMergeReginfoMask => getMergedReginfoMask
llvm-svn: 234116
Simon Atanasyan [Sun, 5 Apr 2015 09:01:46 +0000 (09:01 +0000)]
[Mips] Support writing .MIPS.options section into the linked file
In case of MIPS N64 ABI linker should merge registers usage masks stored
in the input .MIPS.options sections and save result into the output
.MIPS.options section.
llvm-svn: 234115
Simon Atanasyan [Sun, 5 Apr 2015 09:01:35 +0000 (09:01 +0000)]
[Mips] Add checking of .reginfo section options to the test case
llvm-svn: 234114
Tobias Grosser [Sun, 5 Apr 2015 06:53:21 +0000 (06:53 +0000)]
Do not use the POLLY vector code generator if only strip-mining is requested
This fixes http://llvm.org/PR23127
Reported-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
llvm-svn: 234113
Tobias Grosser [Sun, 5 Apr 2015 06:53:11 +0000 (06:53 +0000)]
[tests] Use -polly-vectorizer=polly directly
instead of defining a lit variable %vector-opt.
llvm-svn: 234112
David Majnemer [Sun, 5 Apr 2015 05:42:02 +0000 (05:42 +0000)]
Switch test from wchar_t to char32_t
Windows has a 16-bit wchar_t, most Unix platforms have a 32-bit wchar_t.
Use a char32_t to keep the test's output stable.
llvm-svn: 234111
David Majnemer [Sun, 5 Apr 2015 05:32:54 +0000 (05:32 +0000)]
[AST] String literal operator templates have two template args, not one
StmtPrinter assumed that the first template arg was the pack and
attempted to iterate it. However, the GNU extension (which is really
just N3599), has two template arguments. In this case, the second
argument is the pack containing the string contents.
Handle this by desugaring the call to the explicit operator.
For example:
"qux" _zombocom will be shown as
operator "" _zombocom<char, 'q', 'u', 'x'>() in diagnostics and AST
dumps.
N.B. It is actually impossible to render the arguments back to the
source form without storing more information in the AST. For example,
we cannot tell if the user wrote u8"qux" or "qux". We also lose
fidelity when it comes to non-char types for this exact reason (e.g. it
is hard to render a list of wchar_t back to something that can be
printed to the screen even if you don't have to consider surrogate
pairs).
This fixes PR23120.
llvm-svn: 234110
David Blaikie [Sat, 4 Apr 2015 21:07:17 +0000 (21:07 +0000)]
[opaque pointer type] More GEP API migrations
llvm-svn: 234109
David Blaikie [Sat, 4 Apr 2015 21:07:10 +0000 (21:07 +0000)]
[opaque pointer type] More GEP API migrations
llvm-svn: 234108
Sanjay Patel [Sat, 4 Apr 2015 21:06:39 +0000 (21:06 +0000)]
remove function/variable names from comments; NFC
llvm-svn: 234107
Sanjay Patel [Sat, 4 Apr 2015 21:05:52 +0000 (21:05 +0000)]
less space; NFC
llvm-svn: 234106
Simon Atanasyan [Sat, 4 Apr 2015 19:48:29 +0000 (19:48 +0000)]
[Mips] Do not use array initializer to fix Windows build bots
llvm-svn: 234105
Rafael Espindola [Sat, 4 Apr 2015 19:32:41 +0000 (19:32 +0000)]
Revert "Revert "Revert "Don't use unique section names by default if using the integrated as."""
This reverts commit r234101. I will debug what went wrong with ARM.
llvm-svn: 234104
Simon Atanasyan [Sat, 4 Apr 2015 19:13:32 +0000 (19:13 +0000)]
[Mips] Support writing .reginfo section into the linked file
In case of MIPS O32 ABI linker should merge registers usage masks stored
in the input .reginfo sections and save result into the output .reginfo
section.
The ABI states that the .reginfo section should be put into the separate
segment. This requirement is not implemented in this patch.
llvm-svn: 234103
Chaoren Lin [Sat, 4 Apr 2015 19:09:18 +0000 (19:09 +0000)]
Copy paste error in gdb-remote doc.
llvm-svn: 234102
Rafael Espindola [Sat, 4 Apr 2015 18:21:14 +0000 (18:21 +0000)]
Revert "Revert "Don't use unique section names by default if using the integrated as.""
This reverts commit r233398, bringing back 233393 now that LLVM is fixed.
Original message:
Don't use unique section names by default if using the integrated as.
This saves some IO and ccache space by not creating long section names. It
should work with every ELF linker.
llvm-svn: 234101
Rafael Espindola [Sat, 4 Apr 2015 18:16:01 +0000 (18:16 +0000)]
Don't mix overload and default values.
It makes it hard to see which one is being called.
llvm-svn: 234100
Rafael Espindola [Sat, 4 Apr 2015 18:02:01 +0000 (18:02 +0000)]
Implement unique sections with an unique ID.
This allows the compiler/assembly programmer to switch back to a
section. This in turn fixes the bootstrap failure on powerpc (tested
on gcc110) without changing the ppc codegen at all.
I will try to cleanup the various getELFSection overloads in a followup patch.
Just using a default argument now would lead to ambiguities.
llvm-svn: 234099
Simon Atanasyan [Sat, 4 Apr 2015 15:25:19 +0000 (15:25 +0000)]
Remove one more empty directory.
llvm-svn: 234098
David Blaikie [Sat, 4 Apr 2015 15:12:29 +0000 (15:12 +0000)]
[opaque pointer type] more GEP API migrations
llvm-svn: 234097
David Blaikie [Sat, 4 Apr 2015 15:12:13 +0000 (15:12 +0000)]
[opaque pointer type] More (constant, in this instance) GEP API migrations
llvm-svn: 234096
Simon Atanasyan [Sat, 4 Apr 2015 15:10:17 +0000 (15:10 +0000)]
Remove empty directories.
llvm-svn: 234095
Alexander Kornienko [Sat, 4 Apr 2015 14:54:53 +0000 (14:54 +0000)]
[clang-tidy] Added a couple of tests for misc-static-assert.
llvm-svn: 234094
Sanjay Patel [Sat, 4 Apr 2015 14:54:24 +0000 (14:54 +0000)]
Remove the cl-no-signed-zeros cc1 option
Use the driver flag -fno-signed-zeros instead.
This was recommended but not implemented in D6873:
http://reviews.llvm.org/D6873
which was checked in at r226915:
http://reviews.llvm.org/rL226915
llvm-svn: 234093
Simon Pilgrim [Sat, 4 Apr 2015 10:20:31 +0000 (10:20 +0000)]
[DAGCombiner] Canonicalize vector constants for ADD/MUL/AND/OR/XOR re-association
Scalar integers are commuted to move constants to the RHS for re-association - this ensures vectors do the same.
llvm-svn: 234092
Daniel Jasper [Sat, 4 Apr 2015 07:56:55 +0000 (07:56 +0000)]
clang-format: [JS] Understand object literals with only methods.
Before:
let theObject = {someMethodName() {
doTheThing();
doTheOtherThing();
},
someOtherMethodName() {
doSomething();
doSomethingElse();
}};
After:
let theObject = {
someMethodName() {
doTheThing();
doTheOtherThing();
},
someOtherMethodName() {
doSomething();
doSomethingElse();
}
};
llvm-svn: 234091
David Majnemer [Sat, 4 Apr 2015 05:37:48 +0000 (05:37 +0000)]
[MS ABI] A pointer-to-function cannot be caught as a pointer-to-void
Don't assume that all pointers are convertible to void pointer.
Instead correctly respect [conv.ptr]p2; only allow pointer types with an
object pointee type to be caught as pointer-to-void.
llvm-svn: 234090
Simon Atanasyan [Sat, 4 Apr 2015 05:19:58 +0000 (05:19 +0000)]
[Hexagon] Remove duplicated typedef
The `HexagonELFType` is declared in the HexagonLinkingContext.h.
llvm-svn: 234089
Simon Atanasyan [Sat, 4 Apr 2015 05:19:51 +0000 (05:19 +0000)]
[Hexagon][Mips] Rename template arguments <arch>ELFType to ELFT
In all other ELF related classes we use `ELFT` abbreviation.
llvm-svn: 234088
Rui Ueyama [Sat, 4 Apr 2015 04:22:27 +0000 (04:22 +0000)]
ELF: Use short variable names in <Arch>RelocationHandlers.cpp.
Functions in the files are hard to read because of line wrapping.
Use shorter names for local variables so that the lines fit
within 80 columns.
llvm-svn: 234087
Craig Topper [Sat, 4 Apr 2015 04:22:12 +0000 (04:22 +0000)]
[X86] Apply AddedComplexity consistently for similar patterns. This keeps them together in the DAGISel tables and reduces table size slightly.
llvm-svn: 234086
Rui Ueyama [Sat, 4 Apr 2015 04:10:08 +0000 (04:10 +0000)]
Remove redundant anonymous namespace.
llvm-svn: 234085
Eric Christopher [Sat, 4 Apr 2015 03:53:25 +0000 (03:53 +0000)]
Fix formatting and coding style.
llvm-svn: 234084
Eric Christopher [Sat, 4 Apr 2015 03:34:43 +0000 (03:34 +0000)]
Complete comment. Reflow conditional.
llvm-svn: 234083
Rui Ueyama [Sat, 4 Apr 2015 03:24:42 +0000 (03:24 +0000)]
ELF: Merge ELFTargets.h with ELFLinkingContext.h.
These functions are "constructors" of the LinkingContexts. We already
have auxiliary classes and functions for ELFLinkingContext in the header.
They fall in the same category.
llvm-svn: 234082
Rui Ueyama [Sat, 4 Apr 2015 02:59:52 +0000 (02:59 +0000)]
ELF: Return TargetRelocationHandler instead of <ArcH>TargetRelocationHandler.
getRelocationHandler is a public interface to get an instance of
TargetRelocationHandler. We don't use any member function other than
applyRelocations to a returned instance. Returning a base class instance
suffices here. (If a return type is a derived class, it looks like we were
using derived classes features.)
llvm-svn: 234081
Rui Ueyama [Sat, 4 Apr 2015 02:44:36 +0000 (02:44 +0000)]
Remove a parameter for file extension from canParse.
canParse took three parameters -- file magic, filename extension and
memory buffer. All but YAMLReader ignored the second parameter.
This patch removes the parameter.
llvm-svn: 234080
Craig Topper [Sat, 4 Apr 2015 02:31:43 +0000 (02:31 +0000)]
[X86] Add a comment about the change in r234075.
llvm-svn: 234079
Eric Christopher [Sat, 4 Apr 2015 02:26:47 +0000 (02:26 +0000)]
Strip trailing whitespace and reword explanatory comment.
llvm-svn: 234078
Rui Ueyama [Sat, 4 Apr 2015 02:26:17 +0000 (02:26 +0000)]
ELF: Make private members private.
llvm-svn: 234077
Rui Ueyama [Sat, 4 Apr 2015 02:16:26 +0000 (02:16 +0000)]
ELF: Remove ELF{Object,DSO}Reader alias templates.
Because of the previous change (r234074), ELFObjectReader became just
an alias for ELFReader. We can replace all occurrences of ELFObjectReader
with ELFReader.
In this patch, I also replaced ELFDSOReader to remove the alias template.
llvm-svn: 234076
Craig Topper [Sat, 4 Apr 2015 02:08:20 +0000 (02:08 +0000)]
[X86] Don't use GR64 register 'and with immediate' instructions if the immediate is zero in the upper 33-bits or upper 57-bits. Use GR32 instructions instead.
Previously the patterns didn't have high enough priority and we would only use the GR32 form if the only the upper 32 or 56 bits were zero.
Fixes PR23100.
llvm-svn: 234075
Rui Ueyama [Sat, 4 Apr 2015 02:07:30 +0000 (02:07 +0000)]
ELF: Teach File classes about their file magics.
So that we can remove one template parameter from ELFReader.
ELF port is heavily templatized, and I want to reduce the usage
where possible.
llvm-svn: 234074
Rui Ueyama [Sat, 4 Apr 2015 01:37:25 +0000 (01:37 +0000)]
s/context/ctx/g on lib/Driver/Driver.cpp.
llvm-svn: 234073
Rui Ueyama [Sat, 4 Apr 2015 01:37:23 +0000 (01:37 +0000)]
Remove unused member function declarations.
llvm-svn: 234072
Chaoren Lin [Sat, 4 Apr 2015 01:11:31 +0000 (01:11 +0000)]
Use insert instead of append when adding to sys.path.
Similar problem as in the last part of r200486.
llvm-svn: 234071
Rui Ueyama [Sat, 4 Apr 2015 00:25:22 +0000 (00:25 +0000)]
Remove unused includes and forward declarations.
llvm-svn: 234070
Rui Ueyama [Sat, 4 Apr 2015 00:12:27 +0000 (00:12 +0000)]
Remove unused functions.
llvm-svn: 234069
Rui Ueyama [Sat, 4 Apr 2015 00:10:14 +0000 (00:10 +0000)]
ELF: Define mergeHeaderFlags to ELFLinkingContext.
Only MIPS defined the member function, but this feature is not actually
MIPS-specific. Also, the dependency to the MIPS-only member function
prevented us from merging <Arch>ELF{Object,DSO}Reader classes.
This patch moves the feature from MipsLinkingContext to LinkingContext.
llvm-svn: 234068
David Majnemer [Fri, 3 Apr 2015 23:37:34 +0000 (23:37 +0000)]
[WinEH] Fill out CatchHigh in the TryBlockMap
Now all fields in the WinEH xdata have been filled out.
llvm-svn: 234067
Simon Atanasyan [Fri, 3 Apr 2015 23:07:18 +0000 (23:07 +0000)]
[ELF] Remove unused typedef
llvm-svn: 234066
Simon Atanasyan [Fri, 3 Apr 2015 23:07:13 +0000 (23:07 +0000)]
[ELF] Merge Layout and TargetLayout class
It is enough to have single TargetLayout class.
llvm-svn: 234065
David Blaikie [Fri, 3 Apr 2015 23:03:54 +0000 (23:03 +0000)]
[opaque pointer type] More GEP IRBuilder API migrations
llvm-svn: 234064
David Blaikie [Fri, 3 Apr 2015 22:54:16 +0000 (22:54 +0000)]
[opaque pointer type] Explicitly specify some types for GEP
Not all of them (there's still a fallback for this specific function
that omits the type parameter) but it's some I bothered to do now.
llvm-svn: 234063
David Majnemer [Fri, 3 Apr 2015 22:49:05 +0000 (22:49 +0000)]
[WinEH] Fill out .xdata for catch objects
This add support for catching an exception such that an exception object
available to the catch handler will be initialized by the runtime.
llvm-svn: 234062
David Majnemer [Fri, 3 Apr 2015 22:32:26 +0000 (22:32 +0000)]
[WinEH] Sink UnwindHelp completely out of IR
We don't need to represent UnwindHelp in IR. Instead, we can use the
knowledge that we are emitting the parent function to decide if we
should create the UnwindHelp stack object.
llvm-svn: 234061
Rui Ueyama [Fri, 3 Apr 2015 22:12:18 +0000 (22:12 +0000)]
ELF: Merge ELF{Object,DSO}Reader implementations.
The two classes are the same other than a few exceptions.
This patch merges them using templates.
llvm-svn: 234060
Andrew Kaylor [Fri, 3 Apr 2015 21:44:17 +0000 (21:44 +0000)]
Fixing a memory leak in WinEHPrepare
llvm-svn: 234059
David Blaikie [Fri, 3 Apr 2015 21:33:42 +0000 (21:33 +0000)]
[opaque pointer type] More GEP IRBuilder API migrations...
llvm-svn: 234058
David Blaikie [Fri, 3 Apr 2015 21:32:06 +0000 (21:32 +0000)]
Use early returns to reduce indentation.
llvm-svn: 234057
Rui Ueyama [Fri, 3 Apr 2015 21:22:20 +0000 (21:22 +0000)]
ELF: Remove <Arch>ELFReader.h. NFC.
<Arch>ELFReader.h contains only a few typedefs. The typedefs are used
only by one class in <Arch>TargetHandler.h. Thus, the headers don't
worth to be independent files.
Since MipsELFReader.h contains code other than the boilerplate, I didn't
touch that file in this patch.
llvm-svn: 234056
Daniel Jasper [Fri, 3 Apr 2015 21:15:46 +0000 (21:15 +0000)]
clang-format: [Proto] No alternate operator names.
llvm-svn: 234055
Simon Atanasyan [Fri, 3 Apr 2015 21:01:07 +0000 (21:01 +0000)]
[ELF] Delete empty TargetLayout class and rename DefaultLayout to TargetLayout
No functional changes.
llvm-svn: 234052
David Majnemer [Fri, 3 Apr 2015 20:56:24 +0000 (20:56 +0000)]
Fix a typo
CHECK-LABEL had the wrong function name.
llvm-svn: 234051
Rui Ueyama [Fri, 3 Apr 2015 20:56:22 +0000 (20:56 +0000)]
ELF: Fix header file dependencies.
<Arch>TargetHandler.h and <ArcH>RelocationHandler.h include each other.
This patch breaks the circular dependencies.
llvm-svn: 234050
Zachary Turner [Fri, 3 Apr 2015 20:56:15 +0000 (20:56 +0000)]
[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
Ed Maste [Fri, 3 Apr 2015 20:49:08 +0000 (20:49 +0000)]
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
Rui Ueyama [Fri, 3 Apr 2015 20:29:37 +0000 (20:29 +0000)]
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
David Majnemer [Fri, 3 Apr 2015 20:18:40 +0000 (20:18 +0000)]
[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
Andrew Kaylor [Fri, 3 Apr 2015 19:55:30 +0000 (19:55 +0000)]
Fixing a build error
llvm-svn: 234045
Rui Ueyama [Fri, 3 Apr 2015 19:46:56 +0000 (19:46 +0000)]
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
Andrew Kaylor [Fri, 3 Apr 2015 19:45:32 +0000 (19:45 +0000)]
Fixing build warnings.
llvm-svn: 234043
David Blaikie [Fri, 3 Apr 2015 19:41:44 +0000 (19:41 +0000)]
[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
Andrew Kaylor [Fri, 3 Apr 2015 19:37:50 +0000 (19:37 +0000)]
[WinEH] Handle nested landing pads in outlined catch handlers
Differential Revision: http://reviews.llvm.org/D8596
llvm-svn: 234041
Simon Atanasyan [Fri, 3 Apr 2015 19:35:12 +0000 (19:35 +0000)]
[ELF] Fix Layout class name in the comment
No functional changes.
llvm-svn: 234040
Rui Ueyama [Fri, 3 Apr 2015 19:32:31 +0000 (19:32 +0000)]
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
Duncan P. N. Exon Smith [Fri, 3 Apr 2015 19:20:26 +0000 (19:20 +0000)]
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
Justin Bogner [Fri, 3 Apr 2015 19:10:35 +0000 (19:10 +0000)]
Add missing include
llvm-svn: 234037