Commit Graph

148880 Commits

Author SHA1 Message Date
Adrian Prantl 7e2b05c378 Do not generate VLAs as complex variables any more, as they are now
correctly represented as breg+0 locations in the backend.

(Paired commit with LLVM: r180815)

rdar://problem/13658587

llvm-svn: 180817
2013-04-30 22:17:36 +00:00
Adrian Prantl 9a576644e4 Change the informal convention of DBG_VALUE so that we can express a
register-indirect address with an offset of 0.
It used to be that a DBG_VALUE is a register-indirect value if the offset
(operand 1) is nonzero. The new convention is that a DBG_VALUE is
register-indirect if the first operand is a register and the second
operand is an immediate. For plain registers use the combination reg, reg.

rdar://problem/13658587

llvm-svn: 180816
2013-04-30 22:16:46 +00:00
Andrew Trick dd77014acc MI Sched: revert a minor heuristic that snuck in with -misched-vcopy.
I'll fix the heuristic in a general way in a follow-up commit.

llvm-svn: 180815
2013-04-30 22:10:59 +00:00
Sean Callanan 8d285ada3d Added a test case verifying that simple C++
functions can be called by basename.

<rdar://problem/13709855>

llvm-svn: 180814
2013-04-30 22:05:15 +00:00
Chad Rosier 357672316b [driver] Allow multiple -arch options with -save-temps by adding the arch name
to the temporary files.
rdar://13218604

llvm-svn: 180813
2013-04-30 22:01:21 +00:00
Jordan Rose 38c97d2642 [analyzer] scan-build: support -enable-checker with new Xcode integration.
<rdar://problem/13772094>

llvm-svn: 180812
2013-04-30 22:00:04 +00:00
Howard Hinnant 35abaab7d3 This patch introduces an alternative layout for basic_string which when the string is short, the data pointer will be word-aligned. It can be activated with -D_LIBCPP_ALTERNATE_STRING_LAYOUT. These two different layouts (the default and _LIBCPP_ALTERNATE_STRING_LAYOUT) are not ABI compatible with each other. Once one is chosen for a given platform, it is disruptive to change it.
llvm-svn: 180811
2013-04-30 21:44:48 +00:00
Sean Callanan 9b7005bf42 RegisterValues can now report their contents as
UInts even if their contents were set as bytes.
This makes expressions using registers work
better, especially with core files.

<rdar://problem/13743427>

llvm-svn: 180810
2013-04-30 21:41:44 +00:00
Richard Smith e6c878c0c6 Revert r180739 and r180748: they broke C++11 thread_local on non-Darwin systems and did not do the right thing on Darwin.
Original commit message:

Emit the TLS intialization functions into a list.

Add the TLS initialization functions to a list of initialization functions. The
back-end takes this list and places the function pointers into the correct
section. This way they're called before `main().'

<rdar://problem/13733006>

llvm-svn: 180809
2013-04-30 21:34:13 +00:00
Richard Smith 061f1e21be When deducing an 'auto' type, don't modify the type-as-written.
llvm-svn: 180808
2013-04-30 21:23:01 +00:00
Akira Hatanaka 9da442f506 [mips] Simplify code.
No intended functionality changes.

llvm-svn: 180807
2013-04-30 21:17:07 +00:00
Nadav Rotem 9feda6071a Fix a typo
llvm-svn: 180806
2013-04-30 21:04:51 +00:00
Nadav Rotem 4b01c3a45d Update the release notes about the min/max reductions that Arnold added.
llvm-svn: 180805
2013-04-30 21:04:04 +00:00
Akira Hatanaka 433de170ee [mips] Test for r179873.
Patch by Zoran Jovanovic.

llvm-svn: 180804
2013-04-30 20:48:49 +00:00
Enrico Granata 82fabf89b4 <rdar://problem/13695846>
Enabling LLDB to write to variables that are stored in registers
Previously, this would not work since the Value's Context loses the notion of the data being in a register
We now store an "original" context that comes out of DWARF parsing, and use that context's data when attempting a write

llvm-svn: 180803
2013-04-30 20:45:04 +00:00
Jim Grosbach 0b914fe839 InstCombine: Fold more shuffles of shuffles.
Always fold a shuffle-of-shuffle into a single shuffle when there's only one
input vector in the first place. Continue to be more conservative when there's
multiple inputs.

rdar://13402653
PR15866

llvm-svn: 180802
2013-04-30 20:43:52 +00:00
Akira Hatanaka 84d6d9bdaa [mips] Clear isCommutable bit of instructions which are not commutable.
llvm-svn: 180801
2013-04-30 20:40:39 +00:00
Reid Kleckner 700c3eea1e [ms-cxxabi] Implement member pointer comparisons
Summary:
Like Itanium, comparisons are basically bitwise comparisons of the two
values, with an exception for null member function pointers.  If two
function pointers are null, only the function pointer field matters for
comparison purposes.  The rest of the bits can be arbitrary.  We take
advantage of this in isZeroInitializable(), and it may matter once we
start emitting conversions.

Reviewers: rjmccall

CC: cfe-commits

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

llvm-svn: 180800
2013-04-30 20:15:14 +00:00
Hal Finkel 7153251ab5 LocalStackSlotAllocation improvements
First, taking advantage of the fact that the virtual base registers are allocated in order of the local frame offsets, remove the quadratic register-searching behavior. Because of the ordering, we only need to check the last virtual base register created.

Second, store the frame index in the FrameRef structure, and get the frame index and the local offset from this structure at the top of the loop iteration. This allows us to de-nest the loops in insertFrameReferenceRegisters (and I think makes the code cleaner). I also moved the needsFrameBaseReg check into the first loop over instructions so that we don't bother pushing FrameRefs for instructions that don't want a virtual base register anyway.

Lastly, and this is the only functionality change, avoid the creation of single-use virtual base registers. These are currently not useful because, in general, they end up replacing what would be one r+r instruction with an add and a r+i instruction. Committing this removes the XFAIL in CodeGen/PowerPC/2007-09-07-LoadStoreIdxForms.ll

Jim has okayed this off-list.

llvm-svn: 180799
2013-04-30 20:04:37 +00:00
Rafael Espindola 789a1c8a23 Text files should not be marked executable.
Patch by Oliver Pinter.

llvm-svn: 180797
2013-04-30 19:06:15 +00:00
Manman Ren 1a5ff287fd TBAA: remove !tbaa from testing cases if not used.
This will make it easier to turn on struct-path aware TBAA since the metadata
format will change.

llvm-svn: 180796
2013-04-30 17:52:57 +00:00
Manman Ren e36d3416ab Struct-path aware TBAA: enable struct-path aware TBAA for classes.
llvm-svn: 180795
2013-04-30 17:38:09 +00:00
Adrian Prantl 8beccf9e6d Spelling. Thanks, Eric.
llvm-svn: 180794
2013-04-30 17:33:32 +00:00
Adrian Prantl 0941638a1b Set debug locations for branch instructions created during inlining, even
the inlined function has multiple returns.

rdar://problem/12415623

llvm-svn: 180793
2013-04-30 17:08:16 +00:00
Bob Wilson b1835b7947 Rewrite sw_vers makefile check to avoid error message on Linux.
When building compiler-rt on Linux, the "which sw_vers" check fails and
writes an error message into the build log. Apparently on Solaris "which"
writes the error message to stdout, so that the current test won't even
work properly. As far as I know sw_vers always lives in /usr/bin, so just
check for it there instead of using "which".

llvm-svn: 180792
2013-04-30 17:06:40 +00:00
Rafael Espindola dd27530a44 Change getSlotIndex to return unsigned.
The actual storage was already using unsigned, but the interface was using
uint64_t. This is wasteful on 32 bits and looks to be the root causes of
a miscompilation on Windows where a value was being sign extended to 64bits
to compare with the result of getSlotIndex.

Patch by Pasi Parviainen!

llvm-svn: 180791
2013-04-30 16:53:38 +00:00
Rafael Espindola 52501033d0 Fix Addend computation for non external relocations on Macho.
llvm-svn: 180790
2013-04-30 15:40:54 +00:00
Richard Smith 27d807cc9c Don't treat a non-deduced 'auto' type as being type-dependent. Instead, there
are now two distinct canonical 'AutoType's: one is the undeduced 'auto'
placeholder type, and the other is a deduced-but-dependent type. All
deduced-to-a-non-dependent-type cases are still non-canonical.

llvm-svn: 180789
2013-04-30 13:56:41 +00:00
Dmitry Vyukov 93b2cba03b asan: fix windows build
llvm-svn: 180788
2013-04-30 13:30:29 +00:00
Dmitry Vyukov db7d9e5db4 tsan: comment out debug output in test
llvm-svn: 180787
2013-04-30 13:09:31 +00:00
Rafael Espindola 6d3709430f Use {{.*}}suffix instead of [[TC]] in places where we print the toolchain
path with /. This matches linux-ld.c and should finish fixing this test on
windows.

llvm-svn: 180786
2013-04-30 13:08:15 +00:00
Vincent Lejeune e69e26025e R600: fix loop-address.ll test
Texture cache is now used when shader type is not specified

llvm-svn: 180785
2013-04-30 12:47:56 +00:00
Dmitry Vyukov e8fa45a02c asan/tsan: fix printf(), on the second pass it prints garbage and crashes on random pointer dereference
llvm-svn: 180784
2013-04-30 12:27:48 +00:00
Rafael Espindola 34cfafde9d Always use / when computing mips specific paths.
We were getting paths with both / and \ in them. This should fix mips-cs-ld.c
on the windows bots.

llvm-svn: 180783
2013-04-30 12:24:40 +00:00
Dmitry Vyukov d0ac6c168b tsan: fix deadlock detector table (OK to lock sync var mutex during reporting)
llvm-svn: 180782
2013-04-30 12:00:40 +00:00
Dmitry Vyukov 56cf378071 tsan: reverse stack trace for failed CHECK's, this is how we print traces in other places
llvm-svn: 180781
2013-04-30 11:57:32 +00:00
Dmitry Vyukov 3f7bf08b12 tsan: add interface functions for unaligned access, e.g. __sanitizer_unaligned_load16
llvm-svn: 180780
2013-04-30 11:56:56 +00:00
David Majnemer d73f37bb83 Fix a bug in foldSelectICmpAndOr.
Differences in bitwidth between X and Y could exist even if C1 and C2 have
the same Log2 representation.

llvm-svn: 180779
2013-04-30 10:36:33 +00:00
Mihai Popa af22d91af0 s tightens up the encoding description for ARM post-indexed ldr instructions. All instructions in this class have bit 4 cleared. It turns out that there is a test case for this, but it was marked XFAIL.
llvm-svn: 180778
2013-04-30 09:00:12 +00:00
David Majnemer 8d048d0482 Fix "Combine bit test + conditional or into simple math"
This fixes the optimization introduced in r179748 and reverted in r179750.

While the optimization was sound, it did not properly respect differences in
bit-width.

llvm-svn: 180777
2013-04-30 08:57:58 +00:00
Michael Liao c9ae780b5b Rewrite X86 codegen regression test with FileCheck
llvm-svn: 180776
2013-04-30 07:51:08 +00:00
Simon Atanasyan 036d16d916 [Mips] Pass -mips16, -mmicromips, -mdsp and -mdspr2 flags to the
assembler.

llvm-svn: 180775
2013-04-30 07:47:13 +00:00
Stepan Dyatkovskiy f5aa83dbb0 Refactoring patch.
1. VarArgStyleRegisters: functionality that emits "store" instructions for byval regs moved out into separated method "StoreByValRegs". Before this patch VarArgStyleRegisters had confused use-cases. It was used for both variadic functions and for regular functions with byval parameters. In last case it created new stack-frame and registered it as VarArg frame, that is wrong.

This patch replaces VarArgsStyleRegisters usage for byval parameters with StoreByValRegs method.

2. In ARMMachineFunctionInfo, "get/setVarArgsRegSaveSize" was renamed to "get/setArgRegsSaveSize". By the same reason. Sometimes it was used for variadic functions, and sometimes for byval parameters in regular functions. Actually, this property means the size of registers, that keeps arguments, and thats why it was renamed.

3. In ARMISelLowering.cpp, ARMTargetLowering class, in methods computeRegArea and StoreByValRegs, VARegXXXXXX was renamed to ArgRegsXXXXXX still by the same reasons.

llvm-svn: 180774
2013-04-30 07:19:58 +00:00
Ted Kremenek 44a28091cf Place bitfield -Wconstant-conversion warning into subgroup called -Wbitfield-constant-conversion.
This is to just allow more precise diagnostic control.

Implements <rdar://problem/13766026>.

llvm-svn: 180773
2013-04-30 07:10:22 +00:00
Daniel Jasper 9ba6f9bcc5 Fix very confusing indent in Sema.cpp.
This came up during my Euro LLVM 2013 talk on clang-format and I was
asked to submit it :-).

llvm-svn: 180772
2013-04-30 06:43:16 +00:00
Argyrios Kyrtzidis d48b91dbbe [PCH] Fix memory leak related to deserialized MacroInfo objects.
Deserialized MacroInfos were not destroyed and if their SmallVector did heap allocation,
it was leaked.

rdar://13768967

llvm-svn: 180771
2013-04-30 05:05:35 +00:00
Reid Kleckner 95012aaa93 Try to fix ProgramTest on FreeBSD
This seemed like the cleanest way to find the test executable.  Also fix
the file mode.

llvm-svn: 180770
2013-04-30 04:30:41 +00:00
Shankar Easwaran 02078464e1 [lld][ELF] continue on finding a section with no symbols, tests already present
llvm-svn: 180769
2013-04-30 03:14:01 +00:00
Jason Molenda f7305a6103 Rename unwind_diagnose.py to diagnose_unwind.py. Change
finish-swig-Python-LLDB.sh to create a new lldb.diagnose subdirectory
in the LLDB framework; the first diagnostic command in this directory
is diagnose-unwind.  There may be others added in the future.

Users can load these diagnostic tools into their session with 
"script import lldb.diagnose".

llvm-svn: 180768
2013-04-30 03:03:06 +00:00
Rafael Espindola d00c2765aa Collect the Addend for external relocs.
This fixes 2013-04-04-RelocAddend.ll. We don't have a testcase for non external
relocs with an Addend. I will try to write one.

llvm-svn: 180767
2013-04-30 01:29:57 +00:00