Commit Graph

96170 Commits

Author SHA1 Message Date
Benjamin Kramer
989779ccc7 MemoryBuiltins: Fix operator new bits.
We really don't want to optimize malloc return value checks away.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191313 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-24 17:15:14 +00:00
Andrew Trick
b0dfceec22 Comment typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191312 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-24 17:11:19 +00:00
Benjamin Kramer
6629210aaf Teach MemoryBuiltins and InstructionSimplify that operator new never returns NULL.
This is safe per C++11 18.6.1.1p3: [operator new returns] a non-null pointer to
suitably aligned storage (3.7.4), or else throw a bad_alloc exception. This
requirement is binding on a replacement version of this function.

Brings us a tiny bit closer to eliminating more vector push_backs.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191310 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-24 16:37:51 +00:00
Benjamin Kramer
d721520e4c Push analysis passes to InstSimplify when they're around anyways.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191309 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-24 16:37:40 +00:00
Daniel Sanders
3706eda52c [mips][msa] Added support for matching pckev, and pckod from normal IR (i.e. not intrinsics)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191306 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-24 14:53:25 +00:00
Daniel Sanders
f515964d36 [mips][msa] Added support for matching ilv[lr], ilvod, and ilvev from normal IR (i.e. not intrinsics)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191304 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-24 14:36:12 +00:00
Benjamin Kramer
cd216b2c73 DAGCombiner: Unify rotate matching for extended and unextended amounts.
No functionality change, lots of indentation changes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191303 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-24 14:21:28 +00:00
Daniel Sanders
93d995719e [mips][msa] Added support for matching shf from normal IR (i.e. not intrinsics)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191302 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-24 14:20:00 +00:00
Daniel Sanders
7e0df9aa29 [mips][msa] Added support for matching vshf from normal IR (i.e. not intrinsics)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191301 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-24 14:02:15 +00:00
Daniel Sanders
acfa5a203c [mips][msa] Remove the VSPLAT and VSPLATD nodes in favour of matching BUILD_VECTOR.
Most constant BUILD_VECTOR's are matched using ComplexPatterns which cover
bitcasted as well as normal vectors. However, it doesn't seem to be possible to
match ldi.[bhwd] in a type-agnostic manner (e.g. to support the widest range of
immediates, it should be possible to use ldi.b to load v2i64) using TableGen so
ldi.[bhwd] is matched using custom code in MipsSEISelDAGToDAG.cpp

This made the majority of the constant splat BUILD_VECTOR lowering redundant.
The only transformation remaining for constant splats is when an (up-to) 32-bit
constant splat is possible but the value does not fit into a 10-bit signed
integer. In this case, the BUILD_VECTOR is transformed into a bitcasted
BUILD_VECTOR so that fill.[bhw] can be used to splat the vector from a GPR32
register (which is initialized using the usual lui/addui sequence).

There are no additional tests since this is a re-implementation of previous
functionality. The change is intended to make it easier to implement some of
the upcoming instruction selection patches since they can rely on existing
support for BUILD_VECTOR's in the DAGCombiner.

compare_float.ll changed slightly because a BITCAST is no longer
introduced during legalization.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191299 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-24 13:33:07 +00:00
Daniel Sanders
ad16ddeb8e [mips][msa] Non-constant BUILD_VECTOR's should be expanded to INSERT_VECTOR_ELT instead of memory operations.
The resulting code is the same length, but doesnt cause memory traffic or latency.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191297 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-24 13:16:15 +00:00
Daniel Sanders
421dcc5921 [mips][msa] Added partial support for matching fmax_a from normal IR (i.e. not intrinsics)
This covers the case where fmax_a can be used to implement ISD::FABS.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191296 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-24 13:02:08 +00:00
Daniel Sanders
930f2b5108 [mips][msa] Line wrapping.
No functional change.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191295 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-24 12:45:36 +00:00
Daniel Sanders
c998bc9843 [mips][msa] Added support for matching andi, ori, nori, and xori from normal IR (i.e. not intrinsics)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191293 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-24 12:32:47 +00:00
Daniel Sanders
89d13c1b38 [mips][msa] Added support for matching max, maxi, min, mini from normal IR (i.e. not intrinsics)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191291 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-24 12:18:31 +00:00
Daniel Sanders
38a10ff063 [mips][msa] Added support for matching bsel and bseli from normal IR (i.e. not intrinsics)
This required correcting the definition of the bsel and bseli intrinsics.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191290 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-24 12:04:44 +00:00
Patrik Hagglund
d4bf7a3853 Remove error output from configure if CFLAGS is set (r174313).
This fixes PR16724.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191289 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-24 11:38:45 +00:00
Evgeniy Stepanov
ecf0fcd2b1 [msan] Handling of atomic load/store, atomic rmw, cmpxchg.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191287 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-24 11:20:27 +00:00
Daniel Sanders
ae1fb8fc19 [mips][msa] Added support for matching comparisons from normal IR (i.e. not intrinsics)
MIPS SelectionDAG changes:
* Added VCEQ, VCL[ET]_[SU] nodes to represent vector comparisons that produce a bitmask.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191286 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-24 10:46:19 +00:00
Daniel Sanders
cfb1e17031 [mips][msa] Added support for matching slli, srai, and srli from normal IR (i.e. not intrinsics)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191285 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-24 10:28:18 +00:00
Bill Wendling
42d4259524 Followup to r191252.
Make sure that the code that handles the constant addresses is run for the
GEPs. This just refactors that code and then calls it for the GEPs that are
collected during the iteration.

<rdar://problem/12445434>


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191281 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-24 07:19:30 +00:00
Craig Topper
fb2d8e137e Fix formatting to match coding standards.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191280 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-24 06:21:04 +00:00
NAKAMURA Takumi
b2d2575bd8 llvm/test/CodeGen/AArch64/neon-scalar-reduce-pairwise.ll: Use -mtriple here, or aach64-pecoff might be misassumed on win32 hosts.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191275 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-24 04:14:29 +00:00
NAKAMURA Takumi
e1e8fe1f2f DWARFTypeUnit::dump(): Use PRIx64 to format uint64_t.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191266 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-24 03:23:07 +00:00
Jiangning Liu
477fc628b3 Initial support for Neon scalar instructions.
Patch by Ana Pazos.

1.Added support for v1ix and v1fx types.
2.Added Scalar Pairwise Reduce instructions.
3.Added initial implementation of Scalar Arithmetic instructions.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191263 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-24 02:47:27 +00:00
Michael Gottesman
44e8441767 [stackprotector] Forgot to add in PR number to test case.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191261 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-24 02:10:55 +00:00
Michael Gottesman
eed779ff68 [stackprotector] Allow for copies from vreg -> vreg to be in a terminator sequence.
Sometimes a copy from a vreg -> vreg sneaks into the middle of a terminator
sequence. It is safe to slice this into the stack protector success bb.

This fixes PR16979.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191260 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-24 01:50:26 +00:00
Eli Friedman
17f013265f Misc fixes for cpp backend.
PR17317.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191258 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-24 00:36:09 +00:00
Eric Christopher
3d2c90f6dd Add namespaces to the list of items that we expose via pubnames.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191257 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-24 00:17:57 +00:00
Eric Christopher
7a6ae29cdb Regenerate testcase from source.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191256 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-24 00:17:54 +00:00
Eric Christopher
56b62c0ea2 Format the index entry kind string to align.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191255 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-24 00:17:49 +00:00
David Blaikie
cb21ba8e76 Make dwarfdump-type-units.test order-independent
The order in which the comdat type unit sections appear in the output is
unspecified and may vary from machine to machine.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191253 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-24 00:13:23 +00:00
Bill Wendling
cb3023ae51 Selecting the address from a very long chain of GEPs can blow the stack.
The recursive nature of the address selection code can cause the stack to
explode if there is a long chain of GEPs. Convert the recursive bit into a
iterative method to avoid this.

<rdar://problem/12445434>


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191252 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-24 00:13:08 +00:00
David Blaikie
7533165612 Comments for r191234 as suggested by Eric Christopher.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191244 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-23 23:39:55 +00:00
Reid Kleckner
118a0659ab Explicitly request unsigned enum types when desired
The underlying type of all plain enums in MSVC is 'int', even if the
enumerator contains large 32-bit unsigned values or values greater than
UINT_MAX.  The only way to get a large or unsigned enum type is to
request it explicitly with the C++11 strong enum types feature.

However, since LLVM isn't C++11 yet, I had to add a conditional
LLVM_ENUM_INT_TYPE to Compiler.h to control its usage.

The motivating true positive for this change is compiling PointerIntPair
with MSVC for win64.  The PointerIntMask value is supposed to be pointer
sized value of all ones with some low zeros.  Instead, it's truncated to
32-bits!  We are only saved later because it is sign extended back in
the AND with int64_t, and we happen to want all ones.

This silences lots of -Wmicrosoft warnings during a clang self-host
targeting Windows.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191241 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-23 23:26:57 +00:00
Eric Christopher
5a63474e2d Add more external types to the pubtypes table. Expand the asm
checking patch until we get full dumping support.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191239 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-23 23:15:58 +00:00
David Blaikie
262f548b09 Unbreak the build (from r191233)since we're calling printf.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191238 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-23 23:15:57 +00:00
Eric Christopher
a31a975e54 Rename IsStatic variable to Linkage in order to be a bit more descriptive.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191236 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-23 22:59:14 +00:00
Eric Christopher
734334e349 Formatting.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191235 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-23 22:59:11 +00:00
David Blaikie
438f5391b2 llvm-dwarfdump/libDebugInfo support for type units
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191234 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-23 22:44:47 +00:00
David Blaikie
cd7c4980d4 Exract most of DWARFCompileUnit into a new DWARFUnit to prepare for the coming DWARFTypeUnit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191233 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-23 22:44:40 +00:00
Reed Kotler
f2058addc2 Make nomips16 mask not repeat if it ends with a '.'.
This mask is purely for debugging and testing.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191231 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-23 22:36:11 +00:00
Bill Wendling
54e82495e9 Reformat code with clang-format.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191226 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-23 20:57:47 +00:00
Eric Christopher
cdeaae4f75 Handle gnu pubtypes sections:
a) Make sure we are emitting the correct section in our section labels
when we begin the module.
b) Make sure we are emitting the correct pubtypes section in the
presence of gnu pubtypes.
c) For C++ struct, union, class, and enumeration types are default
external.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191225 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-23 20:55:35 +00:00
Peter Collingbourne
a4ae405c1f Add a paragraph on prefix data layout.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191219 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-23 20:14:21 +00:00
Rafael Espindola
fe8f9e7a03 Remove remaining references to -O4.
Thanks to Hal Finkel for noticing it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191216 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-23 19:50:59 +00:00
Kay Tiong Khoo
670711e662 fix typo: than -> then
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191214 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-23 18:43:51 +00:00
Richard Mitton
eb46def978 Fixed debug_aranges handling for common symbols.
The size of common symbols is now tracked correctly, so they can be listed in the arange section without needing knowledge of other following symbols.

.comm (and .lcomm) do not indicate to the system assembler any particular section to use, so we have to treat them as having no section.

Test case update to account for this.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191210 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-23 17:56:20 +00:00
David Blaikie
9528b0e466 DebugInfo: Wrap section data and relocs together for dwarf dumping support
This is a small step that may enable some simplifications in producer
(DWARFContext) and consumer (DWARFCompileUnit and other places) by
making a more complete abstraction around the data and relocations for a
section. Small initial steps could include simple changes such as
passing the pair to DWARFCompileUnit's ctor rather than passing the data
and relocs separately. I don't intend to pursue any such changes
immediately, however.

The motivation for doing this now is that type unit dumping will need to
deal with these data+reloc pairs moreso than the existing dumping
support has needed to associate the data as type unit sections are named
the same (debug_types) and comdat group folded. So to implement dumping
and reloc handling we'll need a mapping of section->data+relocs.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191209 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-23 17:42:01 +00:00
Ben Langmuir
b3350acc26 Add sha intrinsic tests
These should have been included with r190864, but I forgot to use svn add.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191208 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-23 16:57:52 +00:00