Commit Graph

111741 Commits

Author SHA1 Message Date
Andrew Trick 147d9cde78 LoopInfo::updateUnloop fix, and verify Block->Loop maps.
Fixes an oversight, and adds verification to catch it in the unloop.ll tests.

llvm-svn: 138622
2011-08-26 03:06:34 +00:00
Eli Friedman 452aae6202 Atomic load/store on ARM/Thumb.
I don't really like the patterns, but I'm having trouble coming up with a
better way to handle them.

I plan on making other targets use the same legalization
ARM-without-memory-barriers is using... it's not especially efficient, but
if anyone cares, it's not that hard to fix for a given target if there's
some better lowering.

llvm-svn: 138621
2011-08-26 02:59:24 +00:00
Greg Clayton 05562d1e5c Added code to test hash bucket sizes for an DWARF index that we can write
to a file.

llvm-svn: 138620
2011-08-26 02:44:58 +00:00
Benjamin Kramer 0655b78ccc Address review comments.
- Reword comments.
- Allow undefined behavior interfering with undefined behavior.
- Add address space checks.

llvm-svn: 138619
2011-08-26 02:25:55 +00:00
Benjamin Kramer fb212a6309 SimplifyCFG: If we have a PHI node that can evaluate to NULL and do a load or store to the address returned by the PHI node then we can consider this incoming value as dead and remove the edge pointing there, unless there are instructions that can affect control flow executed in between.
In theory this could be extended to other instructions, eg. division by zero, but it's likely that it will "miscompile" some code because people depend on div by zero not trapping. NULL pointer dereference usually leads to a crash so we should be on the safe side.

This shrinks the size of a Release clang by 16k on x86_64.

llvm-svn: 138618
2011-08-26 01:22:29 +00:00
Chad Rosier aedf7d5f4e Take 2: Actually fix spacing.
llvm-svn: 138617
2011-08-26 00:49:52 +00:00
John McCall eb07554d9c Be sure to do unary conversions on the operand to an ARC
bridged cast.  Noticed by AST inspection by Ted Kremenek!

llvm-svn: 138616
2011-08-26 00:48:42 +00:00
John McCall 35e4f0cd0f The allocated exception slot does not alias anything; should fix self-host.
llvm-svn: 138615
2011-08-26 00:46:38 +00:00
Chad Rosier 3b561ebd44 80-column.
llvm-svn: 138614
2011-08-26 00:44:04 +00:00
Jeffrey Yasskin 0e9cdbbb06 Handle CXXTempObjectRegion in StackAddrEscapeChecker.
Also convert stack-addr-ps.cpp to use the analyzer instead of just Sema, now
that it doesn't crash, and extract the stack-block test into another file since
it errors, and that prevents the analyzer from running.

llvm-svn: 138613
2011-08-26 00:41:31 +00:00
Chad Rosier ba3df1d3ca [driver] Add -mglobal-merge/-mno-global-merge machine options to enable/disable merging of
globals during codegen.
Fixes <rdar://problem/10017909>.

llvm-svn: 138612
2011-08-26 00:26:29 +00:00
Francois Pichet 35bc5de3bd revert 138610, accidental commit.
llvm-svn: 138611
2011-08-26 00:22:34 +00:00
Francois Pichet 9a98454a7d (no commit message)
llvm-svn: 138610
2011-08-26 00:18:13 +00:00
Jordy Rose 9942fe7c87 [analyzer] Increase the number of possible checks for a checker.
llvm-svn: 138609
2011-08-26 00:08:00 +00:00
Johnny Chen d890bfc962 Add a new attribute self.lldbHere, representing the fullpath to the 'lldb' executable
built locally from the source tree.  This is distinguished from self.lldbExec, which
can be used by test/benchmarks to measure the performances against other debuggers.

You can use environment variable LLDB_EXEC to specify self.lldbExec to the dotest.py
test driver, otherwise it is going to be populated with self.lldbHere.

Modify the regular tests under test dir, i.e., not test/benchmarks, to use self.lldbHere.
Also modify the benchmarks tests to use self.lldbHere when it needs an 'lldb' executable
with debug info to do the performance measurements.

llvm-svn: 138608
2011-08-26 00:00:01 +00:00
Ivan Krasin 9b2cbdfcff PNaClTargetInfo: add __ELF__, _REENTRANT and _GNU_SOURCE defines and update the test
llvm-svn: 138607
2011-08-25 23:49:20 +00:00
Bill Wendling 62fe9e9aa6 Update to the new EH scheme.
llvm-svn: 138606
2011-08-25 23:48:37 +00:00
Bill Wendling 8ac2041a19 Look at only the terminators of the basic block. Also, if we're using the new EH
scheme, return 'true' so that it doesn't try to run the old EH scheme's fixup on
the new code.

llvm-svn: 138605
2011-08-25 23:48:11 +00:00
Bill Wendling 45449b1cba Initial check in that will auto-upgrade the old EH scheme to the new EH scheme.
This upgrade suffers from the problems of the old EH scheme - i.e., that the
calls to llvm.eh.exception() and llvm.eh.selector() can wander off and get
lost. It makes a valiant effort to reclaim these little lost lambs.

This is a first draft, so it hasn't yet been hooked up to the parser.

llvm-svn: 138602
2011-08-25 23:22:40 +00:00
Matt Beaumont-Gay 045bde420b Fix a crash-on-invalid.
Much to everyone's surprise, the default constructor for TypeResult produces
an instance with Invalid == false. This seems like a decision we may want to
revisit.

llvm-svn: 138601
2011-08-25 23:22:24 +00:00
Jim Ingham 16746d1f97 Add logging to SymbolFileDWARF::ParseType so that we can tell the type/comp_unit/obj_file were being processed when something goes wrong...
llvm-svn: 138600
2011-08-25 23:21:43 +00:00
John McCall a5efa7386a Track whether an AggValueSlot is potentially aliased, and do not
emit call results into potentially aliased slots.  This allows us
to properly mark indirect return slots as noalias, at the cost
of requiring an extra memcpy when assigning an aggregate call
result into a l-value.  It also brings us into compliance with
the x86-64 ABI.

llvm-svn: 138599
2011-08-25 23:04:34 +00:00
Fariborz Jahanian 5cc730cdef Don't warn on category implementing a method, if
declated method in the class belongs to a synthesized
property getter/setter. // rdar://10014946

llvm-svn: 138598
2011-08-25 22:58:42 +00:00
Douglas Gregor 2ed0ee1ace Eliminate the -chained-pch flag and all of the frontend and libclang options associated with it. Chained PCH is the only way to build a PCH file that includes another PCH file
llvm-svn: 138597
2011-08-25 22:54:01 +00:00
Douglas Gregor 36db4f9602 Remove the Chaining argument from the PCH/module generator. It's no longer used
llvm-svn: 138596
2011-08-25 22:35:51 +00:00
Douglas Gregor 69f74f80db Introduce a -cc1 option "-emit-module", that creates a binary module
from the given source. -emit-module behaves similarly to -emit-pch,
except that Sema is somewhat more strict about the contents of
-emit-module. In the future, there are likely to be more interesting
differences.

llvm-svn: 138595
2011-08-25 22:30:56 +00:00
Fariborz Jahanian 371376010f objc - fix a bug exposed by my recent decl context
changes. // rdar://10015110

llvm-svn: 138594
2011-08-25 22:26:53 +00:00
Argyrios Kyrtzidis 440f954d6f [libclang] Fix getting a cursor that points inside tag definition that is part
of a type specifier.

e.g. for:

typedef struct _MyS {
  int foo;
} MyS;

pointing at field 'foo' would give a cursor for the typedef declaration 'MyS'
instead of the field.

llvm-svn: 138593
2011-08-25 22:24:47 +00:00
Bruno Cardoso Lopes ed834810be Do the same as r138461. Mark VZEROALL as clobbering all YMM registers
llvm-svn: 138592
2011-08-25 22:23:58 +00:00
Johnny Chen 943ddb730b Modify the impl of ThreadList::GetSelectedThread() so that it tries to fetch the
m_selected_tid thread first, check to see if it is valid (might be null if the
thread just exited), and if not select/return the 0th thread instead.

llvm-svn: 138591
2011-08-25 21:59:59 +00:00
Johnny Chen 689053770b Modify the loggings output oracle to fix test suite failure, after the recent change to CommandInterpreter.cpp.
llvm-svn: 138590
2011-08-25 21:51:45 +00:00
Nick Lewycky 64bfca1b60 Remove stray fullstop.
llvm-svn: 138589
2011-08-25 21:46:20 +00:00
Bruno Cardoso Lopes 8347b86293 Add support for AVX 256-bit version of MOVDDUP!
llvm-svn: 138588
2011-08-25 21:40:37 +00:00
Bruno Cardoso Lopes 388eacee2c Make isMOVDDUP mask check more strict and update comments!
llvm-svn: 138587
2011-08-25 21:40:34 +00:00
Douglas Gregor d09937fde0 Clean up the reloading of identifier information following the load of
a top-level module. This code is still horrible and should go away,
but we're not there yet.

llvm-svn: 138586
2011-08-25 21:19:59 +00:00
Douglas Gregor a918babff4 Preload source location entries as soon as we've loaded a particular
AST file, rather than waiting until we finish loading the top-level
AST file.

llvm-svn: 138585
2011-08-25 21:09:44 +00:00
Fariborz Jahanian d8114f7560 Reverse r138567 until a buildbot failure is investigated.
llvm-svn: 138584
2011-08-25 21:09:22 +00:00
Douglas Gregor 2fdb6b5391 Move file validation in the ASTReader from "top of chain" validation
to "when loading a particular module" validation, since it was only
validating local information anyway. This shouldn't change anything.

llvm-svn: 138583
2011-08-25 20:58:51 +00:00
Douglas Gregor d44252ec03 Factor the Module and ModuleManager classes out into separate headers
and .cpp files, since ASTReader.cpp was getting way too large. No
functionality change.

llvm-svn: 138582
2011-08-25 20:47:51 +00:00
John McCall 8d6fc9583d Use stronger typing for the flags on AggValueSlot and require
creators to tell us whether something needs GC barriers.
No functionality change.

llvm-svn: 138581
2011-08-25 20:40:09 +00:00
Argyrios Kyrtzidis 7aecbc7661 Make Lexer::ComputePreamble accept a LangOptions parameter, otherwise it may be
out-of-sync how a file is compiled. Patch by Matthias Kleine!

llvm-svn: 138580
2011-08-25 20:39:19 +00:00
David Greene 6e913571a2 Constify Comparison
Make ConstantInt::uge() const so it may be used in const contexts.

llvm-svn: 138579
2011-08-25 20:18:22 +00:00
Chad Rosier 9c286cce2e 80-column and spacing.
llvm-svn: 138578
2011-08-25 20:17:19 +00:00
Johnny Chen bbfa68b090 Make ThreadList::GetSelectedThread() select and return the 0th thread if there's no
currently selected thread.  And update the call sites accordingly.

llvm-svn: 138577
2011-08-25 19:38:34 +00:00
Ted Kremenek 1b7f49c2d6 Teach -Wunreachable-code about dead code caused by macro expansions. This should suppress false positives resulting from 'assert' and friends.
llvm-svn: 138576
2011-08-25 19:28:55 +00:00
Owen Anderson 5e30972cff Port over additional encoding tests to decoding tests, and fix an operand ordering bug this exposed.
llvm-svn: 138575
2011-08-25 18:30:18 +00:00
Douglas Gregor 69e9464340 Switch ASTReader::GetHeaderFileInfo() from a walk over the module
chain to a proper search.

llvm-svn: 138574
2011-08-25 18:14:34 +00:00
Benjamin Kramer 5a122f37fe Intel family 6 model 44 is Gulftown/Westmere-EP and doesn't have AVX.
llvm-svn: 138573
2011-08-25 18:05:56 +00:00
Douglas Gregor 14f771695a Switch the forward walk through the module chain over to a depth-first
search in ASTReader::ReadPreprocessedEntities().

llvm-svn: 138572
2011-08-25 18:03:05 +00:00
Fariborz Jahanian 35d0e66bee Fixes a typo in my last patch.
llvm-svn: 138571
2011-08-25 18:01:27 +00:00