Commit Graph

168091 Commits

Author SHA1 Message Date
Marshall Clow 11918cff19 Mark LWG issue 2299 as complete. No code changes; libc++ already implements this.
llvm-svn: 202203
2014-02-25 23:11:19 +00:00
Adrian Prantl 6aa7616355 Attempt to unbreak an MSVC buildbot by switching to %llc_dwarf.
llvm-svn: 202202
2014-02-25 23:03:00 +00:00
David Blaikie 20474106a1 DwarfDebug: Avoid emitting an empty debug_aranges section when aranges are disabled
llvm-svn: 202201
2014-02-25 22:46:44 +00:00
Ted Kremenek c1b2875e69 Hoist culling of -Wunreachable-code from headers before we even run the analysis.
llvm-svn: 202200
2014-02-25 22:35:37 +00:00
Adrian Prantl 69140d2c0f Address review comments for r202188.
This is refactoring / simplifying code, updating comments and enabling the
testcase on non-x86 platforms.

No functionality change.

llvm-svn: 202199
2014-02-25 22:27:14 +00:00
Rafael Espindola 248ac13975 Fix resetting the DataLayout in a Module.
No tool does this currently, but as everything else in a module we should be
able to change its DataLayout.

Most of the fix is in DataLayout to make sure it can be reset properly.

The test uses Module::setDataLayout since the fact that we mutate a DataLayout
is an implementation detail. The module could hold a OwningPtr<DataLayout> and
the DataLayout itself could be immutable.

Thanks to Philip Reames for pushing me in the right direction.

llvm-svn: 202198
2014-02-25 22:23:04 +00:00
Alp Toker afc9eb33fd Restore string match behavior following changes in r202018
llvm-svn: 202197
2014-02-25 22:04:37 +00:00
Chandler Carruth 7b8e112407 [reassociate] Switch two std::sort calls into std::stable_sort calls as
their inputs come from std::stable_sort and they are not total orders.

I'm not a huge fan of this, but the really bad std::stable_sort is right
at the beginning of Reassociate. After we commit to stable-sort based
consistent respect of source order, the downstream sorts shouldn't undo
that unless they have a total order or they are used in an
order-insensitive way. Neither appears to be true for these cases.
I don't have particularly good test cases, but this jumped out by
inspection when looking for output instability in this pass due to
changes in the ordering of std::sort.

llvm-svn: 202196
2014-02-25 21:54:50 +00:00
Tom Stellard fd0d86c322 R600: Don't unconditionally unroll loops with private memory accesses
This causes the size of the scrypt kernel to explode and eats all the
memory on some systems.

llvm-svn: 202195
2014-02-25 21:36:21 +00:00
Tom Stellard 1f15bff0df R600/SI: Custom select 64-bit ADD
llvm-svn: 202194
2014-02-25 21:36:18 +00:00
Chandler Carruth 3b79b2ab4e [SROA] Add an off-by-default *strict* inbounds check to SROA. I had SROA
implemented this way a long time ago and due to the overwhelming bugs
that surfaced, moved to a much more relaxed variant. Richard Smith would
like to understand the magnitude of this problem and it seems fairly
harmless to keep some flag-controlled logic to get the extremely strict
behavior here. I'll remove it if it doesn't prove useful.

llvm-svn: 202193
2014-02-25 21:24:45 +00:00
Hal Finkel 22304046c7 Account for 128-bit integer operations in PPCCTRLoops
We need to abort the formation of counter-register-based loops where there are
128-bit integer operations that might become function calls.

llvm-svn: 202192
2014-02-25 20:51:50 +00:00
Rafael Espindola 449d3b7493 Don't try to set a dummy DataLayout. It is parsed now.
llvm-svn: 202191
2014-02-25 20:41:28 +00:00
Rafael Espindola f863ee2949 Store a DataLayout in Module.
Now that DataLayout is not a pass, store one in Module.

Since the C API expects to be able to get a char* to the datalayout description,
we have to keep a std::string somewhere. This patch keeps it in Module and also
uses it to represent modules without a DataLayout.

Once DataLayout is mandatory, we should probably move the string to DataLayout
itself since it won't be necessary anymore to represent the special case of a
module without a DataLayout.

llvm-svn: 202190
2014-02-25 20:01:08 +00:00
Jim Ingham 5689a217e3 Switch debugserver to detach on error by default, and change the flag to kill-on-error.
Also fix the bug where lldb prints: "Got a connection and launched debugserver" rather
than the name of the process it actually launched.

llvm-svn: 202189
2014-02-25 19:57:47 +00:00
Adrian Prantl 3f49c890bf Debug info: Support variadic functions.
Variadic functions have an unspecified parameter tag after the last
argument. In IR this is represented as an unspecified parameter in the
subroutine type.

Paired commit with CFE r202185.

rdar://problem/13690847

This re-applies r202184 + a bugfix in DwarfDebug's argument handling.

llvm-svn: 202188
2014-02-25 19:57:42 +00:00
Adrian Prantl fd1f82a711 Revert "Debug info: Support variadic functions."
This reverts commit r202184 because of buildbot breakage.

llvm-svn: 202187
2014-02-25 19:48:36 +00:00
Manman Ren fa32ca1e8e Remove outdated comments.
llvm-svn: 202186
2014-02-25 19:47:15 +00:00
Adrian Prantl d45ba2527c Debug info: Generate debug info for variadic functions.
Paired commit with LLVM.

rdar://problem/13690847

llvm-svn: 202185
2014-02-25 19:38:11 +00:00
Adrian Prantl 70ff4f7003 Debug info: Support variadic functions.
Variadic functions have an unspecified parameter tag after the last
argument. In IR this is represented as an unspecified parameter in the
subroutine type.

Paired commit with CFE.

rdar://problem/13690847

llvm-svn: 202184
2014-02-25 19:38:07 +00:00
Rafael Espindola c5d1689b45 Update for llvm api change.
llvm-svn: 202183
2014-02-25 19:17:57 +00:00
Ted Kremenek 38d77473b0 Add preprocessed output to ccc-analyzer's accepted language map.
llvm-svn: 202182
2014-02-25 19:16:33 +00:00
Benjamin Kramer 2907b08219 Pretty Printer: Print constexpr and ref qualifiers. Don't print return types on destructors.
llvm-svn: 202181
2014-02-25 18:49:49 +00:00
Enrico Granata dc598febe4 Make TestStdCXXDisassembly.StdCXXDisassembleTestCase work with libc++
<rdar://problem/16115219>

llvm-svn: 202180
2014-02-25 18:47:23 +00:00
Roman Divacky 9f77940fdc Pass the sparc architecture variant to the assembler.
llvm-svn: 202179
2014-02-25 18:45:49 +00:00
Hans Wennborg 7b0dcef072 clang-cl: use -fno-rtti by default
Generating RTTI in the MS ABI is currently not supported, and the failures
are confusing to users, so let's disable it by default for now.

llvm-svn: 202178
2014-02-25 18:36:22 +00:00
Roman Divacky b1ae3d4937 Give sparcv9 the ability to set the target cpu. Change it from accepting
-march which doesnt exist on sparc gcc to -mcpu. While here adjust a
few tests to not write an unused temporary file.

llvm-svn: 202177
2014-02-25 18:35:30 +00:00
Ben Langmuir 801272a98c Add a driver option -ivfsoverlay
Reads the description of a virtual filesystem from a file and overlays
it over the real file system.

llvm-svn: 202176
2014-02-25 18:23:47 +00:00
Reid Kleckner db673ca26a MS ABI: Just use getTypeInfoInChars to get the field size
This was changed to use manual desugaring and multiplication in r201832
and fixed for multi-dimensional arrays in r201917.  However, it breaks
down in the presence of typedefs.  Rather than attempting to handle all
the desugaring, just go back to calling the generic type info code.

This was discovered while compiling SIInstrWaits.cpp in the R600
backend.

llvm-svn: 202175
2014-02-25 18:08:48 +00:00
Benjamin Kramer 00e8a1915a Reapply "Pretty Printer: Fix printing of conversion operator decls and calls."
There were many additional tests that had the bad behavior baked in.

llvm-svn: 202174
2014-02-25 18:03:55 +00:00
Rafael Espindola 8e38871865 Revert "Pretty Printer: Fix printing of conversion operator decls and calls."
This reverts commit r202167.

It broke Analysis/auto-obj-dtors-cfg-output.cpp

llvm-svn: 202173
2014-02-25 17:39:16 +00:00
Richard Osborne 50e3b7f759 [XCore] Add intrinsic for CLRPT (clear port time) instruction.
llvm-svn: 202172
2014-02-25 17:31:15 +00:00
Richard Osborne 92fdd3491a [XCore] Add intrinsic for EDU (event disable unconditional) instruction.
llvm-svn: 202171
2014-02-25 17:31:06 +00:00
Rafael Espindola 303f8b06f8 Update for llvm api change.
llvm-svn: 202170
2014-02-25 17:30:40 +00:00
Rafael Espindola 935125126c Make DataLayout a plain object, not a pass.
Instead, have a DataLayoutPass that holds one. This will allow parts of LLVM
don't don't handle passes to also use DataLayout.

llvm-svn: 202168
2014-02-25 17:30:31 +00:00
Benjamin Kramer 48f52e926d Pretty Printer: Fix printing of conversion operator decls and calls.
- Don't emit anything when we encounter a call to a conversion operator.
    "bar(a & b)" instead of "bar(a & b.operator int())"
  This preserves the semantics and is still idempotent if we print the AST multiple times.

- Properly print declarations of conversion operators.
    "explicit operator bool();" instead of "bool operator _Bool();"

PR18776.

llvm-svn: 202167
2014-02-25 17:26:26 +00:00
Shankar Easwaran a328344367 [LinkerScript] parse OUTPUT_FORMAT : treat quotedStrings as identifier
llvm-svn: 202166
2014-02-25 17:02:54 +00:00
Logan Chien 18583d71e8 Keep the link register for uwtable.
The function with uwtable attribute might be visited by the
stack unwinder, thus the link register should be considered
as clobbered after the execution of the branch and link
instruction (i.e. the definition of the machine instruction
can't be ignored) even when the callee function are marked
with noreturn.

llvm-svn: 202165
2014-02-25 16:57:28 +00:00
Alexander Kornienko 84e30a7346 Adding documentation for clang-tidy.
Summary:
Contains a short user's manual and some instructions on writing
clang-tidy checks.

Reviewers: klimek, djasper

Reviewed By: klimek

CC: cfe-commits

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

llvm-svn: 202164
2014-02-25 16:46:13 +00:00
Richard Osborne 8b7466e886 [XCore] Prefer to word align functions.
The behaviour of the XCore's instruction buffer means that the performance
of the same code sequence can differ depending on whether it starts at a 4
byte aligned address or not. Since we don't model the instruction buffer
in the backend we have no way of knowing for sure if it is beneficial to
word align a specific function. However, in the absence of precise
modelling, it is better on balance to word align functions because:

* It makes a fetch-nop while executing the prologue slightly less likely.
* If we don't word align functions then a small perturbation in one
  function can have a dramatic knock on effect. If the size of the function
  changes it might change the alignment and therefore the performance of
  all the functions that happen to follow it in the binary. This butterfly
  effect makes it harder to reason about and measure the performance of
  code.

llvm-svn: 202163
2014-02-25 16:37:15 +00:00
Marshall Clow 4da015b9b4 Mark LWG Issue 2257 as complete.
llvm-svn: 202162
2014-02-25 16:35:39 +00:00
Marshall Clow f433d63439 Mark LWG Issues 2278 and 2313 as complete. No code changes needed; libc++ already implemented both of these.
llvm-svn: 202161
2014-02-25 16:25:55 +00:00
Marshall Clow 0d1560e10e Implement LWG issue 2301: Mark std::tie as constexpr
llvm-svn: 202158
2014-02-25 16:11:46 +00:00
Rafael Espindola 6d6e87be9f Factor out calls to AA.getDataLayout().
llvm-svn: 202157
2014-02-25 15:52:19 +00:00
Evgeniy Stepanov 6697dc6aa3 [asan] Remove extra sonames from libraries in tests.
llvm-svn: 202156
2014-02-25 15:25:37 +00:00
Rafael Espindola 43b5a51e7c Make a few more DataLayout variables const.
llvm-svn: 202155
2014-02-25 14:24:11 +00:00
Ed Maste 96e51b890b Reapply r184270 by Jim Ingham to avoid abort on FreeBSD
Don't actually Halt in the Interrupt handler for the Process, just
  send an AsyncInterrupt.  That's actually not async-signal-clean, but
  it is a lot safer than Halt...

The underlying problem is actually a nested pthread_cond_wait from the
signal handler.  Note frames 4, 13, 18 in the backtrace of the aborting
path below.

    frame #1: 0x000000080715fff9 libc.so.7`abort + 73 at abort.c:65
    frame #2: 0x0000000805d20fda libthr.so.3`_thread_exit(fname=<unavailable>, lineno=<unavailable>, msg=<unavailable>) + 58 at thr_exit.c:182
    frame #3: 0x0000000805d1fdc8 libthr.so.3`cond_wait_common [inlined] cond_wait_user(mp=<unavailable>, abstime=<unavailable>, cancel=<unavailable>) + 936 at thr_cond.c:223
    frame #4: 0x0000000805d1fd5b libthr.so.3`cond_wait_common(cond=<unavailable>, mutex=<unavailable>, abstime=<unavailable>, cancel=<unavailable>) + 827 at thr_cond.c:311
    frame #5: 0x00000008013450b5 liblldb.so.3.5`lldb_private::Condition::Wait(lldb_private::Mutex&, lldb_private::TimeValue const*, bool*) + 117
    frame #6: 0x00000008013411e8 liblldb.so.3.5`lldb_private::Predicate<bool>::WaitForValueEqualTo(bool, lldb_private::TimeValue const*, bool*) + 200
    frame #7: 0x00000008013eb34c liblldb.so.3.5`lldb_private::Listener::WaitForEventsInternal(lldb_private::TimeValue const*, lldb_private::Broadcaster*, lldb_private::ConstString const*, unsigned int, unsigned int, std::__1::shared_ptr<lldb_private::Event>&) + 876
    frame #8: 0x00000008013eb751 liblldb.so.3.5`lldb_private::Listener::WaitForEvent(lldb_private::TimeValue const*, std::__1::shared_ptr<lldb_private::Event>&) + 81
    frame #9: 0x00000008017c5bcf liblldb.so.3.5`lldb_private::Process::Halt(bool) + 783
    frame #10: 0x00000008017def3a liblldb.so.3.5`IOHandlerProcessSTDIO::Interrupt() + 74
    frame #11: 0x00000008013823d3 liblldb.so.3.5`lldb_private::Debugger::DispatchInputInterrupt() + 115
    frame #12: 0x00000008011d69c5 liblldb.so.3.5`lldb::SBDebugger::DispatchInputInterrupt() + 69
    frame #13: 0x000000000040b254 lldb`sigint_handler(int) + 68
    frame #14: 0x0000000805d1b3da libthr.so.3`handle_signal(actp=<unavailable>, sig=<unavailable>, info=<unavailable>, ucp=<unavailable>) + 234 at thr_sig.c:240
    frame #15: 0x0000000805d1afc2 libthr.so.3`thr_sighandler(sig=<unavailable>, info=<unavailable>, _ucp=<unavailable>) + 306 at thr_sig.c:183
    frame #16: 0x00007ffffffff003
    frame #17: 0x0000000805d1fc7e libthr.so.3`cond_wait_common [inlined] cond_wait_user(mp=<unavailable>, abstime=<unavailable>, cancel=1) + 239 at thr_cond.c:255
    frame #18: 0x0000000805d1fb8f libthr.so.3`cond_wait_common(cond=<unavailable>, mutex=<unavailable>, abstime=0x0000000000000000, cancel=1) + 367 at thr_cond.c:311
    frame #19: 0x00000008013450d2 liblldb.so.3.5`lldb_private::Condition::Wait(lldb_private::Mutex&, lldb_private::TimeValue const*, bool*) + 146

llvm-svn: 202154
2014-02-25 14:20:14 +00:00
Kostya Serebryany 67968cbf93 [sanitizer] minimal support for recursive locks indeadlock detector
llvm-svn: 202153
2014-02-25 14:02:01 +00:00
Tim Northover 2df47cedeb AArch64: use different type modifier in arm_neon.td
The 'f' modifier is designed for integer type arguments really (according to
its documentation). It's better to use the "half width, same number" modifier.

Should be no user-visible change.

llvm-svn: 202152
2014-02-25 13:53:01 +00:00
Christian Pirker 9b019ae899 Add AArch64 big endian Target (aarch64_be)
llvm-svn: 202151
2014-02-25 13:51:00 +00:00