Commit Graph

120959 Commits

Author SHA1 Message Date
Howard Hinnant ad048719a7 Sometimes it takes all day to write a decent comment. This is one of those times, and I'm still not quite sure I have them correct.
llvm-svn: 149154
2012-01-28 00:28:31 +00:00
David Greene ebb006fc3d Fix Record Name Reference
Get the record name though the init to avoid an assert.

llvm-svn: 149153
2012-01-28 00:03:24 +00:00
Lang Hames a6958c6c4e Silence warning about parens for && within ||
llvm-svn: 149152
2012-01-27 23:52:25 +00:00
Rafael Espindola bb893fea6b Add r149110 back with a fix for when the vector and the int have the same
width.

llvm-svn: 149151
2012-01-27 23:33:07 +00:00
Jean-Daniel Dupas 400dd1c3d0 Remove the "C" in "implicitly declaring C library function" diagnostic
because all functions are not C functions (i.e. NSLog).

llvm-svn: 149150
2012-01-27 23:21:02 +00:00
David Greene c26e5fb86b Remove Deprecated Features
Move to a model where we build whatever branches are checked out
in the source directories.  This was a bit too smart (and complicated)
in handling details best left to the user and the revision control
system.

In addition, get rid of support for llvm-gcc and building gcc as
these are no longer necessary.

llvm-svn: 149149
2012-01-27 23:01:35 +00:00
Rafael Espindola a4062624d1 Revert r149110 and add a testcase that was crashing since that revision.
Unfortunately I also had to disable constant-pool-sharing.ll the code it tests has been
updated to use the IL logic.

llvm-svn: 149148
2012-01-27 22:42:48 +00:00
Lang Hames ad33d5ace7 Add a "moveInstr" method to LiveIntervals. This can be used to move instructions
around within a basic block while maintaining live-intervals.

Updated ScheduleTopDownLive in MachineScheduler.cpp to use the moveInstr API
when reordering MIs.

llvm-svn: 149147
2012-01-27 22:36:19 +00:00
Lang Hames 6f108d9229 Backing out ill-considered 'refactor'.
llvm-svn: 149146
2012-01-27 21:43:32 +00:00
Johnny Chen aefcf999d2 Add an InstanceSettings::NotifyOwnerIsShuttingDown() method so that the owner can notify InstanceSettings instances
that their owner reference is no longer valid.

llvm-svn: 149145
2012-01-27 21:27:39 +00:00
Lang Hames 376a2d3e99 Move some duplicate loops in the coalescer into their own function.
llvm-svn: 149144
2012-01-27 19:58:14 +00:00
Douglas Gregor a686e1b05d Introduce module attributes into the module map grammar, along with a
single attribute ("system") that allows us to mark a module as being a
"system" module. Each of the headers that makes up a system module is
considered to be a system header, so that we (for example) suppress
warnings there.

If a module is being inferred for a framework, and that framework
directory is within a system frameworks directory, infer it as a
system framework.

llvm-svn: 149143
2012-01-27 19:52:33 +00:00
Devang Patel 63fe5697f4 Intel Syntax: Parse mem operand with seg reg. QWORD PTR FS:[320]
llvm-svn: 149142
2012-01-27 19:48:28 +00:00
Greg Clayton 9620f466af Disable the ConnectionFileDescriptor mutex for now as it is deadlocking our
test suite and I need to investigate this.

llvm-svn: 149141
2012-01-27 18:57:04 +00:00
Johnny Chen f8f0fd765e Fix typo.
llvm-svn: 149140
2012-01-27 18:53:22 +00:00
Johnny Chen 921ca5d4b8 Emit the message about putting ' -- ' between the end of command options and the raw input conditionally,
that is, only if the command object does not want completion.  An example is the "settings set" command.

llvm-svn: 149139
2012-01-27 18:49:33 +00:00
Greg Clayton 29ad7b914f Added a ModuleList::Destroy() method which will reclaim the std::vector
memory by doing a swap.

Also added a few utilty functions that can be enabled for debugging issues
with modules staying around too long when external clients still have references
to them.

llvm-svn: 149138
2012-01-27 18:45:39 +00:00
Jim Grosbach 14a37ab64d Fix typo.
llvm-svn: 149137
2012-01-27 18:35:03 +00:00
Greg Clayton a896f574e0 NULL out the "ptr_" member of shared pointers for debug and release
builds (not build and integration builds) to help catch when a shared pointer
that might be in a collection class is used after the collection
has been freed.

llvm-svn: 149136
2012-01-27 18:33:53 +00:00
Greg Clayton ecc6116950 Enable extra error checking for debug builds in our mutexes by
watching for errors from pthread_mutex_destroy () (usually "Resource
busy" errors for when you have a mutex locked and try to destroy
it), and pthread_mutex_lock, and pthread_mutex_unlock (usually for
trying to lock an invalid mutex that might have possible already
been freed).

llvm-svn: 149135
2012-01-27 18:29:47 +00:00
Greg Clayton a73d269294 There is no need to hold onto an ExecutionContext as a member variable.
ExecutionContext objects have shared pointers to Target, Process, Thread
and Frame objects and they can end up being held onto for too long.

llvm-svn: 149133
2012-01-27 18:18:23 +00:00
Greg Clayton e3f6b5ce48 Fixed a location where we would never end up unlocking our mutex in
the ClusterManager. Also switched to using Mutex::Locker where we can.

llvm-svn: 149132
2012-01-27 18:14:51 +00:00
Greg Clayton b26e6bebac Fixed an issue that could happen during global object destruction in our
map that tracks all live Module classes. We must leak our mutex for our
collection class as it might be destroyed in an order we can't control.

llvm-svn: 149131
2012-01-27 18:08:35 +00:00
Alexander Potapenko f519564d7c Make compiler-rt/trunk/lib/asan compileable with Visual Studio 2008 on Windows.
Patch by Timur Iskhodzhanov (timurrrr@google.com)

To test:
$ cl /c *.c*
in the asan directory.

The code fails to link if you omit the "/c" part but that's one of the
next steps,
as well as a few TODO's I've put into the Windows-specific code.

llvm-svn: 149130
2012-01-27 15:15:04 +00:00
Alexander Potapenko 13d95d5e5a Make compiler-rt/trunk/lib/asan compileable with g++.
Patch by Timur Iskhodzhanov (timurrrr@google.com)

The double-extern thing is
http://llvm.org/bugs/show_bug.cgi?id=11869

And the #include <string[s].h> are only needed on Mac (see comments in
the original code)
and also including them might make strchr/index conflict with the g++
system headers (which don't follow the man pages, ouch!)

llvm-svn: 149129
2012-01-27 10:52:37 +00:00
Abramo Bagnara 7945c981b9 Added source location for the template keyword in AST template-id expressions.
llvm-svn: 149127
2012-01-27 09:46:47 +00:00
Jean-Daniel Dupas fc0da1a8e0 Remove redundant checks.
llvm-svn: 149125
2012-01-27 09:14:17 +00:00
Abramo Bagnara 4244b43b60 Avoid redundant NNS qualification in constructor/destructor names.
llvm-svn: 149124
2012-01-27 08:46:19 +00:00
Argyrios Kyrtzidis 8823d12a53 Add test for -Wno-everything.
llvm-svn: 149123
2012-01-27 07:10:14 +00:00
Craig Topper 5639e9e8fb Move some patterns back near their instructions and use AddedComplexity to fix priority. Merge some patterns into their instruction definition.
llvm-svn: 149122
2012-01-27 07:09:40 +00:00
Argyrios Kyrtzidis 9ffada97ce Due to a bug, -Wno-everything works like -Weverything. Fix the bug by having
-Wno-everything remap all warnings to ignored.

We can now use "-Wno-everything -W<warning>" to ignore all warnings except
specific ones.

llvm-svn: 149121
2012-01-27 06:15:43 +00:00
Argyrios Kyrtzidis 0b5ec2d199 In FixItRecompile::BeginInvocation() reset the diagnostics before executing
the original action.

llvm-svn: 149120
2012-01-27 06:15:37 +00:00
Lang Hames 9e18b6672a Physreg dead defs should be handled too.
llvm-svn: 149118
2012-01-27 03:20:42 +00:00
Chris Lattner cc3aaf1836 smallvectorize.
llvm-svn: 149117
2012-01-27 03:15:49 +00:00
Chris Lattner 0256be96f2 continue making the world safe for ConstantDataVector. At this point,
we should (theoretically optimize and codegen ConstantDataVector as well
as ConstantVector.

llvm-svn: 149116
2012-01-27 03:08:05 +00:00
Matt Beaumont-Gay f3a9a38db4 Unix line endings
llvm-svn: 149115
2012-01-27 02:31:29 +00:00
Bill Wendling 7717e9f4ae Place the GEP instructions nearer to the instructions which use them.
GEP instructions are there for the compiler and shouldn't really output much
code (if any at all). When a GEP is stored in the entry block, Fast ISel (for
one) will not know that it could fold it into further uses. For instance, inside
of the EH handling code. This results in a lot of unnecessary spills and loads
which bloat code and slows down pretty much everything.
<rdar://problem/10694814>

llvm-svn: 149114
2012-01-27 02:02:24 +00:00
Chris Lattner e32fad43b1 make sure the file's matching header is #include'd first.
llvm-svn: 149113
2012-01-27 01:47:28 +00:00
Douglas Gregor 404cddec1b Reimplement (de-)serialization of Objective-C categories to eliminate
the direct serialization of the linked-list structure. Instead, use a
scheme similar to how we handle redeclarations, with redeclaration
lists on the side. This addresses several issues:
  - In cases involving mixing and matching of many categories across
  many modules, the linked-list structure would not be consistent
  across different modules, and categories would get lost.
  - If a module is loaded after the class definition and its other
  categories have already been loaded, we wouldn't see any categories
  in the newly-loaded module.

llvm-svn: 149112
2012-01-27 01:47:08 +00:00
Chris Lattner 7ba81830ff Rewrite CanShareConstantPoolEntry to be implemented in terms of the
mid-level constant folding APIs instead of doing its own analysis.
This makes it more general (e.g. can now share a <2 x i64> with a
<4 x i32>) and avoid duplicating a bunch of logic.

llvm-svn: 149111
2012-01-27 01:46:00 +00:00
Chris Lattner 111d6ee655 enhance constant folding to be able to constant fold bitcast of
ConstantVector's to integer type.

llvm-svn: 149110
2012-01-27 01:44:03 +00:00
John McCall cf6e0c839d Be sure to emit delayed diagnostics after parsing the declaration
of a for-range variable.  Fixes PR11793.

llvm-svn: 149109
2012-01-27 01:29:43 +00:00
Richard Smith 253c2a390a constexpr: Implement the [dcl.constexpr]p5 check for whether a constexpr
function definition can produce a constant expression. This also provides the
last few checks for [dcl.constexpr]p3 and [dcl.constexpr]p4.

llvm-svn: 149108
2012-01-27 01:14:48 +00:00
Argyrios Kyrtzidis af0bdfc692 In FixItRecompile::BeginInvocation(), check the return value of BeginSourceFile().
llvm-svn: 149107
2012-01-27 01:00:47 +00:00
Jim Grosbach 8f28dbdde5 Keep source location information for X86 MCFixup's.
llvm-svn: 149106
2012-01-27 00:51:27 +00:00
Jim Grosbach d856fd0d99 Source information in 'expected relocatable expression' diagnostic.
llvm-svn: 149105
2012-01-27 00:51:23 +00:00
Matt Beaumont-Gay 934bbf50fb Placate gcc's -Wreturn-type
llvm-svn: 149104
2012-01-27 00:46:27 +00:00
Greg Clayton 23f7793b13 <rdar://problem/10760649>
Fixed another double file descriptor close issue that could occur when destroying a ProcessGDBRemote() object. There was a race which was detected by our fd_interposing library:

error: /Applications/Xcode.app/Contents/MacOS/Xcode (pid=55222): close (fd=60) resulted in EBADF:
0   libFDInterposing.dylib              0x00000001082be8ca close$__interposed__ + 666
1   LLDB                                0x00000001194fde91 lldb_private::ConnectionFileDescriptor::Close(int&, lldb_private::Error*) + 97
2   LLDB                                0x00000001194fddcd lldb_private::ConnectionFileDescriptor::Disconnect(lldb_private::Error*) + 143
3   LLDB                                0x00000001194fe249 lldb_private::ConnectionFileDescriptor::Read(void*, unsigned long, unsigned int, lldb::ConnectionStatus&, lldb_private::Error*) + 835
4   LLDB                                0x00000001194fc320 lldb_private::Communication::Read(void*, unsigned long, unsigned int, lldb::ConnectionStatus&, lldb_private::Error*) + 634
5   LLDB                                0x000000011959c7f4 GDBRemoteCommunication::WaitForPacketWithTimeoutMicroSecondsNoLock(StringExtractorGDBRemote&, unsigned int) + 228
6   LLDB                                0x000000011959c6b5 GDBRemoteCommunication::WaitForPacketWithTimeoutMicroSeconds(StringExtractorGDBRemote&, unsigned int) + 49
7   LLDB                                0x0000000119629a71 GDBRemoteCommunicationClient::SendContinuePacketAndWaitForResponse(ProcessGDBRemote*, char const*, unsigned long, StringExtractorGDBRemote&) + 509
8   LLDB                                0x00000001195a4076 ProcessGDBRemote::AsyncThread(void*) + 514
9   LLDB                                0x0000000119568094 ThreadCreateTrampoline(void*) + 91
10  libsystem_c.dylib                   0x00007fff8ca028bf _pthread_start + 335
11  libsystem_c.dylib                   0x00007fff8ca05b75 thread_start + 13

fd=60 was previously closed with this event:
pid=55222: close (fd=60) => 0
0   libFDInterposing.dylib              0x00000001082be870 close$__interposed__ + 576
1   LLDB                                0x00000001194fde91 lldb_private::ConnectionFileDescriptor::Close(int&, lldb_private::Error*) + 97
2   LLDB                                0x00000001194fddcd lldb_private::ConnectionFileDescriptor::Disconnect(lldb_private::Error*) + 143
3   LLDB                                0x00000001194fbf00 lldb_private::Communication::Disconnect(lldb_private::Error*) + 92
4   LLDB                                0x00000001195a2a77 ProcessGDBRemote::StopAsyncThread() + 89
5   LLDB                                0x00000001195a2bf6 ProcessGDBRemote::DoDestroy() + 310
6   LLDB                                0x00000001195f938d lldb_private::Process::Destroy() + 85
7   LLDB                                0x0000000118819b48 lldb::SBProcess::Kill() + 72
8   DebuggerLLDB                        0x0000000117264358 DBGLLDBSessionThread(void*) + 4450
9   LLDB                                0x0000000119568094 ThreadCreateTrampoline(void*) + 91
10  libsystem_c.dylib                   0x00007fff8ca028bf _pthread_start + 335
11  libsystem_c.dylib                   0x00007fff8ca05b75 thread_start + 13

fd=60 was created with this event:
pid=55222: socket (domain = 2, type = 1, protocol = 6) => fd=60
0   libFDInterposing.dylib              0x00000001082bc968 socket$__interposed__ + 600
1   LLDB                                0x00000001194fd75f lldb_private::ConnectionFileDescriptor::ConnectTCP(char const*, lldb_private::Error*) + 179
.....

llvm-svn: 149103
2012-01-27 00:46:15 +00:00
Jim Grosbach 20275a8577 Better user diagnostics for more ARM MachO relocation errors.
llvm-svn: 149102
2012-01-27 00:37:12 +00:00
Jim Grosbach b591277c4a Better diagnostic for malformed .org assembly directive.
Provide source line number information.

llvm-svn: 149101
2012-01-27 00:37:08 +00:00